I use a small program called
Dynamic Swap Space Manager,( 'swapspace' for short).
Swap is not needed for system performance as much now as it used to be just a few short years ago when the PCs most of us could afford were underpowered and memory modules were very expensive. Now most computers have adequate RAM.
Nevertheless, the operating system seems laggy if there's no swap area at all.
Dynamic swap manager creates small swap files automatically on demand. It saves a lot of otherwise wasted disk space compared with using an oversized swap area which is mostly not going to be used. I imagine it should give another layer of randomization for any wear on top of the wear leveling we would already have built in to the flash memory too. I have not been able to notice any difference in system performance.
A downside is I don't think we can use hibernation with swap Space Manager, or it didn't seem to work for me the last time I tried.
Code:
sudo apt-get install swapspace
Then in addition to that I like to adjust swappiness to 0, That tunes the operating system to prefer to us all the RAM first and to only use the swap files as a last resort. Since RAM is much faster than swap, the added benefit is a small improvement in operating system performance, (your mileage may vary depending on hardware details).
Swap FAQ - Ubuntu Community Docs]
Linux Performance tuning - vm.swappiness - unixfoo.blogspot.com
What Is the Linux Kernel Parameter vm.swappiness? - Linux Open Source Blog
Code:
gksudo gedit /etc/sysctl.conf
Append this line to the bottom of the file,
The end result is a lean, fast system that can create swap files on demand but hardly ever needs to.
Bookmarks