public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Is sendfile all that sexy?
@ 2001-01-14 18:29 jamal
  2001-01-14 18:50 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 70+ messages in thread
From: jamal @ 2001-01-14 18:29 UTC (permalink / raw)
  To: linux-kernel, netdev



I thought i'd run some tests on the new zerocopy patches
(this is using a hacked ttcp which knows how to do sendfile
and does MSG_TRUNC for true zero-copy receive, if you know what i mean
;-> ).

2 back to back SMP 2*PII-450Mhz hooked up via 1M acenics (gigE).
MTU 9K.

Before getting excited i had the courage to give plain 2.4.0-pre3 a whirl
and somethings bothered me.

test1:
------

regular ttcp, no ZC and no sendfile. send as much as you can in 15secs;
actually 8192 byte chunks, 2048 of them at a time. Repeat until 15 secs is
complete.

Repeat the test 5 times to narrow experimental deviation.

Throughput: ~99MB/sec (for those obsessed with Mbps ~810Mbps)
CPU abuse: server side 87% client side 22% (the CPU measurement could do
with some work and proper measure for SMP).

test2:
------

sendfile server.
created a file which is 8192*2048 bytes. Again the same 15 second
exercise as test1 (and the 5-set thing):

- throughput: 86MB/sec
- CPU: server 100%, client 17%

So i figured, no problem i'll re-run it with a file 10 times larger.
**I was dissapointed to see no improvement.**

Looking at the system calls being made:

with the non-sendfile version, approximately 182K write-to-socket system
calls were made each writing 8192 bytes, Each call lasted on average
0.08ms.
With sendfile test2: 78 calls were made, each sending the file
size 8192*2048 bytes; each lasted about 199 msecs

TWO observations:
- Given Linux's non-pre-emptability of the kernel i get the feeling that
sendfile could starve other user space programs. Imagine trying to send a
1Gig file on 10Mbps pipe in one shot.
- It doesnt matter if you break down the file into chunks for
self-pre-emption; sendfile is still a pig.

I have a feeling i am missing some very serious shit. So enlighten me.
Has anyone done similar tests?

Anyways, the struggle continues next with zc patches.

cheers,
jamal

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 70+ messages in thread

end of thread, other threads:[~2001-01-26 14:16 UTC | newest]

Thread overview: 70+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-14 18:29 Is sendfile all that sexy? jamal
2001-01-14 18:50 ` Ingo Molnar
2001-01-14 19:02   ` jamal
2001-01-14 19:09     ` Ingo Molnar
2001-01-14 19:18       ` jamal
2001-01-14 20:22 ` Linus Torvalds
2001-01-14 20:38   ` Ingo Molnar
2001-01-14 21:44     ` Linus Torvalds
2001-01-14 21:49       ` Ingo Molnar
2001-01-14 21:54     ` Gerhard Mack
2001-01-14 22:40       ` Linus Torvalds
2001-01-14 22:45         ` J Sloan
2001-01-15 20:15           ` H. Peter Anvin
2001-01-15  3:43         ` Michael Peddemors
2001-01-15 13:02       ` Florian Weimer
2001-01-15 13:45         ` Tristan Greaves
2001-01-15  1:14   ` Dan Hollis
2001-01-15 15:24   ` Jonathan Thackray
2001-01-15 15:36     ` Matti Aarnio
2001-01-15 20:17       ` H. Peter Anvin
2001-01-15 16:05     ` dean gaudet
2001-01-15 18:34       ` Jonathan Thackray
2001-01-15 18:46         ` Linus Torvalds
2001-01-15 20:47           ` [patch] sendpath() support, 2.4.0-test3/-ac9 Ingo Molnar
2001-01-16  4:51             ` dean gaudet
2001-01-16  4:59               ` Linus Torvalds
2001-01-16  9:48                 ` 'native files', 'object fingerprints' [was: sendpath()] Ingo Molnar
2000-01-01  2:02                   ` Pavel Machek
2001-01-16 11:13                   ` Andi Kleen
2001-01-16 11:26                     ` Ingo Molnar
2001-01-16 11:37                       ` Andi Kleen
2001-01-16 12:04                         ` O_ANY [was: Re: 'native files', 'object fingerprints' [was: sendpath()]] Ingo Molnar
2001-01-16 12:09                           ` Ingo Molnar
2001-01-16 12:13                           ` Peter Samuelson
2001-01-16 12:33                             ` Ingo Molnar
2001-01-16 14:40                               ` Felix von Leitner
2001-01-16 12:34                           ` Andi Kleen
2001-01-16 13:00                           ` Mitchell Blank Jr
2001-01-16 13:57                   ` 'native files', 'object fingerprints' [was: sendpath()] Jamie Lokier
2001-01-16 14:27                   ` Felix von Leitner
2001-01-16 17:47                   ` Linus Torvalds
2001-01-17  4:39                   ` dean gaudet
2001-01-16  9:19               ` [patch] sendpath() support, 2.4.0-test3/-ac9 Ingo Molnar
2001-01-17  0:03                 ` dean gaudet
2001-01-15 18:58         ` Is sendfile all that sexy? dean gaudet
2001-01-15 19:41     ` Ingo Molnar
2001-01-15 20:33       ` Albert D. Cahalan
2001-01-15 21:00         ` Linus Torvalds
2001-01-16 10:40         ` Felix von Leitner
2001-01-16 11:56           ` Peter Samuelson
2001-01-16 12:37           ` Ingo Molnar
2001-01-16 12:42           ` Ingo Molnar
2001-01-16 12:47             ` Felix von Leitner
2001-01-16 13:48               ` Jamie Lokier
2001-01-16 14:20                 ` Felix von Leitner
2001-01-16 15:05                   ` David L. Parsley
2001-01-16 15:05                     ` Jakub Jelinek
2001-01-16 15:46                       ` David L. Parsley
2001-01-18 14:00                         ` Laramie Leavitt
2001-01-17 19:27                     ` dean gaudet
2001-01-24  0:58   ` Sasi Peter
2001-01-24  8:44     ` James Sutherland
2001-01-25 10:20     ` Anton Blanchard
2001-01-25 10:58       ` Sasi Peter
2001-01-26  6:10         ` Anton Blanchard
2001-01-26 11:46           ` David S. Miller
2001-01-26 14:12             ` Anton Blanchard
2001-01-15 23:16 ` Pavel Machek
2001-01-16 13:47   ` jamal
2001-01-16 14:41     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox