Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've recently obtained a Samsung EVO 840 1TB SSD as a hard disk replacement for my laptop (Lenovo X220t, core-i5-2520m, 8GB RAM). So far, I'm not impressed with the resulting performance and request some hints on what to try.

I've formatted the drive to have a 1GB boot partition and another partition taking the rest.

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
96 heads, 32 sectors/track, 635913 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf3e3717f

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            3072     2101247     1049088   83  Linux
/dev/sda2         2101248  1953524735   975711744   83  Linux

The second disk is encrypted using luks and aes-xts-plain64.

> cryptsetup status cryptoroot
/dev/mapper/cryptoroot is active and is in use.
  type:    LUKS1
  cipher:  aes-xts-plain64
  keysize: 512 bits
  device:  /dev/sda2
  offset:  6144 sectors
  size:    1951417344 sectors
  mode:    read/write
  flags:   discards

On top of that, there is LVM with the logical partitions.

> vgs
  VG   #PV #LV #SN Attr   VSize   VFree  
  ssd    1   6   0 wz--n- 930.50g 639.00g
> pvs
  PV         VG   Fmt  Attr PSize   PFree  
  /dev/dm-0  ssd  lvm2 a--  930.50g 639.00g
> lvs
  LV   VG   Attr      LSize   Pool Origin Data%  Move Log Copy%  Convert
  home ssd  -wi-ao--- 250.00g                                           
  root ssd  -wi-ao---   2.50g                                           
  swap ssd  -wi-ao---  10.00g                                           
  tmp  ssd  -wi-ao---   4.50g                                           
  usr  ssd  -wi-ao---  20.00g                                           
  var  ssd  -wi-ao---   4.50g

AES-NI is active and "cryptsetup benchmark" delivers 900-1000MB/s for aes-xts-512 in both directions.

The system is not a fresh install but the old system was migrated using "cp -a", so there was no image-copy of the old filesystems. Now everything does feel a little faster but so far I'm not impressed. Opening iceweasel still takes 4-5 seconds, pycharm with a relatively small project requires about 20 seconds to startup.

I was running bonnie++ to see the raw performance on the filesystem itself with the following results:

Version      1.97   ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
laptop       16000M   511  99 464061  50 212554  20  3191  99 646813  20 +++++ +++
Latency             39861us     688ms     647ms    3317us    2593us    2161us
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files:max:min        /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
laptop          128 81349  87 +++++ +++ 71014  63 83195  85 +++++ +++ 59378  56
Latency             81014us     505us     111ms   79458us      14us     114ms

The values for block-wise read and writes look great with 450MB/s and 650MB/s. However, per-character seem really slow with just 0,5MB/s and 3MB/s.

However, I lack a reference to really judge these values. I've seen other machines with a SSD where opening a browser basically happened instantly, similar thing with eclipse of pycharm and I'm wondering why my system does not 'fly' like this. Did I accidentially introduce a huge performance hog somewhere? Or are the numbers fine and my problem lies elsewhere?

share|improve this question

There are two more things you need to do in order to get TRIM working in this particular setup.

  • Make sure you have the discard option set in /etc/fstab for your filesystem.

  • Edit /etc/lvm/lvm.conf and change issue_discards = 0 to issue_discards = 1.

After doing this, restart the computer and run fstrim manually to clean up.

Firefox is always slow to start up, so I wouldn't worry too much about that. The same is true of almost anything that's large enough that it does a lot of work behind the scenes while starting. Watch your hard drive LED. :)

share|improve this answer
I've seen remarks in Gentoo docs that discard (manually configured in /etc/fstab) is not recommended, not sure why. – Pavel Šimerda Feb 5 '15 at 14:43

Your Answer


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.