Date: Sun, 8 Feb 2009 14:04:36 +0100 From: Bernd Walter <ticso@cicely7.cicely.de> To: Ragnar Lonn <ragnar@gatorhole.com> Cc: Julian Elischer <julian@elischer.org>, freebsd-virtualization@freebsd.org Subject: Re: More open sockets with vimages? Message-ID: <20090208130435.GL32126@cicely7.cicely.de> In-Reply-To: <498EC554.4020905@gatorhole.com> References: <498DF945.3000702@gatorhole.com> <498E0797.4040002@elischer.org> <498EC554.4020905@gatorhole.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 08, 2009 at 12:43:16PM +0100, Ragnar Lonn wrote: > Julian Elischer wrote: > >sockets are a global resource that are assigned to vimages. > >However the amount of sockets available are tunable. > >how many are we talking about here? > > 100,000+ sockets. It seems to me like there is a need to be able to > handle *many* open network connections as servers get more and more CPU > cores, memory, and higher-speed network interfaces, but most people > claim that it is very hard to get 100k open sockets working nicely on a > single machine, even on a modern OS (though I've found a couple of > people that say they can, also, on Linux systems). Ok if 65k sockets is > the normal limit per process and per IP address, but for the whole OS, > it just seems strange to limit things to 65k (or less). This is simple maths: 100k Sockets with 32k TX and 64k RX buffer take 9G Memory. Just buffer space, not to mention socket state, ... On i386 this is limited by kmem, which defaults to IIRC 512MB and is limited by 32bit virtual address space on i386. On amd64 depending on the OS version you can have a kmem of slighty less than 2G max or several GB. Nevertheless you are still limited with physical RAM. Smaller buffers are possible, but usually people want larger buffers to keep up with recent line speeds. Today buffer sizes can be dynamic - don't know the exact details, but you should keep in mind that 32k/96k is already quite small for many purposes. -- B.Walter <bernd@bwct.de> http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090208130435.GL32126>