Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a new PC with a Samsung SSD830 with 256GB and installed Ubuntu 12 two weeks ago.

I checked the disk alignment, but that was correct.

From the first day it gets slower after a while of usage.

I see it at the build time of my project or with

dd if=/dev/zero of=/tmp/output bs=8k count=10k; I get after booting 400MB/s write speed, and when I feel it is slow it is around 1.5MB/s.

When I reboot the PC, it is fast again. Is it a hardware failure? Are there any other suggestions what I can try? (tried sync command when it was slow)

EDIT: I activated auto trim as well, and did a manual trim what did not help

UUID=7b198f7a-d783-4ff3-97a0-b06186d0bb8e / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1 UUID=8d937ac8-8286-4bf8-984d-69836d30ee88 none swap sw 0 0 tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0

I thought it may be the home directory encryption, but without it is still getting slow.

I looked with iotop while he was writing but only the dd command was shown

syslog contained no sda, dmesg output was

[    0.907090] sd 0:0:0:0: [sda] 500118192 512-byte logical blocks: (256 GB/238 GiB)
[    0.907137] sd 0:0:0:0: [sda] Write Protect is off
[    0.907138] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    0.907146] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    0.907732]  sda: sda1 sda2 < sda5 >
[    0.908058] sd 0:0:0:0: [sda] Attached SCSI disk
[    0.969494] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[    0.969499] EXT4-fs (sda1): write access will be enabled during recovery
[    1.580308] EXT4-fs (sda1): recovery complete
[    1.581925] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[    1.696890] Adding 16737276k swap on /dev/sda5.  Priority:-1 extents:1 across:16737276k SS
[    1.957517] EXT4-fs (sda1): re-mounted. Opts: discard,errors=remount-ro
share|improve this question

migrated from serverfault.com Nov 15 '12 at 18:44

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

    
It is possible that you may need to enable TRIM. –  Pedro Romano Nov 15 '12 at 20:38
add comment

2 Answers

Use preload to predict what programs will be most used

To install preload on Ubuntu, Linux Mint or debian based distributions

# apt-get update && apt-get install preload

Adjust swapiness if you have enough ram to make sure swap will not be used

To change swappiness setting:

$ su -
# nano /etc/sysctl.conf

And add this line into sysctl.conf file.

vm.swappiness = 10

There are more tips from this page that I found http://namhuy.net/1563/how-to-tweak-and-optimize-ssd-for-ubuntu-linux-mint.html

share|improve this answer
add comment

I suspect other processes are generating a lot of I/O that may cause it appear to run slow. A few things you can check in order to find that out:

  • Install iotop and check if other processes are generating a lot of I/O. Alternatively, install sysstat and run iostat -kxdN 1 to see what the load of the block devices is.
  • Check if your pc runs out of memory and starts swapping. Use top or other system monitoring tool to check your memory usage.

To check for hardware or driver failures, inspect dmesg and /var/log/syslog for entries about your device (for example sda). It may be hitting SATA bus errors or similar that may cause it to jump to a lower link speed.

share|improve this answer
    
iotop showed only the dd command with its 2MB/s :/ –  WebDev Dec 6 '12 at 15:02
add comment

Your Answer

 
discard

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.