Quoting "Karl J. Runge" <[EMAIL PROTECTED]>:
> How much RAM usage for 20K sockets would be acceptable to you?

  Under 100 Megs by the kernel itself..  ;-P

> Back in 1998 I saw a talk by David S. Miller where he said he was
> optimizing (speed and memory usage) the Linux networking code and was
> doing tests with 40K sockets (likely over loopback but I don't know for
> sure).  He may have been optimizing memory consumption for TIME_WAIT or
> CLOSE_WAIT connections (e.g. http), which won't help you if I
> understand your application (your connections stay up for a long time,
> like,
> well, say, telnet).
> Also, would setsockopt(2) for SO_SNDBUF and SO_RCVBUF (or something
> else) be of use? I wrote some grotty code that calls getsockopt() and
> it suggests for SOL_SOCKET these buffers are 65535 (kernel 2.2.14)...
> I see this number in /usr/include/linux/skbuff.h, but it is likely I
> made some mistake, if you play with getsockopt let me know what you
> find.

  Actually, after some digging and some pointers, it appears that the 
send/receieve buffer size is configurable via /proc/sys/net/core/wmem_default 
and /proc/sys/net/core/rmem_default.  I can also set the max size for these, to 
make then 'smaller' max size.  I've tested it down to 4k, from 64k..  ;-P  Alot 
of this data is contained in /usr/src/linux/Documentation/net/ip-sysctl.txt (or 
something along those lines).  Really interesting stuff.  I'd like to know why, 
if the kernel can dynamically adjust the size needed by a socket, it's default 
and max are set to 64k.

--- 
Thomas Charron
<< Wanted: One decent sig >>
<< Preferably litle used  >>
<< and stored in garage.  ?>>

**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to