Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently installed Xubuntu on my computer. I love the distro. Everything was fast, and then the bootup slowed down. It started taking a couple minutes for my user selected wallpaper to show and the menu to appear, basically do anything on the comp. I do not recall doing anything other than changing the swappiness. It did not affect it initially. Would that be something to affect it or are there other ideas that might have caused this sudden change.

share|improve this question

Yes, changing swappiness can slow down your computer. It is the threshold at which the system will swap data from the ram to the hard drive in order to preserve space. Data can be found, read and written much faster in memory than on the hard drive. Therefore it is best to keep data in memory and only swap to the hard drive when memory is very low. By default, swappiness is set to 60 and changing this value will determine how the system behaves in these situations.

Increasing this value will cause the system to swap more often. Even when it may be unnecessary. It will be more likely that the data you are seeking has been swapped out of memory. As I said earlier file manipulation is much slower on a hard disk so even simple tasks may take much longer than normal to complete.

Decreasing this value will cause the system to avoid swapping data to the hard disk. Sometimes this is recommended to increase performance but this could backfire if you have little ram to begin with. So, low ram combined with a low swappiness value can result in a system that will run out of memory quickly, while being reluctant to free memory through swapping.

I would recommend that you return the swappiness value to the default of 60. Monitor how the computer behaves. Hopefully you will see improvement.

share|improve this answer
Going to switch it back. I did find this though... – Bryan Oct 6 '12 at 1:28
Do you have Lightdm logs that look like that? – matt davis Oct 6 '12 at 1:33
I do not know how to check. – Bryan Oct 6 '12 at 13:15
It is located at /var/log/lightdm/lightdm.log. Any time you hear something about log files 99% of the time it will be in /var/log. Run 'gksu leafpad /var/log/lightdm/lightdm.log' in terminal to view it. – matt davis Oct 6 '12 at 14:29
Ok. Give me a bit. I reinstalled and now am getting grub rescue errors. Tried reinstalling and it is not reading the thumb drive. I reinstalled because I know it was caused by an update now. Was just trying to narrow it down. – Bryan Oct 6 '12 at 14:52

Decrease the swap use (very important!) 1.5. This is especially noticeable on computers with relatively low RAM memory (1 GB or less): they tend to be far too slow in Xubuntu, and Xubuntu accesses the hard disk too much. Luckily, this can be helped.

On the hard disk there's a separate partition for virtual memory, called the swap. When Xubuntu uses the swap too much, the computer slows down a lot.

Xubuntu's inclination to use the swap, is determined by a setting. The lower the setting number, the longer it takes before Xubuntu starts using the swap. On a scale of 0-100, the default setting is 60. Which is much too high for normal desktop use, and only fit for servers.

A detailed explanation can be found here (link dead? Then download this pdf file with the same content).

Now the how-to:

1. First make sure that you have installed the applications gksu and leafpad:

Menu button - Accessories - Terminal Emulator

Type (use copy/paste):

sudo apt-get install gksu leafpad

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

2. Now check your current swappiness setting. Type in the terminal (use copy/paste):

cat /proc/sys/vm/swappiness

Press Enter.

The result will probably be 60.

3. To change the swappiness into a more sensible setting, type in the terminal (use copy/paste):

gksudo leafpad /etc/sysctl.conf

Press Enter.

Scroll to the bottom of the text file and add your swappiness parameter to override the default. Copy/paste the following blue lines:

# Decrease swap usage to a more reasonable level

4. Close the text file and reboot your computer.

5. After the reboot, check the new swappiness setting:

Menu button - Accessories - Terminal Emulator

Type (use copy/paste):

cat /proc/sys/vm/swappiness

Press Enter.

Now it should be 10.

Note: your machine might benefit from an even bigger decrease in swappiness. A useful rule of thumb might be this:

1 GB RAM or more: set swappiness to 10
Less than 1 GB RAM: set swappiness to 5
share|improve this answer
but i think its better leave swapping to 60 because when you decrease swaping you also decrease disk cashe memory space . – user2849835 Oct 19 '14 at 16:30

I have xubuntu on a PC with 512MB RAM. It is slow, but it has improved a little after following this: I suggest the option described should be disabled by default on the next xubuntu versions.

share|improve this answer
Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – hhlp Dec 31 '12 at 12:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.