What the heck is "SWAP"?
If you're a bit new to all this hype :)... then SWAP is the temporary storage location that holds programs and other whatnots just before they're loaded into your actual/physical RAM for execution.
Anyhow, apparently there are few solutions for enhancing the performance and one in particular called zRam (successor of a project known as "Compcache", link below) that's integrated into the GNU/Linux Kernel. But the integration is "unofficial" meaning that, it's not included in the Kernel by default (unless the developers manually put it there).
Image via: Compcache (the original project)... |
In his own words...
"... the result on my desktop with a quad-core CPU and 2Gb of RAM was fantastic:instead of freezing after running out of RAM, the system worked like nothing happened... got almost the same results on a 6-year-old laptop with Pentium M and 1Gb of RAM!...You can install the zRam memory performance optimizer in Ubuntu 11.10 Oneiric Ocelot and 11.04 Natty Narwhal by using the below commands.
I've improved the script to automatically adapt to the amount of memory in the system and automatically scale across several CPUs or CPU cores, packaged it in..."
sudo add-apt-repository ppa:shnatsel/zramNow I used it for very short period thus cannot say much about its performance (it's still in my system, I'm gonna keep it this time :D), so I let you decide that. But after considering Sergey and few others who've used it... it seems worth installing!.
sudo apt-get update
sudo apt-get install zramswap-enabler
But I'm just wondering whether this could have a somewhat negative effect on computers with lower-end processors (such as Netbooks for instance) since the idea here is to compress some of the data on the RAM and store it within the RAM itself which requires some decent amount of your CPU cycles.
So I'm just wondering it could result in a somewhat, shortened battery life, perhaps. But then again while reading the original "Compache" developers' page, he says...
"Market is now getting flooded with these "lightweight laptops". These are memory constrained but have CPU enough to drive on compressed memory"So then perhaps after all, it may not has a huge effect on your CPU, unless it's really slow :D. But later if you wanted to remove it... then just open the terminal window and enter the below command to completely un-install it.
sudo apt-get remove zramswap-enablerEnjoy!.
5 comments:
Nice article!
In Ubuntu 12.04 the PPA is not even needed. Instead, just install "zram-config" which provides the similar functionality:
apt-get install zram-config
- michael
@Micheal,
Cool :).
For information, I wanted to uninstall zramswap-enabler (zram-config) COMPLETELY (including the zram swap partitions it created), and "sudo apt-get remove zramswap-enabler" ("sudo apt-get remove zram-config") did NOT suffice! The script /etc/init/zramswap.conf (/etc/init/zram-config.conf) remained and loaded again on the next boot (and made a swapon /dev/zram0 .. /dev/zramN again). (I ran "swapon -s" and there were still the lines starting with /dev/zram...)
What I needed is to *PURGE*:
$ sudo apt-get purge zramswap-enabler
(
$ sudo apt-get purge zram-config
)
NB: In my case, I had already run the "remove" command (then rebooted), and even after running "purge" on top of that, "swapon -s" was still giving the same results. I had to re-install, then purge.
@Anonymous,
Thanks for sharing your experience mate, appreciate it :).
just use dpkg --purge instead.
sudo dpkg --purge zramswap-enabler
sudo dpkg --purge zram-config
and no need to reinstall
Post a Comment