marv wrote:
It really shouldn't matter how much swap he has. Doesn't Linux wait until it's out of physical memory before using the swap?
No, it will preemptively evict pages sometimes if it thinks it can find a better use for the memory. This doesn't really account for much though, most of the time.
marv wrote:
Also, I've always read that the swap should be 1.5-2 times the size of the physical memory. But that may not apply to Linodes. What's the recommended size for a swap partition for a Linode?
I think that rule of thumb largely comes from the 90s, when physical memory was scarce. Now on servers, you want to avoid situations where you have to swap at all. Your swap partition is basically an emergency brake, so you're not totally screwed if you run out. I would say that these days if you
have to swap, you're not using an appropriately spec'd machine.
A few years back it was tough to fit apache, mail, spamassassin, mysql etc onto the cheaper linodes and you'd end up swapping a bit, which was mostly okay if your server wasn't very busy. These days you'd really have to be doing quite a bit to need that much swap. You'll also drain your I/O tokens in no time, so I'm not sure how much it would help.