Stop Bleeding Cash: A CTO’s Guide to Cloud Cost Optimization in a Post-Schrems II World
It usually starts with a finance department email on a Tuesday morning. Subject: "Why did our AWS bill jump 40% last month?"
You open the dashboard. You see bandwidth egress fees, unattached EBS volumes, and a Kubernetes cluster that’s been scaling up to handle traffic spikes but never scaled back down. Welcome to the "Cloud Hangover." In 2020, the narrative shifted. We spent the last five years migrating to the cloud for agility. Now, we are spending our weekends figuring out how to stop the cloud from eating our entire margin.
I have audited infrastructure for SaaS platforms across the Nordics, and the pattern is identical. Over-provisioning is rampant, and the hidden costs of data transfer are silently killing profitability. Here is how we fix it, keeping technical reality and the recent Schrems II ruling in mind.
1. The "Zombie Infrastructure" Hunt
The quickest win isn't refactoring your monolith into microservices; it's killing what you aren't using. Developers spin up test environments, forget them, and leave them running. On a hyperscaler, that meter never stops ticking.
Start with a ruthless audit of your running processes and storage. If you are running Linux instances, you don't need fancy SaaS tools to find waste. You need the terminal.
Here is a quick heavy-hitter search to find massive log files or abandoned backups that are eating expensive block storage:
# Find files larger than 500MB, often forgotten logs or dumps
find / -type f -size +500M -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
# Check for processes that have been running for weeks but using 0 CPU
ps -eo pid,etime,pcpu,pmem,cmd --sort=-etime | head -n 15
If you see a Java process running for 120 days with 0.0% CPU usage, you are paying for heat. Kill it.
2. The Hidden Cost of Compliance: Schrems II
Let’s talk about the elephant in the room. In July 2020, the CJEU invalidated the Privacy Shield (Schrems II). If you are hosting personal data of EU citizens on US-owned clouds (even in their EU regions), you are now in a legal minefield. The legal consultation fees alone to justify these data transfers can exceed your hosting budget.
The pragmatic solution? Data gravity.
Moving your core database and user-facing workloads to a Norwegian provider like CoolVDS isn't just about latency (though <2ms to NIX in Oslo is nice); it is about cutting the compliance overhead. You eliminate the need for complex Standard Contractual Clauses (SCCs) and transfer impact assessments for that data segment. Time is money. Legal time is a lot of money.
3. Optimize Before You Upsize
I often see teams upgrading from a 4GB RAM instance to an 8GB instance because "the database is crashing." 90% of the time, it’s not a lack of RAM; it’s a default configuration.
Before you pay double for the next tier, tune your stack. For MySQL/MariaDB, the `innodb_buffer_pool_size` is the single most critical lever. It defaults to a pitifully small value in many package installations.
MySQL Configuration Check
Check your current usage vs. buffer pool size:
SELECT
FORMAT(variable_value / 1024 / 1024, 2) AS 'Buffer Pool (MB)'
FROM information_schema.global_variables
WHERE variable_name = 'innodb_buffer_pool_size';
If you have a 4GB VPS dedicated to the database, set this to 2.5GB or 3GB in your `my.cnf`. Do not let the OS swap.
[mysqld]
# Optimized for a 4GB RAM Instance on CoolVDS
innodb_buffer_pool_size = 3G
innodb_log_file_size = 512M
innodb_flush_log_at_trx_commit = 2 # Slight risk, huge performance gain for writes
query_cache_type = 0
query_cache_size = 0
By tuning this, I’ve kept high-traffic Magento stores on 8GB instances that competitors said required 32GB.
4. Bandwidth: The Silent Killer
Hyperscalers operate on a "Hotel California" model: it is free to put data in, but you pay dearly to get it out. Egress fees can constitute 30% of a total cloud bill for media-heavy sites.
Pro Tip: Offload static assets to a VDS with a generous bandwidth cap or flat-rate billing. CoolVDS offers substantial bandwidth allocations included in the base price, unlike the $0.09/GB charged by the giants.
Furthermore, use Nginx to aggressively cache static content and prevent requests from hitting your backend application servers (PHP/Python/Node), which consumes CPU cycles.
# nginx.conf snippet for aggressive caching
server {
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
expires 365d;
add_header Cache-Control "public, no-transform";
access_log off;
}
# Gzip compression to reduce bandwidth usage
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
gzip_min_length 1000;
}
5. The TCO Comparison: Predictability is King
The "Pragmatic CTO" values predictability over infinite theoretical scalability. If your workload is relatively stable (e.g., a corporate ERP, a standard e-commerce site, or a staging environment), the premium you pay for "serverless" elasticity is wasted.
| Cost Factor | Global Hyperscaler | CoolVDS (Norway) |
|---|---|---|
| Compute | Hourly + complexity | Flat Monthly Rate |
| Storage (NVMe) | Pay per GB Provisioned + IOPS fees | Included in plan |
| Egress (Bandwidth) | ~$0.09/GB (expensive!) | Generous Allowance Included |
| Data Sovereignty | Complex (US Cloud Act issues) | Native (Norwegian Law) |
Conclusion: Regain Control
Cost optimization in 2020 isn't about finding the cheapest hardware; it's about matching the infrastructure to the business requirement. If you need global CDN distribution, use a CDN. But for your core compute—the engines driving your business—paying a premium for unused elasticity is a strategic error.
We built CoolVDS to solve exactly this problem for Nordic professionals. We provide the raw NVMe performance and KVM virtualization isolation you need, without the metering anxiety. You know exactly what your invoice will be at the end of the month, and your data stays safely within Norwegian jurisdiction.
Don't let inefficiency drain your budget. SSH into your current setup, run the audit commands above, and then spin up a comparison instance on CoolVDS to see the latency difference for yourself.