Linux Mint 12 LXDE - RAM tuning

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Linux Mint 12 LXDE - RAM tuning

Postby nunol on Tue Mar 06, 2012 3:02 pm

Edit: it's difficult to edit big posts so I did a pdf with a new version based on the final release:
Mint12LXDE_tuning.pdf
Linux Mint 12 LXDE - RAM tuning
(135.13 KiB) Downloaded 1747 times


I was always forgetting how to save some RAM on Linux distros. A google search finds many tips but I wanted a place where I could find all the available tips together. I decided to collect every RAM saving tips I could find but that was not enough because every time I changed distro some tips would not work or apply. When Mint 10 LXDE arrived I installed it on many older computers and decided to write a tuning guide for myself so I would not forget a tip or how to do it. The collection of tips and links was in Portuguese and English but when I did the same for Mint 11 LXDE and now for Mint 12 LXDE I decided to do it only in English. If you find any typos, problems with English grammar and any mistakes please let me know so I can fix, any feedback is appreciated.

Seppalta, a Mint Forum user has a very nice "Guide To Setting Up LXDE, The Lightweight Champion" viewtopic.php?f=175&t=90201 and bimsebasse, another Forum user has a very nice "Mint 12 Tips & Tricks Guide" viewtopic.php?f=42&t=86813. Guides allow for a user to make better use of a Mint release and more should be available! A guide to make Mint 12 LXDE use less RAM and run faster could be useful for other Mint users so I decided to share it here. Not everything it's LXDE or Mint specific and may also work with other distros, DE or WM.



