9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] listen qlen
@ 2000-06-14  8:52 abhay puri
  0 siblings, 0 replies; 7+ messages in thread
From: abhay puri @ 2000-06-14  8:52 UTC (permalink / raw)
  To: 9fans

how do i increase the number of concurrent tcp connections that can be
handled.
i compiled the echo server example in the announce man page,
then hammered it with connect requests from a nearby linux pc.
found it was getting a lot of "connection refused" responses.

similarly with the http server - 10 rapid fire GET requests yields 2-3
connection refused responses.
what parameters should i be playing with to improve this?

many thanks

-abhay


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

* Re: [9fans] listen qlen
@ 2000-06-19 15:27 presotto
  0 siblings, 0 replies; 7+ messages in thread
From: presotto @ 2000-06-19 15:27 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

I'm not surprised in either case.  Our httpd has never been sped up.  It
runs a separate process for each request and caches nothing.  I never
looked inside apache so I don't know what it does.

When you said that you'ld set the listen qlen to 10, how did you do that
in Plan 9?  Ours is fixed at 5 (a mistake which I will correct as soon as
I'm back home for a while).  You can increase it by changing the constant
Maxincall in /sys/src/9/ip/ip.h.

Given that you were constantly fetching the same file, I doubt that much
of the time was the file server process.  I'm assuming that you mounted
the file server cached.

[-- Attachment #2: Type: message/rfc822, Size: 3031 bytes --]

From: abhay puri <avp@one.net.au>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] listen qlen
Date: Mon, 19 Jun 2000 08:48:30 GMT
Message-ID: <394CDB64.9B9328E6@one.net.au>

Many thanks to all who answered the 'how to make the kernel' question.
It works and should be useful for lots more than this qlen question!

I took some time measurements where the client code is basically "connect,
send "GET /", close"

03 iterations
    linux2.2.14-15mdk/apache1.3.9   33 pkts  0.058, 0.056, 0.057
    p9/httpd 0.055, 0.055, 0.055
20 iterations
     linux2.2.14-15mdk/apache1.3.9  220 pkts  0.283, 0.284, 0.278
     p9/httpd    5-7 connection refused messages
     p9/httpd qlen=512    201 pkts  0.513, 0.380, 0.384
50 iterations
    linux2.2.14-15mdk/apache1.3.9    3.291, 3.294, 3.283
    linux2.2.14-15mdk/apache1.3.9 qlen=511   550 pkts 0.636, 0.655, 0.635
    p9/httpd qlen=512    0.994, 0.991, 1.007

Notes:
- except where explicitly stated, the listen qlen is 10.
- all times are in seconds and are calculated using tcpdump running on the
client
- the three times are three consecutive measurements
- the linux and p9 measurements are both taken from the same box which is a
p133 pc, 48Mb.

Questions:
I guess i have a couple of questions:
- the fact that p9/httpd started refusing connections at 20 iterations
  while linux didn't surprised me. (that may be more a linux question?)
- the fact that p9/httpd took half again as long (50 iterations) as linux
surprised me
  (this maybe too artificial a test - with no bearing on how a server would
actually perform ).
  Nevertheless, is this sort of difference expected?
  or is it likely I've stuffed something in my configuration up?

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

* Re: [9fans] listen qlen
  2000-06-16 16:00 rsc
@ 2000-06-19  8:48 ` abhay puri
  0 siblings, 0 replies; 7+ messages in thread
From: abhay puri @ 2000-06-19  8:48 UTC (permalink / raw)
  To: 9fans

Many thanks to all who answered the 'how to make the kernel' question.
It works and should be useful for lots more than this qlen question!

I took some time measurements where the client code is basically "connect,
send "GET /", close"

03 iterations
    linux2.2.14-15mdk/apache1.3.9   33 pkts  0.058, 0.056, 0.057
    p9/httpd 0.055, 0.055, 0.055
20 iterations
     linux2.2.14-15mdk/apache1.3.9  220 pkts  0.283, 0.284, 0.278
     p9/httpd    5-7 connection refused messages
     p9/httpd qlen=512    201 pkts  0.513, 0.380, 0.384
50 iterations
    linux2.2.14-15mdk/apache1.3.9    3.291, 3.294, 3.283
    linux2.2.14-15mdk/apache1.3.9 qlen=511   550 pkts 0.636, 0.655, 0.635
    p9/httpd qlen=512    0.994, 0.991, 1.007

Notes:
- except where explicitly stated, the listen qlen is 10.
- all times are in seconds and are calculated using tcpdump running on the
client
- the three times are three consecutive measurements
- the linux and p9 measurements are both taken from the same box which is a
p133 pc, 48Mb.

Questions:
I guess i have a couple of questions:
- the fact that p9/httpd started refusing connections at 20 iterations
  while linux didn't surprised me. (that may be more a linux question?)
- the fact that p9/httpd took half again as long (50 iterations) as linux
surprised me
  (this maybe too artificial a test - with no bearing on how a server would
actually perform ).
  Nevertheless, is this sort of difference expected?
  or is it likely I've stuffed something in my configuration up?


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

* Re: [9fans] listen qlen
@ 2000-06-16 16:00 rsc
  2000-06-19  8:48 ` abhay puri
  0 siblings, 1 reply; 7+ messages in thread
From: rsc @ 2000-06-16 16:00 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 143 bytes --]

