LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Hardware requirements for an LVS director

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Hardware requirements for an LVS director
From: Horms <horms@xxxxxxxxxxxx>
Date: Thu, 13 Oct 2005 17:55:16 +0900
On Thu, Oct 13, 2005 at 01:27:38AM -0700, mike wrote:
> anyone else have any input?
> 
> i mean, for example - how many millions of connections per day, and
> concurrent connections could an athlon64 2800 handle? an opteron
> 1.8ghz? 512, 1, 2 gig RAM? dual processors?
> 
> still wanting to hear some specifics so i can sleep easier at night
> knowing i'm making the right hardware selection...

UP (uni-processor), any decent processor you can find - optoron is
probably overkill 32bit shuld be find, decent bus, decent NICs,
256-512Mb memory should be able to handle as many connections as anyone
is ever likely to throw at it. If you are really worried about
performance and have multiple NICs, play with NAPI, and if you also
end up with SMP set irq port affinity for the NICs.

I've heard of problems with small systems, where they just barf when
you try and punt a lot of data through the box, especially with multiple
NICs. But if you buy any kind of server hardwre you should be find. 
And to be honest, any desktop type hardware should be equally good,
you just won't be using its AGP or built-in sound features very much.
In a nuthsell, if you've got a good bus and no IRQ conflicts,
you are going to be in good shape.

As for memory, each concurrent conection takes somewere in the order of
128 bytes. I think it grew at some stage, but its still not that big,
look for the ip_vs_conn struct in the kernel if you want to count them.
And it will be a bit fatter on 64bit, again, count the bytes if you 
want a hard number.

That memory will be used until 2 minutes after the connection closes. If
you are using persistance, then you need that much again for each host
that has connected within the persistance timeout.  If you do some
maths, you realise that 1 million entries equals about 128Mb. Frankly I
doubt if anyone gets anything close that in practice although I did
manage 3,000,000 once by DoSing my workstation once. I imagine a
more usual usage pattern for even a very busy LVS would be << 100,000
connections, or << 12.8Mb.

Perhaps someone people could send in ipvsadm -Lcn | wc -l and tell us.

So the ammount of memory LVS uses is usually quite small,
and really 256 should be enough for everything else you are running
and LVS. But if you are really worried, get 512Mb or 1Gb. I'd be
very surprised if you would ever need more than that.

Lastly, just for the record, LVS does not place any limits on the number
of connections, real servers, virtual servers, or anything else for that
matter. Although it can kill off connections if you are running out of
memory, basically to prevent it from taking all of the memory in
the system to the point where nothing else can run including other
parts of the kernel. 

-- 
Horms

<Prev in Thread] Current Thread [Next in Thread>