Exactly? I think?
Speaking as both a (private) cloud provider and a public+private cloud user, I know "local" disk I/O (which typically cant actually be local, and yes I'm referring to I/O here, not space) is ridiculously expensive compared with RAM, which is cheap and orders of magnitude faster. Swapping is also about the worst imaginable form of random and heavy disk I/O too. One way or another, directly or indirectly, I've got to pay for that as a user, or as a provider I have to pass that cost on to the customer(s). If more than a few customers are swapping, they're crippling the I/O performance for everyone including themselves. Eventually the only realistic workaround is to use (some form of) RAM as a write-cache, which is complicated, costly, and risks "disk" corruption for "written" data that' still in RAM. From "outside" the VMs it's also almost impossible to tell what's "swap I/O" vs "real disk I/O" so I'd have to juggle the risk vs performance VM-by-VM not file-by-file (with greater risk+cost for the high-I/O VMs obviously). It would have been so much easier (+cheaper) to give the VMs more real RAM in the first place.
As a cloud user, I try to reduce my "disk" I/O as much as practically possible, and as a provider I'm happy to help my customers do the same, and improve cache-ability as much as practically possible. All my customers end up happier and performing better, and spending less, as a result.
TL/DR: swap is bad in clouds.
Again, if this is really occasional, maybe a couple of times a week, fine, but if you're swapping for more than a few minutes daily, then just get more RAM, I think you'll find that both you, your provider, and your provider's other customers will end up happier in the long run.
Three more tips to reduce I/O, you can have these for free:
- Windows bad, Linux good. Never mind the difference in disk, memory, licensing, support, paravirt capabilities... in Windows it's almost impossible to disable swap, officially, or in a supportable way.
- Mount all drives/partitions with "noatime" option, otherwise (cheap) reads beget (expensive) writes anyway! There's almost no app I know that cares about atimes anyway (OK, I have a list of 3 pretty obscure bits of software that care), so 99% of the time you'll get a free performance boost with no appreciable impact.
- If you happen to be one of the 1% who really do need atime, try "relatime" instead.
If your cloud provider knows what they're doing, they already disabled swap, enabled noatime, and charge a lot more for Windows VMs