I have a serious problem with my working station. Some time ago I bought a SSD disk. To this moment everything was ok, I had two HDD disks, copying files at speed around a 50-60 megabytes per second, no lags or performance issues. After I connect the SSD drive and reinstall system any operations on any disk is literally painful. No matter if I read data from any of disks, or write someting on it, the IOWait time pikes up to 100% CPU, whole machine freeze and data transfer is very low. The problem occurs regardless of what operations I doing and regardless of whether the SSD is involved. Even copying files from one USB pendrive to another cause massive lags. The problem did not exist until I plugged the SSD. SWAP partition is on SSD drive.

System spec:

CPU: AMD Phenom II 965 BE 3.4@4.0GHz
RAM: 12GB 1600MHz DDR3 (2x2 and 1x8) 
HDD: 500GB WD Green for storage and old 300GB Samsung for trash data
SSD: 120GB Samsung 840 EVO
SYSTEM: elementaryOS Luna @ Ubuntu 12.04

Linux Leader 3.11.0-18-generic #32~precise1-Ubuntu SMP Thu Feb 20 17:52:10 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux


UUID=9a3aeee3-da3c-494c-81a3-0fb9a2d0b0cb  / ext4 discard,noatime,nodiratime,errors=remount-ro  0 1
UUID=64c8d0c7-a70d-4a8a-803b-472bf0f368fe  /home ext4  discard,noatime,nodiratime  0 2
UUID=324b9dc2-e63d-4ffe-b77c-877470ab4492  /media/Storage  ext4  noatime,nodiratime  0 0
UUID=80d15662-997b-43b0-a36e-7b63c78e6ea3  none swap  discard,sw 0 0

/media/Storage/Wideo     /home/galmido/Wideo     none  bind  0  0
/media/Storage/Obrazy    /home/galmido/Obrazy    none  bind  0  0
/media/Storage/Muzyka    /home/galmido/Muzyka    none  bind  0  0
/media/Storage/Zdjęcia   /home/galmido/Zdjęcia   none  bind  0  0
/media/Storage/Pobrane   /home/galmido/Pobrane   none  bind  0  0

This screen was taken while copying files from one HDD (500GB WD, ext4) to second one (300GB Samsung, ext2). I barely managed to do it. At the end of the copying transfer dropped to about 10 kilobytes per second and whole machine freeze for about 10 minutes.



I just remembered that the problem has significantly increased after the system update a few months ago. I did not pay too much attention what packages have been updated, but the space available on the SWAP partition increased from 10GB to 16GB according to system monitor and then this problem becomes serious. I tried to rollback kernel version to old one but with no luck.

migrated from serverfault.com May 24 '14 at 13:11

This question came from our site for system and network administrators.

  • If you're lucky, it may still be possible to find which packages were upgraded. Look in /var/log/dpkg.log*. – a CVn May 24 '14 at 13:18

1) This is unrelated but remove the nodiratime from your fstab. noatime includes nodiratime as well so it's not necessary to add it a second time.
Also try to add ,commit=15 as an option to your ssd partitions. This basically tells them to send io requests in bulk every 15 seconds and thus speeds it up greatly. Keep in mind that if a sudden power loss occurs you might lose your last 15 seconds of uncommitted disk-writes

2) Use iotop OR glances to see what is causing the constant I/O. These tools will show you the current processes hogging your drives.

3) Use powertop and check the tunables tab. Specifically check if the power saving options for your ssd sata controller are enabled. If they are try to disable them and see if that changes anything. If you have a laptop and use laptop-mode-tools or similar power management programs they might have enabled a similar option that's causing all this delay.

4) If you still can't find the source of the problem also check /etc/udev/rules.d if you use udev and try to see what rules exist there. It might change a setting for some devices when they're plugged in and cause all these problems.

5) Try to add these settings to your sysctl.conf and load them afterwards and see if they make any difference.

vm.dirty_background_ratio = 10
vm.dirty_ratio = 10
vm.dirty_writeback_centisecs = 1500    
kernel.nmi_watchdog = 0  

and also do check errors.log, daemon.log and kernel.log in /var/log for possible errors what might show you what's wrong.


what is the value in your /proc/sys/vm/swappiness file?

Can you try to turn off swap space? By issuing

swapoff -a

Does IO comes back to normal?

  • I changed this value several times becouse I also thought it might have something to do with the SWAP. To be sure I tested all with zero load and swap off completely, there was no difference. LED drive light up like crazy and the whole system froze. Transfer speeds of 2-3 kilobytes per second can hang the whole system. Swapiness was initially 10, then i increased it to 20, 50, and now is default 60. – Galmi May 23 '14 at 8:45
  • Have you checked maybe fstab file and options for mount point to the problematic SSD? Maybe to add discard and noatime option? Although noatime is just for device metadata, but nevertheless you should give it a try. – Neven May 23 '14 at 13:03
  • A attached my fstab file in the first post :) – Galmi May 23 '14 at 13:13
  • Just for clarification, on SSD I have 3 partitions: 40GB rootfs, 70GB /home ext4 and 10GB SWAP. For most of time i use almost all my RAM memory and about 50-60% SWAP (ah, Chrome..). Swapping decrase performance much less than copying/moving files, theres no IOWait lag. When copying files it doesnt make any difference if I have almost zero RAM and SWAP used (~500MB), theres always a massive lag and up to 100% IOWait. – Galmi May 23 '14 at 13:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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