Readahead for /var/lib/mongo is set to 4096KB
It's probably /dev/sdb
given the sizes you listed, but you can find out by running df -h
. I keep my data in /data
and here is my relevant output:
> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 70G 18G 49G 27% /
/dev/sdc1 932G 682G 250G 74% /data
In my case that means that the one I should be altering for readahead is /dev/sdc1
. Figure out where you keep your data and then which block device that corresponds to, then set the readahead on that device. In my case:
sudo blockdev --setra 256 /dev/sdc
To persist through reboots you will need to add this command or similar to a boot script such as rc.local, or perhaps put it into your MongoDB init script to ensure it is set before the MongoDB process is launched (readahead is only read once by the process at start up, hence requires a process restart to affect a change).