To build a particular pc kernel (say 9pcdisk)

	cd /sys/src/9/pc
	mk 'CONF=pcdisk'

To install it in /386

	mk 'CONF=pcdisk' install


[-- Attachment #2: Type: message/rfc822, Size: 2156 bytes --]

From: abhay puri <avp@one.net.au>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] listen qlen
Date: Fri, 16 Jun 2000 09:10:47 GMT
Message-ID: <39490C84.89061E29@one.net.au>

urrks.
any refs to a quick guide to building and installing a kernel?
mk kernels in /sys/src doesn't seem to be set up quite right.

presotto@plan9.bell-labs.com wrote:

> You're probably getting done in by the maximum queued calls being
> 5 for any service.  You can change that to any number by changing
> Maxincall in /sys/src/9/ip/ip.h and recompiling the kernel.  I should
> probably make it a writable parameter.
>
> If that's not you're problem, I don't know what is.  The release has
> the max number of tcp channels set at 512 (same file, enum Nchans).

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

* Re: [9fans] listen qlen
@ 2000-06-16 15:47 rob pike
  0 siblings, 0 replies; 7+ messages in thread
From: rob pike @ 2000-06-16 15:47 UTC (permalink / raw)
  To: 9fans

	any refs to a quick guide to building and installing a kernel?

cd /sys/src/9/pc
mk 'CONF=pc'
	or pcdisk or ...
to build 9pc or 9pcdisk or ...

we will fix /sys/src/9/mkfile



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

* Re: [9fans] listen qlen
  2000-06-14 13:58 presotto
@ 2000-06-16  9:10 ` abhay puri
  0 siblings, 0 replies; 7+ messages in thread
From: abhay puri @ 2000-06-16  9:10 UTC (permalink / raw)
  To: 9fans

urrks.
any refs to a quick guide to building and installing a kernel?
mk kernels in /sys/src doesn't seem to be set up quite right.

presotto@plan9.bell-labs.com wrote:

> You're probably getting done in by the maximum queued calls being
> 5 for any service.  You can change that to any number by changing
> Maxincall in /sys/src/9/ip/ip.h and recompiling the kernel.  I should
> probably make it a writable parameter.
>
> If that's not you're problem, I don't know what is.  The release has
> the max number of tcp channels set at 512 (same file, enum Nchans).


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

* Re: [9fans] listen qlen
@ 2000-06-14 13:58 presotto
  2000-06-16  9:10 ` abhay puri
  0 siblings, 1 reply; 7+ messages in thread
From: presotto @ 2000-06-14 13:58 UTC (permalink / raw)
  To: avp, 9fans

You're probably getting done in by the maximum queued calls being
5 for any service.  You can change that to any number by changing
Maxincall in /sys/src/9/ip/ip.h and recompiling the kernel.  I should
probably make it a writable parameter.

If that's not you're problem, I don't know what is.  The release has
the max number of tcp channels set at 512 (same file, enum Nchans).


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

end of thread, other threads:[~2000-06-19 15:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-14  8:52 [9fans] listen qlen abhay puri
2000-06-14 13:58 presotto
2000-06-16  9:10 ` abhay puri
2000-06-16 15:47 rob pike
2000-06-16 16:00 rsc
2000-06-19  8:48 ` abhay puri
2000-06-19 15:27 presotto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).