# SSD and readahead/hdparm

## gentuse

Is there any benefit to having "software read ahead" enable for an SSD? I would think that it could potentially reduce performance because the drive is wasting time streaming unused data. There is no seek penalty, so why not just let data be retrieved when it is needed?

man hdparm

...

-a   Get/set sector count for filesystem (software) read-ahead. This is used to improve performance in sequential reads of large files, by prefetching additional blocks in anticipation of them being needed by the running task. Many IDE drives also have a separate built-in read-ahead function, which augments this filesystem (software) read-ahead function.

----------

## petlab

First, make sure that the drive supports it.  I doubt that any of the "JMicron" based SSDs will do that, which is a big segment of the installed market.

And, no I don't think it is something we would want.  You're right there.

----------

## albright

I have a samsung ssd in a thinkpad x300, and readahead

was set on (value 6144). I'll try turning it off and see if

there is any noticeable difference.

hdparm -Tt /dev/sda without:

```
 Timing cached reads:   4606 MB in  1.99 seconds = 2313.83 MB/sec

 Timing buffered disk reads:   52 MB in  3.06 seconds =  17.01 MB/sec
```

with -a on the reads value is around 100 MB/sec

So readahead appears to be a Good Thing!

----------

