Home Man
Today's Posts

Discuss NAS, SAN, RAID, Robotic Libraries, backup devices, RAM, DRAM, SCSI, IDE, EIDE topics here.

Blockdev vs /sys/block/

filesystem, read ahead, solved

👤 Login to reply

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


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
The Following User Says Thank You to vbe For This Useful Post:
Sergiu-IT (06-12-2014)
# 3  
Old 06-12-2014
Well... it makes sense, now

Thank you for your answer, vbe!
👤 Login to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Add a block of code at the end of a specific block Lakshmikumari UNIX for Dummies Questions & Answers 3 01-27-2015 07:41 AM
Get values block by block in same file garvit184 Shell Programming and Scripting 17 06-17-2014 12:15 PM
Printing a block of lines from a file, if that block does not contain two patterns using sed Kesavan Shell Programming and Scripting 8 12-24-2012 07:09 AM
Move a block of lines to file if string found in the block. grep_me UNIX for Advanced & Expert Users 7 11-09-2012 11:29 AM
Grepping text block by block by using for loop anushree.a Shell Programming and Scripting 12 09-24-2012 06:46 AM
Reading block by block in XML kmajumder Shell Programming and Scripting 4 07-27-2012 12:42 AM
Deciding whether to get a buffer cache block or inode block sreeharshasn UNIX for Advanced & Expert Users 1 10-17-2011 11:29 AM
awk: How to search for a block within a block ? DerekAsirvadem Shell Programming and Scripting 5 01-11-2011 08:18 AM
how to append a block of statements after another block in the file aoussenko Shell Programming and Scripting 5 04-13-2009 09:34 AM
BAD SUPER BLOCK - Run fsck with alternate super block number admin wanabee HP-UX 1 09-08-2006 01:57 PM

All times are GMT -4. The time now is 04:43 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password