
On Mon, Apr 22, 2013 at 06:10:17PM +1000, Trent W. Buck wrote:
I've been ambivalent enough about zram to not bother with it yet[0]. I take it you're capping it at 50% of your 8GB?
25% of my 16GB (ram is cheap, and swapping to disk or even ssd is slow). if swap usage ever came close to 4GB i'd consider upping zram to 50%.
What's your typical RAM breakdown look like (free -m output)?
depends on what i've been running recently. at the moment, i've got no swap used (9 days uptime since last reboot). $ free -m total used free shared buffers cached Mem: 16047 15581 466 0 0 1831 -/+ buffers/cache: 13749 2298 Swap: 12287 0 12287 $ cat /proc/swaps Filename Type Size Used Priority /dev/sda2 partition 4194300 0 0 /dev/sdb2 partition 4194300 0 0 /dev/zram0 partition 4194300 0 5 sda and sdb are both OCZ Vector 240GB SSDs, with partitions for raid-1 /, raid-1 /boot, swap space, as well as partitions for ZIL and L2ARC for my ZFS disks. with 16GB RAM, i could probably get away with no swap disk (esp. with zram), but i'd rather have it and not need it, than vice-versa...even a small amount of swap space can mean the difference between a functioning system and semi-random process termination or even system freeze (as has happened to me recently on some mythtv transcodes because mythtranscode is buggy and some DVB recordings confuse the hell out of it).
I assume you'd have a non-negligible amount of zlib CPU churn when paging out to zram -- is that noticable? I suppose it is, but only when you have pegged BOTH CPU and RAM.
can't say i've noticed it. the system certainly feels a lot more responsive when swapping to zram compared to how it used to feel swapping to SSD. CPU is a Phenom II x6 1090T, which spends most of its time idling down at 800Mhz due to the on-demand governor, so there's plenty of CPU power available.
[0] I had enough bad swap thrash experiences under 2.6 that I've run without swap ever since, relying on the OOM killer if the GUI browser decides to be extra stupid.
the trouble with relying on the OOM killer is that what it kills is semi-random...e.g. the bloated ram hog might be iceweasel or chromium, but it kills postfix or sshd or something else important.
Incidentally, I've NEVER run a personal computer with more than 1GB RAM (of which the onboard GPU gets about a quarter), so it IS possible -- just not for WIMPs :-)
yep. lots of things are possible. you can even eat a bowl of corn-flakes with miniature tweezers if you really want to. sometimes, though, you just can't help thinking - "fuck it, i'll lash out and buy a spoon, they're really cheap these days". :-) IMO more RAM is still the cheapest, best upgrade you can get for a system..and has been for as long as i can remember. 10 years or so ago, i would have been recommending getting at least 256 or 512MB. these days, 8GB or even 16GB costs about as much as 256/512MB did back then. (note the remarkably imprecise time there "10 or so years ago". could have been 15 years for that size ram, i really can't remember. and don't want to :) craig -- craig sanders <cas@taz.net.au>