How To: Double Linux disk read performance with readahead parameter

The open source journal has published an interesting hack. It mostly applies to high-end, multiple-disk storage:

Under the right conditions (that is, with certain hardware configurations which I’ll identify later) it is possible to literally double your sequential read performance from disk. If you noticed the terrible performance of the 3Ware 9500S RAID controller and cared enough to investigate. It all has to do with a sneaky little block device parameter known as readahead. Without going into too much gory detail, readahead controls how much in advance the operating system reads when, well, reading, as its name implies. By default, some operating systems (in particular, RHEL5 Server) sets this to 256 (512-byte sectors), or about 128 KB. When dealing with large filesystems spanning many disks, this paltry figure can actually nuke your performance.

=> HowTo: Linux: Double your disk read performance in a single command

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 5 comments so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
5 comments… add one
  • Me Feb 27, 2012 @ 15:11

    The link is dead.

  • Gabriel Ramuglia Jan 18, 2011 @ 4:41

    What’s reported in robert’s post is useful, but not syntactically accurate, as it’s missing a –

    The command I use is typically:

    blockdev –setra 1024 /dev/sda

    for a 512kb readahead

  • robert beck Aug 20, 2010 @ 1:04

    blockdev -setra xxx
    e.g. blockdev -setra 1024 /dev/sda

    Also try /etc/sysctl.conf:

  • Joe Roadkill May 10, 2010 @ 8:59

    Hey, this blog entry is USELESS because the link is now roadkill on the information super highway. If you had at least included the exact name of the readahead parameter then this page – which comes up right at the top of a google search for “linux readahead” would actually be useful.

  • Seb Dec 18, 2007 @ 8:44

    Very interesting

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @