Computer running very slowly under 13.04

After having some bouts with windows 8 I decided to throw it out and run Ubuntu as the main operating system.

Currently I am having some problems with performance:

Even when running the simplest tasks, such as logging in to the UI or console, or running apt-get upgrade, it takes a very long time, and the CPU fan is spinning at full speed. I run top, and the top application itself takes about 13%. As a comparison, if I run top on a 2007 Macmini also running Ubuntu 13.04, top uses about 0,5%. Cold-boot to login-prompt GUI takes minutes, compared to about 15 seconds on Windows 7 and less than a minute on the Macmini. Starting a terminal window by ctrl-alt-t takes perhaps 20 seconds, and even editing a command line has significant delays.

Question: How do I solve this performance problem?

I have installed Ubuntu 13.04 (64 bit) on an Acer Aspire 8951G on the 120 GB SSD in ext4 format, with a 32 GB swap on an HDD. Then, coming from a Windows environment, I started by doing an update: sudo apt-get update && apt-get upgrade. It also was very slow. I have 32 GB RAM installed (which works in the BIOS, Windows in Ubuntu). I have the most current BIOS (1.13) I could find on the Acer support site.

If I start partedmagic from the current ultimate boot cd, there is the same performance problem. If I try the partedmagic on another Acer I have (Acer Aspire V3-571G), there is the same performance problem. In Windows 7 that I had installed yesterday as the main operating system, there were no performance problems.

I tried hardinfo with results hardinfo. /var/log/syslog contains /var/log/syslog

More info 2013-05-30:

I tried Ubuntu Live USB-Stick 13.04 x86_64 on my:

Acer V3-571G (the one that was slow earlier with partedmagic) with the following hardinfo. Ubuntu was very responsive and I was happy with the performance on that computer. Here is the /var/log/syslog.

Acer Aspire 8951G (my problem-computer) with the resulting /var/log/syslog contents. I selected to try ubuntu from the stick. The system did not even get to the login screen before I gave up.

An interesting part from the end of the problem-syslog: timeout: killing 'keymap input/event, ------ rcu_sched self-detected stall on CPU, ------ BUG: soft lockup - CPU#3 stuck for 22s!

A memory test using Memtest86+ for several hours (1 iteration) passed ok.

I tried installing bumblebee and its suggested dependencies with no noticeable change in performance.

sudo powertop --time=60 --html produces the report PowerTop.html

Edit 2013-06-06:

grep Graphics /var/log/Xorg.0.log and cat /var/log/Xorg.0.log results are at paste.ubuntu.com

i cat /proc/cpuinfo | grep "cpu MHz" and cat /proc/cpuinfo results are also at paste.ubuntu.com


Solution 1:

I think you could have too much swap RAM configured. At a certain point, more swap RAM slows down the computer considerably. Maybe try keeping the RAM+swap to a reasonable level (not 64GB), except if you really need it. A good alternative would be to change the swappiness (how much the computer uses SWAP) to a lower level. The following command checks your swappiness.

cat /proc/sys/vm/swappiness

Swappiness is default at 60, meaning it will use your slower hard drive instead of your faster RAM a lot of the time. You can modify the swappiness with the next command, you will have to try around with the value a bit, maybe even set it to 0 (having 32GB of RAM is plenty):

sudo sysctl vm.swappiness=[enter value here]

However this works only for the current session. To change the swappiness on startup (when it really matters), you will have to edit a config file

gksudo gedit /etc/sysctl.conf

Find the vm.swappiness line; if none exists, add it.

vm.swappiness = [enter value here]

To use the settings without rebooting, toggle swapping

  sudo swapoff -a; sudo swapon -a

source: http://www.n00bsonubuntu.net/content/change-swappiness-settings/