Is swap a bad thing?
In this case can I assume just upgrading to a larger linode with more memory would remove the problem? I do not cache anything in memory its just the fact that I load 1-20mb of data to process per page request.
7 Replies
James
run
vmstat 1
and watch the si and so columns, if there's constant activity, you need to do something.
you should get to know what's normal and what's not, so run it often so when things do become slow or OOM, you'll know what it's meant to look like. That goes for all monitoring tools, like top, etc.
If you're using apache prefork and especially if you're using mod_php, you need to modify maxclients and possible keep-alives to make your server degrade gracefully under a high web load, otherwise with the default settings, your vps will OOM and require a reboot, whereas if you tune apache, your web sites will be very slow to load under a high web load, but your vps will be up and happy, you'll be able to log into it, etc.
I won't go into all the details, you can find guides in the library or on google.
@nalanda:
if you use your swap space. there will be a considerable slowness in your application
As chesty said, that's only a problem if you're swapping in a lot. If you swap out a chunk of some daemon that starts on boot and then does nothing ever, it actually helps performance, since it's more useful to use the RAM for the disk cache.