I'm considering migrating my database to a new server. The new server has a much less performant CPU, but more RAM and a faster SSD. Also, it is half the monthly price.

Based on available CPU benchmarks the new CPU may have 50% less processing power than the current CPU, however, based on my munin graphs, the current CPU is >95% idle:

Munin CPU usage


Would it be safe to significantly downgrade the CPU given how idle it is?

While the load is above 1, I believe the bottleneck is RAM and disk, not CPU, and so the load should remain unchanged, if not decrease with the increased RAM and faster SSD.

Any advice would be appreciated. Thank you


Based on the information you provided, I think you should make the move. It looks like your workload is using very little CPU, but a lot of RAM.

I'd also consider disabling swap entirely after making sure the database is configured such that it won't use more RAM than is available. And you should patch and reboot a bit more frequently too. :-)

  • Thank you! Yes it hasn't had a reboot in a while. Though it seems every time I reboot a server that hasn't been rebooted in a while it will hang for one reason or another at boot time. Then someone needs to go in to IPMI and figure out what's wrong. – tom_nb_ny Oct 22 '19 at 14:36

Host metrics are not a capacity assessment, even if they enable some educated guesses.

There is no way they can predict if, say, due to organization growth the load on this box will increase by 10x. Nor will they analyze the workload. The load average will not tell you if jobs are single threaded, and you would get much more work done running things in parallel.

That said, let's make some guesses.

Storage, can't tell much. CPU load doesn't tell anything about the IOPS, or if the throughput saturates the storage system. Faster solid state is usually a good idea, yes.

Memory is possibly slightly underutilized. Depending on the database, this probably means that shared memory could be increased a bit to get a larger cache. Actually, the memory to CPU ratio seems relatively small for a database.

CPU is very underutilized, on average 5%. This can be a feature like it is for Stack Overflow, who remains fanatical about response time even if one box takes all the load. Or it means you are paying for way too many CPUs as your performance objectives can be achieved with half of them.

While the load is above 1, I believe the bottleneck is RAM and disk, not CPU, and so the load should remain unchanged, if not decrease with the increased RAM and faster SSD.

No, that is not what load average 1 means. Load average is the number of tasks ready to run, and on Linux also includes uninterruptible sleep. On this 32 CPU system, any load under 32 means all tasks who want a CPU are getting one immediately. It doesn't say anything about where the bottleneck is in the overall system.

To find what the slowest component is, do a systematic analysis such as the USE method.

You have a capacity planning decision to make, fewer CPUs and faster SSDs as proposed or not. Does the current spec meet your performance requirements? The cost structure will be different if you own the hardware and just pay power, versus if you rent it and the many CPU box is at a price premium.

Risks you take on this are mitigated by how easy it is to undo. If you can get the working size again, that's easy to migrate back.

P.S. Schedule a maintenance window for patching. Any UNIX or Linux has important updates in that 412 day uptime that are not applied.

  • Thanks. Based on the information I provided, would you downgrade the CPU? I see you would take a very analytical, systematic approach to this - for better or worse I tend to make decisions on less information. What additional calculations or tests would you perform to determine the allowable downgrade of cores, clock speeds & CPU cache? The workload is constant and will not change. Thanks again – tom_nb_ny Oct 22 '19 at 14:54
  • I ran some CPU tests from the USE method. They don't put in to doubt what I have observed via the Munin graphs. Thanks again – tom_nb_ny Oct 22 '19 at 15:05
  • As I said, determine a capacity planning process. Are you meeting your performance objectives? Is load going to change based on what you know about the future? How easy it is for you to swap between instances to right-size this? Almost certain you can reduce CPU significantly, but a proper process takes a more comprehensive perspective. – John Mahowald Oct 23 '19 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.