public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Lindner <mikel@att.net>
To: Chris Wedgwood <cw@f00f.org>
Cc: Dan Maas <dmaas@dcine.com>, Edgar Toernig <froese@gmx.de>,
	linux-kernel@vger.kernel.org
Subject: Re: PROBLEM: select() on TCP socket sleeps for 1 tick even if data   available
Date: Sat, 20 Jan 2001 20:22:24 -0500	[thread overview]
Message-ID: <3A6A39D0.E6E76CD3@att.net> (raw)
In-Reply-To: <fa.nc2eokv.1dj8r80@ifi.uio.no> <fa.dcei62v.1s5scos@ifi.uio.no> <015e01c082ac$4bf9c5e0$0701a8c0@morph> <3A69361F.EBBE76AA@att.net> <20010120200727.A1069@metastasis.f00f.org> <3A694254.B52AE20B@att.net> <3A6A09F2.8E5150E@gmx.de> <022f01c08342$088f67b0$0701a8c0@morph> <20010121133433.A1112@metastasis.f00f.org>

Chris Wedgwood wrote:
> 
> On Sat, Jan 20, 2001 at 07:35:12PM -0500, Dan Maas wrote:
> 
>     Bingo! With this fix, 2.2.18 performance becomes almost identical to 2.4.0
>     performance. I assume 2.4.0 disables Nagle by default on local
>     connections...
> 
> 2.4.x has a smarter nagle algorithm.

Thanks again for all the help, guys...

Haven't installed 2.4 yet, but I tried the setsockoption route.
Performance is better, but the two processes together never total more
than 50% of the CPU (i.e. the thing is still schedule-bound, not compute
bound, as it is on other platforms), and throughput is only up to 800
sends/sec. Better than the 100/sec. I was getting, but still a far cry
from the identical box running Windows, where performance is 8K/sec.

...and I still don't understand why the identical program, but using one
socket instead of 2 sockets, IS CPU bound, and gets on the order of
10K/sec. on the same HW. Diffs to produce 10K/sec. 1 socket version from
my previous sample follow...

--
Mike Lindner

diff sockperf.c sockperf1.c
163c163
<                               if (pings++ < 1000) {
---
>                               if (pings++ < 10000) {
177c177
<       fprintf(stderr, "elapsed time for 1000 pingpongs is %g\n",
now.tv_sec - then.tv_sec + (now.tv_usec - then.tv_usec) / 1000000.0);
---
>       fprintf(stderr, "elapsed time for 10000 pingpongs is %g\n", now.tv_sec - then.tv_sec + (now.tv_usec - then.tv_usec) / 1000000.0);
205c205
<                       int     s = connectsock(argv[1], argv[3],
"tcp");
---
>                       int     s = r;
214c214
<                       int     r = accept(f, (struct sockaddr *) &fsin,
&alen);
---
>                       int     r = s;
-
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/

  reply	other threads:[~2001-01-21  1:17 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <fa.nc2eokv.1dj8r80@ifi.uio.no>
     [not found] ` <fa.dcei62v.1s5scos@ifi.uio.no>
     [not found]   ` <015e01c082ac$4bf9c5e0$0701a8c0@morph>
2001-01-20  6:54     ` PROBLEM: select() on TCP socket sleeps for 1 tick even if data available Michael Lindner
2001-01-20  7:07       ` Chris Wedgwood
2001-01-20  7:46         ` Michael Lindner
2001-01-20 21:58           ` Edgar Toernig
2001-01-21  0:35             ` Dan Maas
2001-01-21  0:34               ` Chris Wedgwood
2001-01-21  1:22                 ` Michael Lindner [this message]
2001-01-21  1:29                   ` David Schwartz
2001-01-21  3:20                 ` Michael Lindner
2001-04-09 14:54                   ` Stephen D. Williams
2001-04-09 19:16                     ` James Antill
2001-04-10 18:29                       ` Stephen D. Williams
2001-04-10 20:25                         ` James Antill
2001-04-11 21:03                           ` Stephen D. Williams
2001-04-12  0:09                             ` James Antill
2001-01-24 20:31                 ` Boris Dragovic
     [not found]         ` <3A694357.1A7C6AAC@att.net>
2001-01-20  9:41           ` Dan Maas
2001-01-20 17:26             ` Michael Lindner
2001-01-24 23:56 Bernd Eckenfels
  -- strict thread matches above, loose matches on Subject: below --
2001-01-20 10:53 Bernd Eckenfels
2001-01-19 20:47 Michael Lindner
2001-01-19 23:20 ` David Schwartz
2001-01-20  2:30   ` Michael Lindner
2001-01-20  3:27     ` David Schwartz
2001-01-20  4:37       ` Michael Lindner
2001-01-20 12:26     ` Martin MaD Douda
2001-01-20 11:39       ` Bjorn Wesen
2001-01-19 23:31 ` Chris Wedgwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A6A39D0.E6E76CD3@att.net \
    --to=mikel@att.net \
    --cc=cw@f00f.org \
    --cc=dmaas@dcine.com \
    --cc=froese@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox