Results 1 to 6 of 6

Thread: Ubuntu becomes slow after some time

  1. #1
    Join Date
    Jun 2014
    Beans
    2

    Ubuntu becomes slow after some time

    I've encountered this problem a few days ago. After some time of normal work (usually 5-30 min), Ubuntu 14.04 becomes extremely slow. ATOP shows that CPU is fullly loaded, but not by one specific process, but by all of them. E.g. if the music is playing, then CPU is loaded by player itself and pulseaudio, if the browser is opened, then CPU is loaded by browser etc. It looks like the CPU frequency is set to minimum, but executing "sudo cpufreq-set -g performance" helps nothing. Reinstalling the system from sсratch changes nothing as well.

    My PC:
    CPU : Intel® Core™ i3-2310M
    Graphics: Intel® Sandybridge Mobile
    Memory: 2GB RAM, 3GB swap

    Some screenshots from ATOP:
    http://oi58.tinypic.com/14j9lq9.jpg
    http://oi58.tinypic.com/2l9irnc.jpg
    http://oi58.tinypic.com/339otqa.jpg
    Last edited by alexander-l; June 21st, 2014 at 02:02 PM.

  2. #2
    Join Date
    Jun 2014
    Beans
    14

    Re: Ubuntu becomes slow after some time

    Quote Originally Posted by alexander-l View Post
    I've encountered this problem a few days ago. After some time of normal work (usually 5-30 min), Ubuntu 14.04 becomes extremely slow. ATOP shows that CPU is fullly loaded, but not by one specific process, but by all of them. E.g. if the music is playing, then CPU is loaded by player itself and pulseaudio, if the browser is opened, then CPU is loaded by browser etc. It looks like the CPU frequency is set to minimum, but executing "sudo cpufreq-set -g performance" helps nothing. Reinstalling the system from sсratch changes nothing as well.

    My PC:
    CPU : Intel® Core™ i3-2310M
    Graphics: Intel® Sandybridge Mobile
    Memory: 2GB RAM, 3GB swap
    I wonder if your problem is related to mine. I get *ALL* X Apps at full CPU usage, more or less evenly distributed, including DBUS, IBUS, all the running panel apps, even stuff thats sleeping. All of X dims to tell me that all applications are not responding ... and then it goes away in 15-20 seconds. I'm still working on how to record a screenshot since I can't use X while it happens!

    Similar?

  3. #3
    Join Date
    Jan 2014
    Beans
    67

    Re: Ubuntu becomes slow after some time

    Too much "swappiness," perhaps? I'm guessing, since I routinely reduce my "swappiness" with every new installation (but I have a very old, very low-powered computer). From this web site: https://sites.google.com/site/easyli.../first-xubuntu :

    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. 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.

    b. 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.

    c. To change the swappiness into a more sensible setting and improve the cache management as well, 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 and cache parameters to override the defaults. Copy/paste the following lines:

    # Decrease swap usage to a reasonable level
    vm.swappiness=10
    # Improve cache management
    vm.vfs_cache_pressure=50


    d. Close the text file and reboot your computer.

    e. 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
    Note that this is for Xubuntu, which is what I use. There's a page written about optimizing Ubuntu for SSD drives here, too, which might be useful.

  4. #4
    Join Date
    Nov 2011
    Beans
    1,310
    Distro
    Ubuntu Development Release

    Re: Ubuntu becomes slow after some time

    I may be wrong, but I don't believe "swappiness" should impact CPU use. Swap is all about substituting physical disk space for RAM when there is insufficient RAM available (something, of course, more likely to occur on hardware with low RAM).

    An exception, perhaps, might be possible if the swap algorithm is overwhelmed moving tiny packets to and from the swap partition due to swappiness settings. That's a guess, but it might be worth a look.

    i don't agree with suggestions to avoid swapping on low-RAM hardware.

  5. #5
    Join Date
    Apr 2014
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Ubuntu becomes slow after some time

    Avoiding swapping on low ram machines basically beats the purpose of using swap in first place. With OP's 2GB RAM, I suspect this has anything to do with SWAP all together.

    Especially when SWAP uses is zero in screen shot OP is posting.


    @OP, Are numbers from atop tallying up with system monitor? Is the behaviour consistent on different OS?

  6. #6
    Join Date
    Jun 2014
    Beans
    2

    Re: Ubuntu becomes slow after some time

    The system monitor shows full CPU load, but it can't even update the processes tab, when this problem occurs.
    As for now, Ubuntu is the only system on my PC, I'll try tomorrow installing something else.

    UPD. It seems like the problem was with power. The cable to notebook has three threads, one of which was brocken, I've soldered it, seems like everything is OK.
    Last edited by alexander-l; June 23rd, 2014 at 07:42 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •