Blockdev vs /sys/block/


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 06-12-2014
Blockdev vs /sys/block/

Hello,

I want to set/get the read-ahead for my disks and there is a little issue that confuses me. There are three ways to get/set the read-ahead buffer:

1. cat /sys/block/md0/bdi/read_ahead_kb
2. cat /sys/block/md0/queue/read_ahead_kb
3. blockdev --getra /dev/md0

Which one is the correct one? The first two gives me a value of 128. The last one gives me a value of 256. Where does this difference come from?
# 2  
Old 06-12-2014
Well I dont have much linux knowldge, but since you are talking disks, the same philosophy should apply:
First two give you a value of 128 (kb)
The last, blockdev since to talk like ioctl etc... and so is in blocks ( of 512 bytes) 256 block of 512 bytes...
To me then the values are much the same
This User Gave Thanks to vbe For This Post:
Sergiu-IT (06-12-2014)
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Interactive Python 3.5+ sys.stdout.write() AND sys.stderr.write() bug? wisecracker Programming 2 03-07-2017 10:24 AM
sys cron not running vivek.goel.piet UNIX for Advanced & Expert Users 5 12-14-2011 05:28 PM
Name file with sys date neil.k Solaris 1 01-21-2011 02:05 PM
SYS CRONJOB just not running... deal732 UNIX for Advanced & Expert Users 6 09-01-2009 08:30 PM
Sys Admin Certification King Nothing Solaris 8 08-07-2009 03:37 AM
Minimum Sys Requirement saurabh84g HP-UX 0 09-21-2008 02:31 AM
question about sys-unconfig deedee Solaris 4 07-24-2007 06:24 PM
Network Sys Admin wes.lat What is on Your Mind? 1 12-26-2006 03:47 PM
Hi errno in sys/stat.h vijlak Programming 6 11-11-2006 08:13 PM
Raid help for new sys admin antalexi Solaris 1 10-26-2006 05:45 AM
Any sys admins from uk? megadeth Solaris 1 12-19-2005 11:03 AM
Differences Sys 5 and BSD RajaRC Solaris 2 07-20-2004 06:11 AM
BSD Sys 5???? Toughgirl27 UNIX for Dummies Questions & Answers 2 08-21-2001 04:16 PM
Sys Administration tovsky Post Here to Contact Site Administrators and Moderators 1 07-15-2001 10:18 AM