P
pank7
hi everyone,
I have a program here to test the file IO(actually output) with buffer
turned on and off. What I want to see is that there will be obvious
differece in time. Here I have an input file scales 1.1M, what I did is
just copy it to another output file(ten times). But I don't think I see
any difference. My file system is ext3, with debian
sarge(kernel-2.6.8).
Here is the main part of my program:
The result is here:
Size of the input file: 1128838 bytes.
Buffer size of the file: 4096.
Choose:
1. Unbuffered test.
2. Buffered test.
b
Time begin(buffered): 1134782563 sec 803489 microsec.
Time finish(buffered): 1134782563 sec 852111 microsec.
Time spent on buffered test: 0 sec 48622 microsec.
Size of the input file: 1128838 bytes.
Buffer size of the file: 4096.
Choose:
1. Unbuffered test.
2. Buffered test.
u
Time begin(unbuffered): 1134782571 sec 685364 microsec.
Time finish(unbuffered): 1134782571 sec 732220 microsec.
Time spent on buffered test: 0 sec 48622 microsec.
can anyone help me?
I've also tried to run this program on FreeBSD-5.4, but no diff either
Thanx!!!
pank7.yardbird
I have a program here to test the file IO(actually output) with buffer
turned on and off. What I want to see is that there will be obvious
differece in time. Here I have an input file scales 1.1M, what I did is
just copy it to another output file(ten times). But I don't think I see
any difference. My file system is ext3, with debian
sarge(kernel-2.6.8).
Here is the main part of my program:
The result is here:
Size of the input file: 1128838 bytes.
Buffer size of the file: 4096.
Choose:
1. Unbuffered test.
2. Buffered test.
b
Time begin(buffered): 1134782563 sec 803489 microsec.
Time finish(buffered): 1134782563 sec 852111 microsec.
Time spent on buffered test: 0 sec 48622 microsec.
Size of the input file: 1128838 bytes.
Buffer size of the file: 4096.
Choose:
1. Unbuffered test.
2. Buffered test.
u
Time begin(unbuffered): 1134782571 sec 685364 microsec.
Time finish(unbuffered): 1134782571 sec 732220 microsec.
Time spent on buffered test: 0 sec 48622 microsec.
can anyone help me?
I've also tried to run this program on FreeBSD-5.4, but no diff either
Thanx!!!
pank7.yardbird