| To: | Lennert Buytenhek <buytenh@xxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: many outgoing tcp sockets are slower than a few |
| From: | Christian Schmid <webmaster@xxxxxxxxxxxxxx> |
| Date: | Mon, 21 Feb 2005 20:11:30 +0100 |
| Cc: | bert hubert <ahu@xxxxxxx>, Nivedita Singhvi <niv@xxxxxxxxxx>, netdev@xxxxxxxxxxx |
| In-reply-to: | <20050221172943.GA31814@xxxxxxxxxxxxxxxxx> |
| References: | <421925DB.2060602@xxxxxxxxxxxxxx> <42192AAF.8020609@xxxxxxxxxx> <42192CD5.5090401@xxxxxxxxxxxxxx> <20050221090121.GA7478@xxxxxxxxxxxxxxx> <4219B99E.1000603@xxxxxxxxxxxxxx> <20050221120223.GA30348@xxxxxxxxxxxxxxxxx> <421A179C.1030505@xxxxxxxxxxxxxx> <20050221172943.GA31814@xxxxxxxxxxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040817 |
Lennert Buytenhek wrote: On Mon, Feb 21, 2005 at 06:17:16PM +0100, Christian Schmid wrote:Outgoing data. I am using sendfile() to send the file on a non-blocking socket but the call blocks for 100 ms per socket if I get over 3000 sockets. Thats causing the massive slowdown in sum. I first thought its a disk-issue but I tried with pure-cache data as well and it still blocks.O_NONBLOCK send() is really nonblocking, but O_NONBLOCK sendfile() really isn't, as it still does the disk read (if any) synchronously. How are you making sure that you're sending "pure-cache data"?Because thats the first I excluded. I changed the program by replacing sendfile with a caching-routine plus syswrite. And it was really interesting that the syswrite was the one which needs most of the real-time, not the caching-routine. syswrite blocked 100 ms per socket.'syswrite'. Is your application written in C or perl? Perl. But this is not the source because as stated in another mail, I tried with 6 processes when it slows down at 500 connections each and with 2 processes where it only starts to slowdown at 2000 processes each. Chris |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: many outgoing tcp sockets are slower than a few, Christian Schmid |
|---|---|
| Next by Date: | RE: Intel and TOE in the news, Alex Aizman |
| Previous by Thread: | Re: many outgoing tcp sockets are slower than a few, Lennert Buytenhek |
| Next by Thread: | Re: many outgoing tcp sockets are slower than a few, Baruch Even |
| Indexes: | [Date] [Thread] [Top] [All Lists] |