- Mint 12 LXDE Min. recommended CPU, RAM and HDD: PIII, 256MB of RAM, 4GB HDD*.
With 256MB Firefox will swap a lot in many heavy sites (ex: http://www.tomshardware.com, etc) and it's difficult to run other programs at the same time.
With some tuning you can save some RAM (over 50MB if necessary) and zram can help on some situations.
See thrashing: http://en.wikipedia.org/wiki/Thrashing_ ... science%29
*4GB is necessary for the RC installer, 3GB may work in the final if the installer is fixed.

- Mint 12 LXDE Recommended CPU & RAM: PIV, 512MB of RAM or better.
With 512MB of RAM or more Mint 12 LXDE should work fine for browsing with Firefox and it's possible the run several programs at the same time without thrashing or significant swap utilization.



Notes about Mint 12 LXDE:
- Mint 12 LXDE RC was used for tests, the final may have some small differences.
- Mint 12 LXDE needs a i686 CPU. CPU's with only i486 or i586 support will not work. A PII should work (did not test... yet) but it's slower than a PIII and videos on Youtube became slide-shows...
- For i486/i586 CPU's use Debian LXDE/Openbox/Fluxbox i486, Puppy Wary, AntiX i486, etc. Mint XFCE is i486 but it's heavier than Mint 12/11/10 LXDE.
- It's possible to run Mint 12 LXDE with less than 256MB of RAM but to avoid heavy thrashing it's better to use a lighter and faster distro like Crunchbang, Debian LXDE, AntiX, Puppy, DSL, etc.
- If you don't have a 4GB disk it's better to use a smaller distro. Puppy needs less than 1GB for a full install, AntiX-base works with 2GB and Mint 10 LXDE with less than 3GB.
- Mint 12 LXDE uses zram for SWAP in the live mode (compression ratio during installation is about ~2x):
>512MB: no zram.
512MB or less: 50% RAM zram. With ~2x compression ratio uses up to 25% of RAM.
- If you have 320MB of RAM or less you could setup a SWAP partition before starting the installer but thanks to zram you can install with only 256MB of RAM and no swap partition.
- You can use Gparted from the live CD to create a swap partition and again, thanks to zram you can do this even with only 256MB of RAM. You can also use fdisk, (or cfdisk, parted, etc) mkswap and swapon to create a swap partition and the run Gparted to do everything else. Use "sudo fdisk -l" to see the disk, and "sudo fdisk /dev/sda" to create a partition, "sudo mkswap /dev/sda1" and "sudo swapon /dev/sda1" to create and turn on the swap.
- If you have 320MB of RAM or more you can install Mint 12 LXDE without worrying about SWAP, the installer will work that out for you. If you have enough RAM you don't need a SWAP but it's better to have one.
- A shared RAM graphics card uses your main RAM so you have less available for Mint LXDE. Depending on the amount of RAM shared that could be a problem for computers with only 256MB of RAM.



Mint 12 LXDE

Linux Mint 12 LXDE edition it's based on Ubuntu 11.10 (End of life: April 2013) and uses the Lightweight X11 Desktop Environment (LXDE), it's fast, light and simple but it's possible to do a lot with it as you can see in the "Guide To Setting Up LXDE, The Lightweight Champion" viewtopic.php?f=175&t=90201. If you don't need the extra features of other Mint Desktops Environments (DE) like the GNOME, KDE or XFCE or just want something faster for a slower computer you can try the LXDE version. Currently, on the same distro LXDE is lighter and faster than XFCE but heavier than Fluxbox or Openbox.

You can find more information about LXDE here: http://en.wikipedia.org/wiki/LXDE
You can find more information about other Desktop Environment (DE) here: http://en.wikipedia.org/wiki/Desktop_environment
Openbox is the Window Manager (WM) that LXDE uses by default, is light and fast:
You can find more information about Openbox here: http://en.wikipedia.org/wiki/Openbox
You can find more information about WM here: http://en.wikipedia.org/wiki/Window_manager

Linux Mint 12 LXDE is a i686 32-bit distro and the minimum recommended RAM is 256MB. Running a modern browser like Firefox 10 (Chromium and even Midory/Epiphany) with only 256MB of RAM causes a lot of thrashing on some sites (like http://www.tomshardware.com, etc) and doesn't allow for running other programs at the same time but with 512MB of RAM or more should work just fine. If you install a SWAP partition before running the installer you can install with less than 256MB of RAM but performance degrades a lot, it's usually better to use another distro.

Crunchbang, Bodhi, Archbang, Lubuntu and other lightweight distros use out of the box less RAM than Mint LXDE but the difference is sometimes to small to actually make difference. With some tuning Mint LXDE can lower the RAM utilization to the same level. AntiX and Debian LXDE use even less RAM and have i486 versions available. Puppy uses even less RAM than the already mentioned distros, it's a good option if you want a distro that's much lighter and faster than Mint LXDE and many versions are available: http://puppylinux.org/wikka/PuppyVersion. There are many more low RAM distros like Slitaz, Tiny Core linux, DSL, etc, it's impossible to list all.

If you have a graphic card with shared RAM you have some of the system RAM use by the graphic card and it means there is less RAM available for Mint LXDE. That's not a problem if you have plenty of RAM available but could be a problem if you only have 256MB of RAM and some of it is shared with the Graphic Card. I have a 256MB of RAM computer with 16MB shared and it's not a problem, on a VM the Mint 12 LXDE installer worked OK until only 208MB of RAM was available.

Linux Mint 12 LXDE has support out of the box for Bluetooth, printers, WIFI/3G networks, desktop icons and many more features that use CPU, RAM, disk space and even bandwidth during packages updates. It's nice to have all that already working and it's possible to do more (check Seppalta's guide). Some distros allow for some system features to be selected or deselected at install time or at first boot, Mint could use the installer, the welcome screen, a control panel or script to add, remove or fine tune some of the features.



Disclaimer: The use of the tips, is completely and entirely at your own risk. In no way can I be held responsible for damage of any nature, that may occur because of the aforementioned use.

Before starting, a few notes:
- I found many tips all over the web, old howtos in The Linux Documentation Project (http://tldp.org/), forums Debian/Ubuntu/Mint/Crunchbang/Arch/Fedora/etc, podcasts/screencasts, Blogs, webpages, etc. You should search the tips before testing them on your system to learn more about them. Google is your friend.
- I have use some tips many times but it doesn't mean they are safe to use on your computer. Some tips may break your system and are not easy to fix or reverse.
- If you are happy with your system there is no need to change it... why risk a system crash or even data loss?
- Before starting backup your data and make sure you can restore it. Remember to make more than one backup of your most important data just in case... you should check that you can restore your backup, retrieve the data and check the data integrity.
- HDD's, CD's, DVD's, tapes, USB pens and other backups don't last forever, if your data is important you need several backups of the same data.
- Backup config files before editing. When you edit a configuration file you should make a backup copy before so you can revert back to the original file if something goes wrong or you need to get a feature or service working again.
- To edit config files in a terminal use the nano editor (or another CLI editor like vi, etc):
Code: Select all
sudo nano file_name
. It's easy and it's usually already installed: http://www.debianadmin.com/nano-editor-tutorials.html if you don't want to use nano you can use leafpad, gedit or some other editor running "gksudo leafpad file_name" or "gksu leafpad file_name" or just "gksudo" or "gksu" and then choose your favorite editor and browse to the file and open it.
- To check RAM utilization you can use "free -m", "top", "ps aux", "htop", etc. If you want to use htop you need to install it with "sudo apt-get install htop". Both top and htop allow you to sort the tasks currently being managed by the Linux kernel by RAM usage, in top you have to press Shift-M and in htop you press F6 and select MEM%. With these tools you can see what tasks are running and how much RAM and CPU they use.
- To check HDD utilization you can use "df -m" or "df -h".
- To get the RAM utilization numbers from the tuning tips I installed Linux Mint 12/11/10 LXDE on a Virtualbox VM with 384MB of RAM. This should make it easy to duplicate the results. RAM utilization numbers are approximate and vary a lot.

Tip - Make backups!

I have a partition for data and it's divided by data importance like a class system so I backup important data more often. I also backup the OS (and data) partition with Clonezilla because it's faster than a OS reinstall.

Tip - Use Clonezilla to do a disk (or partition) image for fast restore of the system and data backup.

Clonezilla may look difficult to use but it's not and allows for fast system recovery, much faster than a reinstall. Because I also do separate data backups I have at least two different data backups. There are many tutorials on Clonezilla, here are the top 4 from a google search:
http://www.youtube.com/watch?v=k12X1Tii ... ature=mhw4
http://www.dedoimedo.com/computers/free ... tware.html
http://geekyprojects.com/cloning/how-to ... -tutorial/
http://www.howtoforge.com/back-up-resto ... zilla-live

Tip - You should test the tips on a test machine or Virtual Machine to avoid problems on your main OS.

- To test the tips I used VM's, several test machines or a second OS it's faster and safer than using your main OS and you can test more scenarios.
- Clonezilla is a big help if you make a mistake that you can't fix or to revert to a previous state, fast system restore. On a VM you can use snapshots.
- if you test distros a lot use a test machine or a Virtual Machine so speed up the tests.
- Consider to have at least two systems available so you can fix one from the other and have a working system at all times. A working Live distro (CD, DVD, USB pen) is usually enough.

Tip - Choose the tips you are going to use, not all are worth the loss of functionality and some may not work at all for your system.

- Not all tips save enough system resources to make a significant difference but they add up.
- Most tips are a trade off between functionality and speed or less RAM usage but if you don't use a feature/program/service/etc why leave it in?
- Try to identify what component makes your computer slow and try to improve that first. Usually it's lack of RAM, a slow CPU's, a slow HDD, etc but sometimes it's just a driver issue or another problem.

Before installing Mint LXDE there are a few things that we can do to help performance. I will leave the partition layout for your own consideration and instead focus only on one partition for Mint LXDE and another for swap because there to many options. The Mint installer will take good care of these things for you but you may prefer the option for manual control. Installed, Mint 12 LXDE requires less than 3GB of disk space but it's better to have more for upgrades, programs and data. The Mint 12 LXDE RC installer needs a 4.0GB HDD or bigger to install.

Tip - Think about partition layout before installing.

- On low RAM computers install the SWAP on the fastest part of the disk because that partition is going to be used a lot. On a HDD that is on the left in Gparted, but you can benchmark your disk to see how it performs. SSD's and other flash based media usually have constant performance and very little access time so partition position is almost irrelevant from a performance point of view.
- While a SWAP partition it's not needed if you have enough RAM the SWAP should be 1-3x the system RAM so you can swap without running out of swap space. Usually, if there is enough disk space I use 2-3x but I find that I rarely use more than 0.5x and that already is very slow, especially with slow laptop HDD's.
- If you have more than one disk you should setup a SWAP partition on every disk as the Linux kernel will stripe the swap reads and writes across every disk. Having the system on one disk and the swap partition on the other also works well if you use the swap a lot.
- If you have more than one OS, install the one you use more on the fastest part of the disk. If you are going to use any partition a lot you should consider creating it on the fastest part of the disk.
- You can only have 4 primary partitions (msdos partition table), if you want more partitions you need to delete one of the 4 primary partitions, create a extended partition and inside the extended partition you can create new logical partitions.
- You can use Gparted that is available in Linux Mint 12 LXDE live for shrinking, moving, deleting and creating partitions. After the install you have to install Gparted from the Software Manager.

Tip - Use ext4 for your file system with some mount options for better performance.

- Unless you are using a fast SSD the HDD is usually the slowest part of the computer, try to improve the file system performance any way you can, it's a balance between performance and data reliability.
- ext4 already is the default file system for the Mint installer (others file systems are available) but ext4 it's mounted without any performance enhancements. Several are available (http://www.kernel.org/doc/Documentation ... s/ext4.txt)
- I don't need very high reliability for my desktop systems so I use the ext4 file with some mount options: "noatime", "barrier=0", "commit=100", etc. Search google for "ext4 tuning" for more options. Here is one: http://blog.smartlogicsolutions.com/200 ... rformance/
- Sometimes I use ext2 with "noatime" because it's easier to setup than journaless ext4 (http://fenidik.blogspot.com/2010/03/ext ... urnal.html).
- You can also recover some ext4 space that is reserved (the Debian installer allows this at install time): http://blog.flexion.org/2010/01/07/reco ... pace-ext4/

Here are some tips for after install:

In the Mint 12 LXDE RC installer the autologin option doesn't work, that's expected to be fix in the final but you can see here how to fix: viewtopic.php?f=175&t=85203#p546639

After install the "Welcome to Linux Mint" screen, has plenty of information and it's a good place to start but it takes a lot of RAM.

Tip - Disable the "Welcome to Linux Mint" screen to save ~35MB of RAM. If you need it again it's in the preferences menu or run "mintwelcome" at a terminal window.

Remove the tick from the "show this dialog at startup" option on the "Welcome to Linux Mint" screen and closed it. Now, before updates and everything else it's time a good time to do some modifications to the "/" file system to get more performance.

Tip - Edit /etc/fstab and add your favorite mount options to your file system. For ext4 I use: "noatime" or "noatime,barrier=0,commit=100" (or any other you want).

To make this options work you have to reboot. Now we can update the system, we need at least a level 1 and 2 updates, level 1-3 is the default but usually I do all levels (1, 2, 3, 4 and 5). Doing only level 1 and 2 it's faster and saves a lot of downloads. At the time of my last Mint 12 LXDE install a level 1 and 2 update was 43MB and a level 1-5 update was over 150MB with the kernel update.

After the update RAM and HDD utilization in MB with "free -m" and "df -m" was:
RAM: 104MB (0MB SWAP) This is the RAM used without buffers and cache.
HDD: 2980MB (on /dev/sda1) this is the disk space used after level 1-5 updates.

Mint 10 LXDE uses about 85MB of RAM and Mint 11 LXDE uses about 135MB in the same scenario. That's because Mint 10 LXDE doesn't have the two update-managers issue, the zeitgeist*, etc. The Mint 11 LXDE problems can be fixed (it's a duplication between the autostart file and directory) and the kernel 2.6.38 has several improvements that help performance like zram and "The ~200 Line Linux Kernel Patch". So far Mint 12 LXDE looks good!

Tip - Use "sudo apt-get clean" to get some of your disk space back.
Code: Select all
sudo apt-get clean



The apt-get clean command removes all packages from the package cache. The system is now using 2760MB of disk space, you save about 200MB. That's about 300MB more than Mint 11 LXDE and 500MB more than Mint 10 LXDE. If you reboot a lot there are a few things you can do to speedup the boot to the desktop:

Tip - Lower the Grub menu countdown to only one second.

Set the Grub menu delay to 1 second (or 0) with StartUp Manager. I like to set it to 1 second so that the Grub countdown will stop with any key press but if you set it to 0 seconds you can press the Shift key to get to the Grub menu. Pressing the Shift key not always works and you may have to reboot and try again so I rather leave it at 1 second.

Tip - Use autologin if you need to get to the desktop faster.

Edit file /etc/lxdm/lxdm.conf and /etc/lxdm/default.conf and make your user "=" to autologin.

A way to improve performance is to install and use faster and lighter applications, Mint LXDE comes with Firefox by default and that is a big browser, there are lighter browsers like Midori and Epiphany and even lighter like Dillo and w3m (w3m is a text-based browser). Firefox uses over 10x more RAM than Dillo or w3m but also works better and has more features, I need to use Firefox on some sites but for others I can use Dillo or w3m. You can do the same for other apps like music players, torrents, chat, word processors, etc. Using CLI apps when possible saves a lot of RAM and CPU usage. Here are a few favorite light and fast apps from the Arch Linux Forum:
2010: https://bbs.archlinux.org/viewtopic.php?id=88515
2011: https://bbs.archlinux.org/viewtopic.php?id=111878

Tip - Use lighter and faster programs if possible.

Another way to improve performance is to change some system options, I find that by default my low RAM computers start using the SWAP partition when they still have plenty of RAM left. That's bad because the computer is very slow when uses the swap. Sure, the RAM it's used for cache but on my computers performance is a lot worst because of thrashing than because of the lack of cache. To change that behavior we can change the swappiness from the default value of 60 to a smaller value like 10 with "gksudo leafpad /etc/sysctl.conf" and add "vm.swappiness=10" to the last line (without the ""). There are more options like vm.vfs_cache_pressure that you can also use. More info on SWAP here: https://help.ubuntu.com/community/SwapFaq

Tip - Lower swappiness from 60 to 10 (or 5 to 20). Play around with vm.vfs_cache_pressure if you want more options.

Another way to improve performance is to remove stuff that you don't need or use often. If the computer is really slow I install two OS, one with everything I need (Bluetooth, Printer support, network-manager for easy WIFI/3G, etc) and only use it when that is necessary and another with only the essential for every day use. The lighter distro is a Debian/Ubuntu based LXDE, Fluxbox or Openbox (sometimes Puppy) distro and the heavier distro the current Mint main edition. Sometimes I don't need the printer, Bluetooth, etc for weeks so I can enjoy a faster system and anly use the heavier distro for a few hours. Mint LXDE has a lot to remove or disable to free computer resources like RAM and CPU.

Let's start by removing a few things:

Tip - Remove mint-fortune from running when you open a terminal.

I like mint-fortune so I leave it on but it runs every time I open a terminal and on a slow system that already is using some swap it's slow. You can remove it with "gksu leafpad /etc/bash.bashrc" and remove the last line (/usr/bin/mint-fortune) or comment it out with "#". If you want it back you can add the last line again or if you want you can run "mint-fortune" on a terminal at any time. In Mint 12 LXDE the Mint-fortune doesn't work but the line for it is in the /etc/bash.bashrc.

You can use "top" (and press "Shift-M") to see what is using more computer RAM. Xorg is necessary but Mintupdate is using a lot of RAM and you only need that to check it once every week or so, not on every boot!

Tip - Remove mintupdate from autostart to save ~15MB of RAM.

On Mint 11/10 LXDE you have to use nano or gedit "gksu gedit /etc/xdg/lxsession/Mint-LXDE/autostart" to remove the mintupdate-launcher but on Mint 12 LXDE you have to go to the directory /etx/xdg/autostart and rename the mintupdate.desktop file to something else like mintupdate.desktop.bk and reboot. This removes mintupdate and now RAM usage after boot it's 88MB of RAM (~105MB for Mint 11 LXDE and ~70MB for Mint 10 LXDE).

Tip - Remove zeigeist-core and libzeitgeist-1.0-1 to save about 10MB of RAM after the second reboot.
Code: Select all
sudo apt-get remove zeitgeist-core libzeitgeist-1.0-1


Run "sudo apt-get remove zeitgeist-core libzeitgeist-1.0-1" to remove the zeitgeist-daemon and zeitgeist-datahub. Reboot twice to save 10MB (first boot saves only about 5MB). The system is now using 78MB of RAM after boot. Using top you can see what else is using RAM on your system that you don't use and remove it. For me, it's bluetooth because I don't use it on older computers.

Tip - Remove bluetooth.
Code: Select all
sudo apt-get remove libbluetooth3


Run: "sudo apt-get remove libbluetooth3" and clean the autostart file or/and directory from the bluetooth stuff.

I also don't use cups (printer support) so let's remove that also:

Tip - Remove cups.

From the same file/dir as before remove the "@system-config-printer-applet" and run "sudo apt-get remove cups hplip system-config-printer-common". Now RAM utilization it's ~75MB (~63MB on Mint 10 LXDE, ~77MB Mint 12 LXDE).

Mint LXDE and other distros have a autostart directory (/etc/xdg/autostart) where you have several programs that are setup to autostart with your system. LXDE also has a autostart file for the same thing, this file changes location with the Mint LXDE releases but it's always inside /etc/xdg/lxsession. In Mint 12 LXDE is at /etc/xdg/lxsession/Mint-LXDE/autostart. You can remove a few things from the autostart file/dir to save more RAM.

Let's remove a few autostart options if you don't need them "@mintwelcome-launcher", "mintUpload", "@xscreensaver", "gnome-power-manager", the jockey line, the gnome power manager, the notifications and the screensaver: "sudo apt-get notify-osd notification-daemon xscreensaver"

Tip - Remove mintwelcome-launcher, mintUpload, xscreensaver, gnome-power-manager, the jockey, notify-osd, gdu-notification-deamon and the xscreensaver.

RAM utilization is now ~71MB (72MB Mint 11 LXDE, 55MB Mint 10 LXDE).

Let's also remove a few tty's as I only need one or two (tty1 and tty2), run "sudo nano /etc/init/tty3.conf", put "#" before the start, stop, respawn and exec lines, do the same for tty4, tty5 and tty6 to leave just tty1 and tty2 working.

Tip - Remove tty3, tty4, tty5 and tty6.

RAM utilization it's 71MB (71MB Mint 12 LXDE). The last tip doesn't save much RAM.

Tip - Remove the ability to have icons and wallpaper by PCManFM.

Remove the "@pcmanfm --desktop" line from the autostart file to save ~10MB.

Reboot and RAM utilization it's 62MB (65MB Mint 11 LXDE, 51MB Mint 10 LXDE). This is another tip that saves some RAM.

If you don't need network-manager to setup the wifi or the 3G network you can remove it. Remove the "@nm-applet" line form the autostart and the network-manager: "sudo apt-get remove network-manager modemmanager" and if you are connected with ethernet you can setup the network with interfaces, edit /etc/network/interfaces and add a line with "auto eth0" and another with "iface eth0 inet dhcp" for auto dhcp.

Tip - Remove network-manager to save ~10MB.

Reboot and RAM utilization is ~52MB (51MB Mint 11 LXDE, 44MB Mint 10 LXDE). This is another tip that saves some RAM. We started with 104MB of RAM and have now reach half of that, 52MB of RAM!

There are other things you can remove that don't save much RAM. Run "sudo apt-get purge gnome-keyring apt-xapian-index vino" and reboot.

Tip - Remove gnome-keyring, apt-xapian-index and vino.

Use "initctl list | grep running" to find services you don't use ("initctl list" to see all) and remove them! You should learn about the service before removing it or at least test ii first. Services I sometimes remove are: avahi-deaemon, nmbd, smbd, acpid, ufw, atd, cron, rsyslog, etc.

Tip - Remove services you don't use to save ~5MB.

To remove a service run "sudo service avahi-deaemon stop" and "echo manual | sudo tee -a /etc/init/avahi-daemon.override". In this case you could also run "sudo apt-get remove avahi-daemon". Other examples: "sudo service nmbd stop" and "echo manual | sudo tee -a /etc/init/nmbd.override", "sudo service smbd stop" and "echo manual | sudo tee -a /etc/init/smbd.override", etc. I found the "sudo tee -a /etc/init/nmbd.override" on a recent Vincent Vermeulen post.

With some services removed RAM usage is ~47MB of RAM, less than half of what we started with, about 57MB of RAM saved.

You can make a list of what you have in your system "dpkg -l" and remove everything else you don't need. If you remove everything from the startup dir/file and /etc/init you get a very bare bones LXDE system. If that is what you want it's better to start with a minimal Debian or Ubuntu install and build up or forget LXDE and try something with Openbox, Fluxbox or some other lightweight and fast WM.

Another way to improve performance is to install programs that make a better use of the computer resources like a newer kernel and others but rarely there is one that improves so much as zram.

Tip - Try zram to avoid thrashing to the HDD, lzo compressed RAM should be faster.

zram improves performance a lot on low RAM computers. The compression ratio for what the system puts on the zram swap is about 2x but for Firefox 10 it's close to 3x. Because what you put in to zram is compressed it takes a smaller amount of RAM than the actual zram size so a 120MB zram may only use 40-60MB of actual RAM for 2-3x compression. With zram you can improve performance if you swap to zram instead of the mechanical HDD but once zram is full the HDD swap is used. On 256MB computers a 128-160MB zram is quite a improvement when surfing the web with Firefox but it's easy to fill. You can test a 128MB zram block for swap with:
modprobe zram
echo $((128*1024*1024)) > /sys/block/zram0/disksize
mkswap /dev/zram0
swapon -p 100 /dev/zram0
And you can check zram utilization with "swapon -s" or with "cat /sys/block/zram0/compr_data_size" or any other available Statistic. See here more information: http://shmilyxbq-compcache.googlecode.com/hg/README

Other programs, tips and webpages that may help you get more performance out of your distro/computer but I didn't test:
- e4rat: https://wiki.archlinux.org/index.php/E4rat and http://e4rat.sourceforge.net/
- preload: http://techthrob.com/2009/03/02/drastic ... h-preload/
- https://wiki.archlinux.org/index.php/Ma ... erformance
- https://help.ubuntu.com/community/Insta ... orySystems
- https://docs.google.com/document/d/1Kzz ... edit?pli=1
- http://hackaday.com/2011/08/12/installi ... 86-laptop/
- http://www.bigwebmaster.com/General/How ... ptops.html
- etc

If you have more I will add.



I would like to have your feedback about:
- Your tips for improving Mint 12 LXDE, what packages you remove/add, what file system and mount options you use? How and why?
- Your tips for LXDE, Openbox and Fluxbox tuning.
- Good apps for LXDE, Openbox and Fluxbox distros.
- I don't know if removed some packages/services properly, if you know a better way please share!
- A way to setup e4rat on Mint LXDE as I failed my attempts. Did not test so don't no if e4rat is any good.
https://wiki.archlinux.org/index.php/E4rat and http://e4rat.sourceforge.net/
- Any file system compression that you use to gain disk space or performance (ext2, btrfs lzop/gzip, ?ext3?, ?ext4?, other).
- Any kernel modifications you are using to improve performance that may be useful to others.
- Any typos, problems with English grammar and any mistakes please let me know so I can fix.

Hope this tuning guide is useful.
User avatar
nunol
Level 9
Level 9
 
Posts: 2664
Joined: Sun Mar 06, 2011 9:25 pm
Location: Portugal

Linux Mint is funded by ads and donations.
 

Re: Linux Mint 12 LXDE - RAM tuning

Postby rajuvembala on Thu Mar 29, 2012 12:58 pm

:D Great tutorial
One small tip from me
You can use boot up manager to disable unwanted services(I am not sure of the term services)
Code: Select all
sudo apt-get install bum
aham brahmasmi
rajuvembala
Level 1
Level 1
 
Posts: 11
Joined: Tue Jul 27, 2010 12:21 pm

Re: Linux Mint 12 LXDE - RAM tuning

Postby Ikem on Thu Apr 12, 2012 5:05 pm

nunol wrote:I use the ext4 filesystem with some mount options

I won't trade reliability for performance.
Ikem
Level 1
Level 1
 
Posts: 48
Joined: Tue Oct 25, 2011 12:29 am


Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 7 guests