Infrastructure costs are one of the most controllable line items in a technology business — yet most teams overspend on VPS and cloud hosting in predictable, fixable ways. Whether you are paying too much for an oversized VPS, running an expensive cloud VM for a workload that a smaller Hong Kong VPS handles comfortably, or missing simple configuration changes that reduce CPU and bandwidth consumption, this guide identifies the highest-impact cost reduction opportunities.
Step 1: Audit Your Current Resource Utilisation
Most VPS overspecification comes from provisioning for theoretical peaks rather than actual sustained load. Measure before making any changes:
# Check average CPU utilisation over the past 24 hours
sar -u 1 60 # Samples every 1 second for 60 seconds
# Check memory usage
free -h
vmstat -s | head -20
# Check disk I/O utilisation
iostat -x 1 10
# Identify which processes use the most resources
ps aux --sort=-%cpu | head -20
ps aux --sort=-%mem | head -20Install netdata for persistent metrics if you do not already have monitoring:
wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && bash /tmp/netdata-kickstart.shAfter 48–72 hours of monitoring, you have real data on your actual resource profile. Common findings:
- Average CPU utilisation under 15% → you are paying for cores you never use
- Available RAM consistently above 50% → you are paying for memory you do not need
- Disk I/O consistently low → NVMe advantage not being utilised (consider downsizing storage)
Step 2: Right-Size Your VPS Plan
| Observed Utilisation | Action | Expected Saving |
|---|---|---|
| CPU avg <15%, RAM <40% used | Downgrade to smaller plan | 30–50% cost reduction |
| CPU spikes to 100% but avg <30% | Add caching before upgrading hardware | Avoid upgrade cost entirely |
| RAM constantly >85% used | Add Redis caching, then upgrade RAM if still needed | Defer upgrade or avoid it |
| Storage mostly empty | Downgrade storage tier | 10–20% cost reduction |
Step 3: Implement Caching to Defer Hardware Upgrades
The single most cost-effective VPS optimisation is adding caching — it reduces CPU and disk I/O by serving repeated requests from memory rather than re-computing them.
Redis object caching for WordPress
# Install Redis
apt install -y redis-server
# Install Redis Object Cache plugin in WordPress
# wp plugin install redis-cache --activate
# Add to wp-config.php:
define('WP_REDIS_HOST', '127.0.0.1');
define('WP_REDIS_PORT', 6379);
# Enable in WordPress admin: Settings → Redis → Enable Object CacheA WordPress site with 1,000 daily visitors and no caching might run 50,000+ MySQL queries per day. With Redis object caching enabled, the same traffic generates 5,000–10,000 queries — a 5–10× reduction in database load that directly reduces CPU and I/O pressure.
Nginx FastCGI page caching
nano /etc/nginx/sites-available/yourdomain.com# Add to http {} block in nginx.conf:
fastcgi_cache_path /tmp/nginx-cache levels=1:2 keys_zone=WORDPRESS:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
# In server {} block:
location ~ \.php$ {
fastcgi_cache WORDPRESS;
fastcgi_cache_valid 200 60m;
fastcgi_cache_bypass $cookie_logged_in $http_authorization;
add_header X-Cache-Status $upstream_cache_status;
# ... rest of PHP config
}Full-page caching serves most requests without executing PHP at all — reducing CPU usage by 60–80% for read-heavy WordPress sites and deferring the need for a larger VPS plan.
Step 4: Reduce Bandwidth Costs
Bandwidth is a recurring cost that grows with traffic. Optimise before upgrading plans or paying overage fees:
Enable Gzip/Brotli compression
nano /etc/nginx/nginx.confgzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_types text/plain text/css application/json application/javascript
text/xml application/xml image/svg+xml font/woff font/woff2;Text content (HTML, CSS, JavaScript, JSON) typically compresses to 20–30% of original size — reducing bandwidth consumption by 70–80% for text-heavy responses.
Serve static assets from Cloudflare CDN (free)
# Add Cloudflare as your DNS provider and enable proxying (orange cloud)
# Cloudflare caches and serves your static assets (images, CSS, JS) from
# its global edge network — your VPS only receives requests for uncached or
# dynamic content
# Configure cache settings in Cloudflare:
# Cache Rules → Cache Level: Aggressive for static file extensions
# Browser Cache TTL: 1 month for static assetsWith Cloudflare CDN active, static assets (which typically account for 70–90% of page weight) are served from Cloudflare’s edge without consuming your VPS bandwidth allocation.
Optimise images
# Convert existing JPEG/PNG images to WebP (30-50% smaller)
apt install -y webp
# Batch convert
find /var/www/html -name "*.jpg" -exec sh -c 'cwebp -q 80 "$1" -o "${1%.jpg}.webp"' _ {} \;
# Nginx configuration to serve WebP to supporting browsers
location ~* \.(jpg|jpeg|png)$ {
add_header Vary Accept;
try_files $uri$webp_suffix $uri =404;
}Step 5: Database Query Optimisation
Slow, inefficient database queries waste CPU cycles and I/O capacity — fixing them is free performance improvement:
# Enable slow query log to find expensive queries
nano /etc/mysql/mysql.conf.d/mysqld.cnf[mysqld]
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 1 # Log queries taking over 1 second
log_queries_not_using_indexes = 1systemctl restart mysql
# Analyse slow query log after 24 hours
mysqldumpslow -s t -t 20 /var/log/mysql/slow.logCommon fixes for slow queries:
- Add missing indexes on frequently filtered columns
- Rewrite N+1 query patterns (multiple queries in a loop → single JOIN)
- Add query result caching (Redis) for expensive read-only queries
- Archive old data — queries on tables with 10 million rows are always slower than the same query on 100,000 rows
Step 6: Migrate from Expensive Cloud to Hong Kong VPS
For teams currently running on AWS, GCP, or Azure in the Asia-Pacific region, migrating to a Hong Kong VPS typically reduces infrastructure costs by 3–6× for equivalent compute — while also gaining CN2 GIA routing that cloud providers do not offer.
Typical migration savings example:
| Component | AWS ap-east-1 Monthly | Server.HK Hong Kong VPS Monthly |
|---|---|---|
| 2 vCPU / 4 GB RAM compute | ~$30 (t3.medium) | ~$10 |
| 30 GB SSD storage | ~$3 (EBS gp3) | Included |
| 500 GB outbound data | ~$60 ($0.12/GB) | Included (unmetered) |
| Total | ~$93/month | ~$10/month |
The migration process is covered in our zero-downtime migration guide.
Conclusion
VPS cost optimisation follows a clear priority sequence: audit actual utilisation first, add caching to reduce resource consumption, optimise bandwidth with compression and CDN, fix slow queries, and then (and only then) resize hardware based on real data. Most teams that follow this process discover they can reduce infrastructure costs by 30–60% without any degradation in performance or reliability.
For teams currently overpaying on AWS or GCP for Asia-Pacific workloads, exploring Server.HK’s Hong Kong VPS plans is the highest-leverage single action — delivering 3–6× cost reduction and better China routing simultaneously.
Frequently Asked Questions
How do I know if my VPS is the right size for my current traffic?
Monitor sustained (not peak) CPU and RAM utilisation over 48–72 hours using tools like Netdata or htop. If sustained CPU stays below 30% and RAM below 60%, your VPS is likely oversized. If either resource consistently exceeds 70% during normal operating hours (not just traffic spikes), you are appropriately sized or undersized. Traffic spikes are best handled with caching rather than permanently larger hardware.
Can I reduce costs by running multiple small sites on one VPS?
Yes — hosting multiple low-traffic sites on a single VPS is one of the most effective cost reduction strategies. A 2 GB RAM VPS running 5 low-traffic WordPress sites with proper caching costs $10/month instead of $5 × 5 = $25/month for separate shared hosting accounts, while delivering better performance and control. See our multi-site VPS guide for the setup process.
Is Cloudflare free tier sufficient for most Hong Kong VPS workloads?
For the vast majority of small to medium sites, Cloudflare’s free tier provides significant bandwidth savings (CDN for static assets), DDoS protection, and SSL management at zero cost. Paid Cloudflare plans add advanced WAF rules, more granular cache controls, and China PoPs — relevant for high-traffic sites where fine-grained control over caching and security rules is needed.