Hi,
I am writing a code for an I/O Benchmark application in C and I need to change the block size of read and write of a file from and to a disk. I am not able to figure out a way to do that. Can some one help me out with this?
Thanks in advance.
Hi,
I am writing a code for an I/O Benchmark application in C and I need to change the block size of read and write of a file from and to a disk. I am not able to figure out a way to do that. Can some one help me out with this?
Thanks in advance.
I don't think if you can do it explicitly...
I don't care if someone doesn't like me, i was not put on earth to entertain everyone.
No King, no Queen, I am the ACE of battle.
Is there any way to do it???
Is there any way to do this? cos I am not able to find any
What C functions are you using to read/write?
Edit: If you are using stdio.h functions, you could use setvbuf.
Last edited by Bayint Naung; 03-21-2011 at 01:56 AM.
Thanks for that...
I am just wondering if the setvbuf function would change the size of the write or read block size?????
Which OS/Compiler are you using?
To get the most representative benchmarks, you need to use the lowest level API routines available from your OS.
The C standard API on top of that varies in complexity from one OS to another.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.