Why does Unix block size increase with bigger memory size?
I am profiling binary data which has
stat
> Blocks) when the number of events are increased as in the following figure The unix block size is a dynamic measure. I am interested in why it is increasing with bigger memory units in some systems. I have had an idea that it should be constant. I used different environments to provide the stat
output:
stat
stat
Greybeard's comment may have the answer to the blocks behaviour:
The stat (1) command used to be a thin CLI to the stat (2) system call, which used to transfer relevant parts of a file's inode. Pretty early on, the meaning of the st_blksize member of the C struct returned by stat (2) was changed to "preferred" blocksize for efficient file system I/O, which carries well to file systems with mixed block sizes or non-block oriented allocation.
How can you measure the block size in case (1) and (2) separately?
Why can the Unix block size increase with bigger memory size?
"Stat blocks" is not a block size. It is number of blocks the file consists of. It is obvious that number of blocks is proportional to size. Size of block is constant for most file systems (if not all).
链接地址: http://www.djcxy.com/p/28392.html