LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: [lvs-users] Trying to find something in ipvsadm docs, what does this

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [lvs-users] Trying to find something in ipvsadm docs, what does this mean?
From: Agostino di Salle <ago@xxxxxxxxxxxx>
Date: Mon, 7 Jan 2008 18:49:54 +0100 (CET)
Hello Mike,
  it is the size of the IPVS connetion hash table defined at compile time
(default 12 bits = 4096 entry).

>From IPVS Kconfig in the kernel source
(your-kernel-source/net/ipvs/ipv4/Kconfig):

config  IP_VS_TAB_BITS
        int "IPVS connection table size (the Nth power of 2)"
        default "12"
---help---
The IPVS connection hash table uses the chaining scheme to handle hash
collisions. Using a big IPVS connection hash table will greatly reduce
conflicts when there are hundreds of thousands of connections in the hash
table.

Note the table size must be power of 2. The table size will be the value
of 2 to the your input number power. The number to choose is from 8 to 20,
the default number is 12, which means the table size is 4096. Don't input
the number too small, otherwise you will lose performance on it. You can
adapt the table size yourself, according to your virtual server
application. It is good to set the table size not far less than the number
of connections per second multiplying average lasting time of connection
in the table.  For example, your virtual server gets 200 connections per
second, the connection lasts for 200 seconds in average in the connection
table, the table size should be not far less than 200x200, it is good to
set the table size 32768 (2**15).

Another note that each connection occupies 128 bytes effectively and each
hash entry uses 8 bytes, so you can estimate how much memory is needed for
your box.

Agostino

-- 
Experience is when you get what you don't want to get!

On Mon, 7 Jan 2008 at 08:07, Michael M. wrote:

> More than likely, that's the size of your connection table, as configured in 
> the linux kernel. It's this option: (12)   IPVS connection table size (the 
> Nth power of 2)
> 
> Michael
> 
> -----Original Message-----
> From: mike [mailto:mike503@xxxxxxxxx] 
> Sent: Sunday, January 06, 2008 7:56 PM
> To: LinuxVirtualServer.org users mailing list.
> Subject: [lvs-users] Trying to find something in ipvsadm docs, what does this 
> mean?
> 
> [root@lvs01 ~]# ipvsadm -l
> IP Virtual Server version 1.2.1 (size=4096)
> 
> What does the "size" mean? I have been looking and can't seem to find
> any information about that.
> 
> 
> 
> 
> _______________________________________________
> LinuxVirtualServer.org mailing list - lvs-users@xxxxxxxxxxxxxxxxxxxxxx
> Send requests to lvs-users-request@xxxxxxxxxxxxxxxxxxxxxx
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
> 



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