You are not logged in.

#1 2010-04-25 10:28:07

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,838

How to make SSD's faster

Hi,

http://blog.wolffmyren.com/2009/03/17/y … esomeness/   

I have been running Arch on my 16gb SSD [Aspire One] for a few days now noticing a little lag on starting apps [Firefox] and pauses

/ & /home are ext4... using swap file [would like to get rid of it!]

scheduler is noop

hdparm -t /dev/sda gives 108 MB in 3.01 seconds 35.86 MB/sec

Followed most of the tips in wiki

But can I do more?


Mr Green

Offline

#2 2010-04-25 13:42:48

bk201
Member
Registered: 2010-04-21
Posts: 8

Re: How to make SSD's faster

iirc ext4 has a mount time option to enable trim support, have you enabled this in fstab?

EDIT: The option is discard/nodiscard.

Last edited by bk201 (2010-04-25 13:45:57)

Offline

#3 2010-04-25 15:05:17

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,838

Re: How to make SSD's faster

added default,noatime too fstab will read on those options


Mr Green

Offline

#4 2010-04-25 19:51:30

Emeric
Member
From: France
Registered: 2009-03-18
Posts: 30
Website

Re: How to make SSD's faster

I recently bought an intel X25-M 80go ssd, and I am also looking to get the very best of this amazing little device.
I am using ext4 with noatime, discard option, deadline elevator.

"hdparm -t /dev/sda" give me 260Mb/s (niiiice)

Two questions to make it faster :
- How can we check partition alignment ? I use parted to create partitions with start and en sectors multiple of 8, but I am not sure if it is the right way.
- Is noop really the best scheduler for ssd ? Some people say that it is better to stick with deadline, some even say to keep cfq...

This ssd is so fast, it is hard to try new settings, because the result is always "wow, that's fast" :-)


"If you're not a part of the solution, there's good money to be made in prolonging the problem"

Offline

#5 2010-04-25 20:50:01

Spacenick
Member
From: Germany
Registered: 2010-04-02
Posts: 168

Re: How to make SSD's faster

How much RAM do you have, with anything above say 2 GB you can probably live without a swap partition unless you really use your mashine very heavily. It should basically be save to remove it

Offline

#6 2010-04-26 04:59:28

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,838

Re: How to make SSD's faster

I have 1gb of ram and set up a 512mb swapfile for the moment

Man your drive sounds fast will change to deadline see if it makes any difference

MrG


Mr Green

Offline

#7 2010-04-30 08:52:31

robbel
Member
Registered: 2006-05-17
Posts: 9

Re: How to make SSD's faster

Emeric wrote:

I recently bought an intel X25-M 80go ssd, and I am also looking to get the very best of this amazing little device.
I am using ext4 with noatime, discard option, deadline elevator.

"hdparm -t /dev/sda" give me 260Mb/s (niiiice)

Hi, I just bought the same HD and tried it in my laptop with kernel 2.6.32 (no discard option available for that kernel).

somehow, I max out at ~110MB/s and that is with the cfq scheduler!
for the cached test (hdparm -T /dev/sda) I get around 6000 MB/s though.

any idea what may be causing my laggy performance for the first test?

Thanks so much,
Philipp

Offline

#8 2010-05-01 10:57:21

Emeric
Member
From: France
Registered: 2009-03-18
Posts: 30
Website

Re: How to make SSD's faster

Well I don't really know why your drive is not as fast as mine sorry.
Did you align your partitions ? Also cfq is heavily optimised for classical hdd with spinning drives, not ssd. You should use deadline, or maybe noop if you have a slow cpu.

There is some interesting links about partitions alignement :
http://www.nuclex.org/blog/personal/80- … d-on-linux
http://blog.aloisiojr.com/?p=28

And more tips for ssd :
http://www.ocztechnologyforum.com/forum … post373226

If anyone have more informations or tips about ssd I'm interested !


"If you're not a part of the solution, there's good money to be made in prolonging the problem"

Offline

#9 2010-05-01 11:36:06

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: How to make SSD's faster

robbel wrote:

Hi, I just bought the same HD and tried it in my laptop with kernel 2.6.32 (no discard option available for that kernel).

somehow, I max out at ~110MB/s and that is with the cfq scheduler!
for the cached test (hdparm -T /dev/sda) I get around 6000 MB/s though.

any idea what may be causing my laggy performance for the first test?

most pre-2010 laptops don't have chipsets that support 3Gb SATA (~250MB/s), yours probably is a 1.5Gb. this will only affect read-speed though, since the X25's write speed maxes out at 70-100MB/s.


ᶘ ᵒᴥᵒᶅ

Offline

#10 2010-05-01 16:33:55

robbel
Member
Registered: 2006-05-17
Posts: 9

Re: How to make SSD's faster

litemotiv wrote:

most pre-2010 laptops don't have chipsets that support 3Gb SATA (~250MB/s), yours probably is a 1.5Gb. this will only affect read-speed though, since the X25's write speed maxes out at 70-100MB/s.

Cheers, that was indeed the issue. For reference, the lenovo engineers limited the ICH8M to 1.5GB/s in the T61 for "compatibility reasons", see http://forum.notebookreview.com/lenovo- … n-ssd.html . sucks.

Last edited by robbel (2010-05-01 16:34:43)

Offline

#11 2010-06-29 20:27:10

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,176
Website

Re: How to make SSD's faster

For those of you using the discard and noatime flags, do you also have a defaults flag for the SSD partitions?

/dev/sdb1      /       ext4    defaults,noatime,discard 0       1
/dev/sdb2      /home   ext4    defaults,noatime,discard 0       1

CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2010-06-29 21:19:43

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: How to make SSD's faster

graysky wrote:

For those of you using the discard and noatime flags, do you also have a defaults flag for the SSD partitions?

yes, the defaults are sane for most normal operations (rw, suid, dev, exec, auto, nouser, and async).


ᶘ ᵒᴥᵒᶅ

Offline

#13 2010-06-29 22:07:39

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,685

Re: How to make SSD's faster

graysky wrote:

For those of you using the discard and noatime flags, do you also have a defaults flag for the SSD partitions?

/dev/sdb1      /       ext4    defaults,noatime,discard 0       1
/dev/sdb2      /home   ext4    defaults,noatime,discard 0       1

Yes, that's exactly the way mine looks and it's working really well so far.

Anyone know if there's any way to check or test that auto-TRIM is working properly? I feel that it is, but would like to verify that if there's a method to do so.


oz

Offline

#14 2010-06-30 08:30:02

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: How to make SSD's faster

ozar wrote:

Anyone know if there's any way to check or test that auto-TRIM is working properly? I feel that it is, but would like to verify that if there's a method to do so.

# dd if=/dev/urandom of=tempfile count=100 bs=512k oflag=direct

100+0 records in
100+0 records out
52428800 bytes (52 MB) copied, 6.47137 s, 8.1 MB/s

# hdparm --fibmap tempfile

tempfile:
 filesystem blocksize 4096, begins at LBA 0; assuming 512 byte sectors.
 byte_offset  begin_LBA    end_LBA    sectors
           0   37094400   37196799     102400

# hdparm --read-sector 37094400 /dev/sdb

/dev/sdb:
reading sector 37094400: succeeded
b0e8 3ad7 d080 84e8 b4b2 7e60 21f1 eff3
0ef9 fa10 b172 89f8 186f 0194 4cb1 e190
d6b5 b2fe 2577 5dba e6f2 5ad7 34a0 f09f
ca5c 07ef 6e86 c3a8 9e77 77f3 78ff 672f
af71 dea7 ac23 a55d e31e ff83 164e bb76
8ea4 416d 343a 9f5e b41f b1d0 b6e9 6ed8
90c0 3cba ec07 1d96 fdd6 3940 1290 7cd2
c506 c3ee c120 3732 17eb 6e68 11aa 721c...

# rm tempfile
# sync

# hdparm --read-sector 37094400 /dev/sdb

/dev/sdb:
reading sector 37094400: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000

Last edited by litemotiv (2010-06-30 08:30:41)


ᶘ ᵒᴥᵒᶅ

Offline

#15 2010-06-30 21:47:45

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,685

Re: How to make SSD's faster

@ litemotiv

If I understood the code and executed it correctly, auto-TRIM is working well on this end because the output was all zeros.

Thanks!


oz

Offline

Board footer

Powered by FluxBB