2 ms·
Yep. If your usual working set (code+data), or better still your entire working set, fits into RAM easily and doesn't see a lot of write activity (where in RAM
by dspillett 15y ago
Yep.
If your usual working set (code+data), or better still your entire working set, fits into RAM easily and doesn't see a lot of write activity (where in RAM or not it needs to be copied to disk at some point), cheap VMs are often a no-brainer. The I/O hit will only seriously affect you if you need to reset he VM so the working set needs priming in RAM again.
As soon as you need I/O bandwidth (much writing, or a data-set that doesn't fit easily in RAM) you need a physical machine as the I/O contention between you and other VMs will completely kill performance.
So as you say: real machines for significant database work and cheap VMs for your web servers and other worker tasks is often the most cost effective arrangement. Don't go too cheap on the VMs though for production work. I generally avoid "burstable RAM" options as I find them less reliable (I'd rather have a fixed amount that can all reliably be allocated as needed, than unpredictable reliability forcing me to put procedures in place to deal with unexpected OOM situations). And make sure you properly test the bandwidth carrying capacity: I've seen cheap hosts get good reviews where the reviewer tested incoming bandwidth but filed to test outgoing - this is not all that useful as a hosts outgoing bandwidth usually sees much more contention than the incoming.