
On Mon, 31 Dec 2012, Trent W. Buck wrote:
Anthony Hogan <anthony-luv@hogan.id.au> writes:
Hrrmm.. interesting RE swap. My reading in the past regarding swap seems to be not to starve the machine on it or stuff just dies rather than slows down.. it's something to keep in mind though.
IME as at 2.6, the last time I ran with swap, "slows down" means "slows down to the point where you can't get a shell to spawn pkill" such that you end up having to hard reset the entire machine. Compared to that, letting the OOM killer take a guess (and probably kill off the browser that's causing swap thrash) seems like a good bet. YMMV &c.
Oh, for servers I do generally still give them swap, but since they are massively overspecced with RAM, I've never seen them actually page anything out.
Since SSDs can almost be written to all day every day for about 5 years without developing dodgy cells these days, I decided to enable swap on my SSD based machine. And was surprised to still only get about 3MB/S swap rates (15MB/s if I also enable zram). There is something really fscking screwy in Linux's swap implementation if the best it can do when trying to swap a 1GB browser image back in from disk is 3MB/s (@ about 300 iops) off a device that can do 80,000 iops and 300GB/s read. It's been like that since at least the 2.4 days. I've only *ever* gotten 3MB/s out of the si and so columns in vmstat. (at least SSD allows me to keep using the machine for other tasks when it's busy swapping in opera). -- Tim Connors