Oracle’s Always Free Tier is ridiculously generous. We’ve been running an Ampere A1 instance with 4 vCPUs and 24GB RAM for a few years now — hosting a VPN and a handful of Docker containers. Hard to complain about free.
The dreaded email
One day we got a friendly reminder from Oracle: instances with consistently low utilisation would be stopped. The official policy is pretty clear:
Idle Always Free compute instances may be reclaimed by Oracle. Oracle will deem virtual machine and bare metal compute instances as idle if, during a 7-day period, the following are true:
- CPU utilization for the 95th percentile is less than 20%
- Network utilization is less than 20%
- Memory utilization is less than 20% (applies to A1 shapes only)
The thing is, a VPN server mostly just shuffles packets. CPU sits near zero most of the time. So by Oracle’s metrics, our perfectly functional box looks “idle”.
The lazy fix
We needed to bump CPU utilisation above 20% without actually doing anything useful. A busy loop seemed like the obvious choice:
#!/bin/bash
lc() {
(
pids=""
cpus=${1:-1}
seconds=${2:-60}
echo $(date '+%Y-%m-%d %H:%M:%S') loading $cpus CPUs for $seconds seconds
trap 'for p in $pids; do kill $p; done' 0
for ((i=0;i<cpus;i++)); do while : ; do : ; done & pids="$pids $!"; done
sleep $seconds
)
}
lc 4 60
The lc function spawns N subprocesses that each run an infinite loop (: ; is bash’s no-op), waits for a set duration, then kills them all via the trap. We spin up all 4 CPUs for 60 seconds.
Scheduling it
Cron does the rest. Every 5 minutes, we burn 60 seconds of CPU:
*/5 * * * * /home/ubuntu/load.sh >> /home/ubuntu/load.log
That’s 60 seconds of 100% load out of every 300 seconds — roughly 20% average utilisation. Right on Oracle’s threshold, and in practice the VPN traffic on top pushes us comfortably over.
The log is a nice touch for troubleshooting:
2026-03-07 09:45:01 loading 4 CPUs for 60 seconds
2026-03-07 09:50:01 loading 4 CPUs for 60 seconds
2026-03-07 09:55:01 loading 4 CPUs for 60 seconds
It’s been running since late 2023. No more threatening emails from Oracle.