News for hackers. Stuff that matters.
Re:Linux 3.11's feature set now confirmed by nly on Tuesday July 16, 2013 @12:52PM (#6053061)
Compressed swap looks interesting
Re:Linux 3.11's feature set now confirmed by TheCraiggers on Tuesday July 16, 2013 @02:02PM (#6053569)
I'm all for options, but isn't swap slow enough as it is already without adding additional overhead?

Even on tiny embedded devices, storage is cheaper than cycles IMO.

Re:Linux 3.11's feature set now confirmed by bodyfour on Tuesday July 16, 2013 @03:17PM (#6054120)
As others have pointed out, the point of zswap is to "swap" in and out of RAM.

I'd like to add that your premise is faulty anyway: since compressed objects are smaller doing I/O on them is faster. As long as cost of the I/O you saved is less than the cost of doing the compression, it's faster not slower. Transparently compressed I/O usually uses high-speed algorithms (LZ4, LZO, etc) to take advantage of this effect.

Also, when a machine is swapping you'll usually find that the CPU is near idle since useful work is blocked on the swap I/O. Spending a little CPU time to speed up that I/O is a win.

Re:Linux 3.11's feature set now confirmed by TheCraiggers on Thursday July 18, 2013 @01:06PM (#6064938)
An enlightening response. Thank you.
Re:Linux 3.11's feature set now confirmed by nly on Tuesday July 16, 2013 @02:21PM (#6053708)
It's not the cost of the storage, it's how slow it to read and write to it. This is still going to be an order of magnitude faster than swapping to disk.
Re:Linux 3.11's feature set now confirmed by aaronbee on Tuesday July 16, 2013 @02:52PM (#6053954)
The point is to avoid writing to disk entirely by compressing RAM that may otherwise be swapped to disk when remaining RAM is low.

See http://thread.gmane.org/gmane.linux.kernel.mm/91969

Re:Linux 3.11's feature set now confirmed by s_baby on Tuesday July 16, 2013 @02:20PM (#6053704)
I think they're doing compressed swap to ramdisk.
Re:Linux 3.11's feature set now confirmed by mikevm on Tuesday July 16, 2013 @01:30PM (#6053330)
Mac OS X Mavericks (the upcoming version) has it enabled by default.
Re:Linux 3.11's feature set now confirmed by gtaylor on Tuesday July 16, 2013 @02:20PM (#6053703)
The downvotes have already spoken to this to some extent, but who cares? My Macbook Pro is slow enough in general running OS X, and especially so when RAM gets tight. I'm not sure I'd want to add this additional overhead.

I see this more as an additional tool in the box than something appropriate for 100% of Linux users. You'll know when you need it, but most probably won't.

Re:Linux 3.11's feature set now confirmed by mikevm on Tuesday July 16, 2013 @02:39PM (#6053851)
It seems that people mistook the "tone" of my post. I didn't post it in an attempt to say that OS X is somehow superior, I just thought that people might find it interesting that this is the same feature that was shown in the last WWDC keynote -- and now Linux has it too! (I'm not a Mac user, by the way.)
Re:Linux 3.11's feature set now confirmed by Shish2k on Wednesday July 17, 2013 @04:04AM (#6056636)
> My Macbook Pro is slow enough in general running OS X, and especially so when RAM gets tight. I'm not sure I'd want to add this additional overhead.

The point of this is that it makes things /faster/, not /slower/. It's essentially trading 1GB of DDR3 for 3GB of DDR1, which is a net gain when your ram amount is more of a bottleneck than ram speed (which it pretty much always is, IME)

Re:Linux 3.11's feature set now confirmed by gtaylor on Friday July 19, 2013 @10:59AM (#6070554)
I thought we were talking about compressing swap space? That's not really DDR-anything, it's slow-as-a-dog, last resort type stuff. Depending on the compression algorithm, compression level, and a number of other factors, this could be worse for some usage cases.

I'm skeptical that this is a big win in the case of Linux OR Mac OS, given that you want to avoid heavy swap usage to begin with. Especially as cheap as RAM is...

Re:Linux 3.11's feature set now confirmed by lvillani on Thursday July 18, 2013 @01:30AM (#6061933)
By the way, I recently discovered that you could use it in Ubuntu since 2012 (12.04).

Just `apt-get install zram-config` and reboot, voilá.

I'm using it both on my laptop and desktop at work with 4Gb physical RAM. I have PyCharm and lots of tabs open in Chrome and it has to reach around ~2gb of compressed swap before it hits the disk. It doesn't even seem to slow down the machine in any noticeable way.

A truly nice, little hidden gem.

Re:Linux 3.11's feature set now confirmed by melchebo on Thursday July 18, 2013 @01:48PM (#6065240)
It looks like it works right after install. No need to reboot. On an up to date Ubuntu 12.04.2 that is.