Ubuntu 14.04 works slow while copying files

6,409

Solution 1

Looking at the top output you provided in the comments you have one problem (not enough cache memory) that can be divided into two sub-problems:

  1. chromium.
  2. compiz

The cheap solution:

  1. Easiest to solve. Chromium is known to be a memory hog: uninstall it and use FireFox instead.
  2. A bit more complex to solve.

    a. Make a system backup! If you don't know how, read What's a good backup strategy for 1 PC (You've now officially become user type 4 instead of being user type 3)

    b. sudo apt-get install compizconfig-settings-manager (aka CCSM)

    c. Go to the dash and type "Compiz" and the CCSM icon should come up.

    d. And now it's up to you: turn off anything you don't use! E.g. if you don't use multiple desktops, turn off "Expo" and "Desktop wall" (and that's why you have to take a back-up: you're on your own here; I don't know what you use and what not)

The expensive solution

Buy more RAM. Double it (at least). :-(

Solution 2

Just do these things

sudo -H gedit /etc/sysctl.conf

Now add these lines at the end of this file

vm.dirty_background_ratio = 5
vm.dirty_ratio = 10

Now save and exit

Then again type in terminal:

sudo sysctl -p

Press enter and whoaaa! It's done: no more lag.

Share:
6,409

Related videos on Youtube

Sunil Kumar
Author by

Sunil Kumar

Updated on September 18, 2022

Comments

  • Sunil Kumar
    Sunil Kumar almost 2 years

    I have a lenovo laptop with ubuntu 14.04 (64 bit) installed on it. It has Intel® Core™ i3-3110M CPU @ 2.40GHz × 4 processor, 4 GiB ram and Nvidia 635 M graphics card. The system works fine under normal operations but it lags, stuck a lot during copying files. Earlier I was using 13.10 and no such problem was with with. Any help would be appreciated.

    • shellter
      shellter over 9 years
      you need to be more specific about what you mean by lags. Also, did you look at what processes are running on your system. I'm no expert, but it seems that each new version of Ubuntu adds more and more background processes that are "features". You may have to do some research to decide which, if any processes, you can do without. (Not easy I know!), Good luck.
    • Sunil Kumar
      Sunil Kumar over 9 years
      @shellter Thanks for quick reply. While copying, mouse freezes for few seconds at place while hovering on screen. Even opening home folder takes lots of time. I'm not sure, is it problem of software or hardware. And as you said pointing out less significant processes is really tough. If you want I can post a snapshot of output command 'top'. But I don't think background processes are responsible for it as it has been just a week since I installed the OS.
    • Fabby
      Fabby over 9 years
      Post it to paste.ubuntu.com and provide a link back here...
    • Sunil Kumar
      Sunil Kumar over 9 years
      @Fabby Here is the link: paste.ubuntu.com/9693008
    • Fabby
      Fabby over 9 years
      What kind of Internet connection are you using? Were you downloading a bunch of files while doing this? A ton of tabs open in Chromium?
    • Sunil Kumar
      Sunil Kumar over 9 years
      @Fabby 3G mobile broadband. No general net surfing.
  • Sunil Kumar
    Sunil Kumar over 9 years
    I started to use firefox and one more thing that I did seem to resolve the problem. I updated the kernel to 3.16.0-28-generic and copied bunch of heavy files and things went fine. I'll try CCSM too, it may improve performance further. Cheers.
  • Surya Teja Karra
    Surya Teja Karra almost 8 years
    can you elaborate what is happening? what are those values and what do they do?
  • R.k. Anand
    R.k. Anand almost 8 years
    vm.dirty_ratio – The highest % of your memory that can be used to hold dirty data. If you set this to a low value, the kernel will flush small writes to the disk more often. Higher values allow the small writes to stack up in memory. They’ll go to the disk in bigger chunks. vm.dirty_background_ratio – The lowest % of your memory where pdflush is told to stop when it is writing dirty data. You’ll want to keep this set as low as possible. Read more here: major.io/2008/08/07/reduce-disk-io-for-small-reads-using-mem‌​ory