Storage unit and IO unit
Hi,
I have two questions if some one could help me find out for my red had advance server 4. 1. How could i find out the storage unit of my Linux. I mean operating system block size. 2. How could i find out that what is the unit of I/O on my Linux system. I mean, when data is requested from the disk for read, how much data is read in one I/O. How do we set it at OS level? Thanks Salman |
1. If you mean filesystem block size, you can get that on a per-filesystem basis. For ext2/3, use tune2fs -l /dev/XXX|grep "Block size"
2. I suspect the answer depends on what exactly you mean by "one I/O" and on the hardware you are using. A good place to start looking would be in the source code for your hard drive controller. Note that the size of one transfer isn't fixed. It may be anywhere between 0 and a max limit imposed by your hardware. I would be interested in hearing from someone more knowledgeable on this aspect. |
Unless you are doing direct I/O the concept of "blocksize" is a bit nebulous.
Regardless of what you (as handled by the fs driver) request, the I/O schedulers are designed to consolidate (and sort) the physical I/Os to optimize hard disk usage. To all intents and purposes I/O is handled as a convenient (to the VFS) multiple of sector size - generally 512 Bytes. Then the physical bits (the card and device itself) may well get in on the act - especially for large (on-board) caches or any sort of RAID. Who knows what they do to the actual (physical) I/Os. |
All times are GMT -5. The time now is 08:36 PM. |