!?!
very small programm
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
main(int arg, char *argc[]){
int i;
while(1){
if(read(0,&i,4)!=4)
exit(0);
write(1,&i,4);
}
}file sd1 - 1mb
in reiserfs filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:01.79elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swaps
in ext2 filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:00.95elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swaps
In what the reason?!?
sory
Quoted 9 lines · Anton Erofeevskij
in reiserfs filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:01.79elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swapsin ext2 filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:00.95elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swaps
Try mounting the ReiserFS file system with notail and it should perform a lot better for such things.
Signature · 4 lines
http://www.coker.com.au/selinux/ My NSA Security Enhanced Linux packages http://www.coker.com.au/bonnie++/ Bonnie++ hard drive benchmark http://www.coker.com.au/postal/ Postal SMTP/POP benchmark http://www.coker.com.au/~russell/ My home page
Quoted 7 lines · Russell Coker
Quoted 5 lines · Anton Erofeevskij
in reiserfs filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:01.79elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swaps
Quoted 8 lines
Quoted 5 lines
in ext2 filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:00.95elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swapsTry mounting the ReiserFS file system with notail and it should perform a lot better for such things.
mount -o notail
time no change !
Quoted 15 lines · Anton Erofeevskij
Quoted 13 lines · Russell Coker
Quoted 10 lines · Anton Erofeevskij
in reiserfs filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:01.79elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swapsin ext2 filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:00.95elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swaps
Quoted 8 lines
Quoted 2 lines
Try mounting the ReiserFS file system with notail and it should perform a lot better for such things.
mount -o notail
time no change !
I mounted with an option notail - time of performance неизменялось try - I tried by 3-4 machines with different kernel`s (2.4.12-2.4.20) tell though approximately - in what the reason?
Hello!
Quoted 9 lines · Anton Erofeevskij
in reiserfs filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:01.79elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swaps
in ext2 filesystem
time cat sd1 | ./a.out > sd2
0.00user 0.05system 0:00.95elapsed 2%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (131major+43minor)pagefaults 0swaps
In what the reason?!?
Generally reiserfs might have more CPU overhead over ext2 due to it's journaling and balanced-tree nature per one operation. For large operations this is outweight by speed of performing the operation itself, but when you just write four bytes at a time, and each time that involves statdata (size, possibly nlinks, times) update, possible rebalancings, journal updates. And you have not said what ketnel are you using and what is config of the kernel.
Bye,
Oleg