Messages in this thread | | | Subject | sendfile() | From | Zlatko Calusic <> | Date | 11 Aug 1998 23:11:21 +0200 |
| |
OK, I did some benchmarking on that beast (what else is new, I hear you ask :))
I copied all 600MB worth of files from a IDE CD (24x) to /dev/null using standard cp utility and cp imitation using sendfile() system call instead of read()/write().
Results are as follows:
sendfile cp: 0.73user 34.23sys 3:42.18real 15%CPU (170120major+4636minor)pagefaults 25swaps
standard cp: 3.07user 156.15sys 3:44.34real 70%CPU (172868major+4878minor)pagefaults 25swaps
Wallclock times are equal since we're bound with the speed of CD-ROM drive, but look at the CPU utilization. We have a clear winner, here.
What bothers me is that even though sendfile uses much less CPU time, machine in fact becomes unusable while a program using it is running. When using standard cp you barely notice slowdown, but sendfile() definitely kills interactive feel.
Is there maybe a subtle bug in sendfile() implementation? Or could it be that kernel incorectly measures and reports CPU usage? Something else?
Pavel, if I recall correctly, you once had a patch you used to improve kernel fairness in reporting CPU usage.
Could you be so kind and send me a copy, and spare me losing myself in the archives. Also, I would like to have a recent version, for 2.1.115, if possible.
Thanks! -- Posted by Zlatko Calusic E-mail: <Zlatko.Calusic@CARNet.hr> --------------------------------------------------------------------- It really bothers me when people cut me o...
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |