Skip to contentSkip to conversation

read-ahead for md/lvm combination

DISCUSSION Daniel Pocock 2 participants 2 messages May 11, 2012 – May 12, 2012 MD RAID

lore
Share & tools
lore
#0 lore raw

While I was adding the SCTERC settings to my rc.local, I had a look over /sbin/blockdev --setra ... settings

I do things like this, for example:

/sbin/blockdev --setra 8192 /dev/mapper/myvg-large_media_files

What about
- the devices /dev/sd[ab]2
- the md device, /dev/md2 (which is the PV for LVM) ?

Would it be correct to leave /dev/sd[ab]2 and /dev/md2 at defaults, and only specify larger sizes for LVs that need it? Or should I even make /dev/sd[ab]2 and /dev/md2 smaller than the default value (256)?

Those disks are SATA - but I'm also planning to add in some SSDs and RAID1 them with md - they will hold things like source code and home directories (to make compiling and NFS home directories faster). Can anyone comment on the read ahead config or any other aspect of such a plan?

#1 lore raw
Quoted 9 lines · On Fri, 11 May 2012 14:55:34 +0000 Daniel Pocock <[email protected]> wrote:

While I was adding the SCTERC settings to my rc.local, I had a look over /sbin/blockdev --setra ... settings

I do things like this, for example:

/sbin/blockdev --setra 8192 /dev/mapper/myvg-large_media_files

Quoted 7 lines

What about
- the devices /dev/sd[ab]2
- the md device, /dev/md2 (which is the PV for LVM) ?

Would it be correct to leave /dev/sd[ab]2 and /dev/md2 at defaults, and only specify larger sizes for LVs that need it? Or should I even make /dev/sd[ab]2 and /dev/md2 smaller than the default value (256)?

The read-ahead setting is interpreted by the pagecache.
So it only makes sense to set in on a device which is directly mounted or accessed via /dev/XXX.

On other devices - such as the media device beneath and md array - you can set the read-ahead to anything or nothing and it will have no effect at all.

NeilBrown

Quoted 10 lines

Those disks are SATA - but I'm also planning to add in some SSDs and RAID1 them with md - they will hold things like source code and home directories (to make compiling and NFS home directories faster). Can anyone comment on the read ahead config or any other aspect of such a plan? --
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html