Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Sep 2012 11:37:15 +0200
From:      Ragnar Lonn <ragnar@gatorhole.com>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        freebsd-hardware@freebsd.org
Subject:   Re: Load testing knocks out network
Message-ID:  <5045CBCB.6000103@gatorhole.com>
In-Reply-To: <20120903210450.GC2654@aspire.rulingia.com>
References:  <CAHMRaQfLGY%2BYeDkG7K1GJQ-pmAi6rgT6-gthKQ3j7rSyzr7qVA@mail.gmail.com> <CAHMRaQdv0Wd3u79cxcNBa=aC%2Bv3L3XMEirDtxQ7aKFF0JxxSag@mail.gmail.com> <CAHMRaQfNEPcd6gYhZa0z3D=aEx3ykVpdhpJ9jszVyvaatYjeVw@mail.gmail.com> <50446681.2080307@gatorhole.com> <20120903210450.GC2654@aspire.rulingia.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 09/03/2012 11:04 PM, Peter Jeremy wrote:
> On 2012-Sep-03 10:12:49 +0200, Ragnar Lonn <ragnar@gatorhole.com> 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.
>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5045CBCB.6000103>