On 09/03/2012 11:04 PM, Peter Jeremy wrote:
On 2012-Sep-03 10:12:49 +0200, Ragnar Lonn <[email protected]> wrote:
transmit/receive buffers. In newer *Linux* kernels, this memory is being
allocated in an adaptive manner - i.e. the kernel only allocates a small
amount of memory to each TCP buffer, and then increases it as necessary
(per connection, depending on transfer speed and network delay to the
other peer).
FreeBSD does this as well, though I don't recall when this was added.
I think I actually discussed this with FreeBSD developers a while ago
(on this list even?), and they told me the FreeBSD kernel can only
allocate max 2GB of kernel memory.
This is only true on 32-bit kernels. FreeBSD uses a single address
space so both kernel and userland need to fit into 4GB on 32-bit
systems. On 64-bit systems, KVM is less constrained (it's ~550GB on
my amd64). You can check sysctl's vm.kvm_free and vm.kvm_size for
exact figures.
Maybe I misremembered slightly. I found the old discussion I had with
people about this on the FreeBSD virtualization mailing list:
http://osdir.com/ml/freebsd-virtualization/2009-02/msg00006.html
Anyway, 1.6M connections sounds really good (although he only had 4GB of
memory, so I guess the exercise was mostly academic - i.e. those
connections would not be very useful in a real setting because each
would have so little buffer memory).
/Ragnar
100K buffer memory. If you have e.g. 1GB available to network buffers,
it means a max limit of 10k simultaneous connections on a server,
regardless of how much memory it has.
If you want a system to usefully cope with 10K network connections,
you will probably want to be running amd64 anyway. That said, Rod
Grimes was achieving between 100K and 1M TCP connections to FreeBSD
i386 systems in the 1990's.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hardware
To unsubscribe, send any mail to "[email protected]"