On 2010-04-27 22:41, Nick Chalk wrote:
> Does anyone know if there's a way of measuring the number of entries
> in, and memory used by, the LVS connection table?

See Eric Dumazet's response here:

   http://lkml.org/lkml/2009/7/28/20

I'll quote his post here:

"""
If SLUB is used

$ cat /sys/kernel/slab/ip_vs_conn/object_size

If SLAB is used, take fourth column of :

$ grep ip_vs_conn /proc/slabinfo
"""

On my system, I find (with added newlines):

$ grep ip_vs_conn /proc/slabinfo
ip_vs_conn   #name
   357342     #<active_objs>
   357540     #<num_objs>
   192        #<objsize>
   20         #<objperslab>
   1 :        #<pagesperslab> :
   tunables   #tunables
   120        #<limit>
   60         #<batchcount>
   8 :        #<sharedfactor> :
   slabdata   #slabdata
   17877      #<active_slabs>
   17877      #<num_slabs>
   120        #<sharedavail>

The active_objs count is the same I get with

   wc -l /proc/net/ip_vs_conn

So, presumably you'll simply take the objsize*active_objs to determine
the total memory used by the connection table. If it turns out it
doesn't use a lot of memory, you can further inspect the slabinfo file
to determine what is. For userspace memory use, refer to ps(1) or
top(1).

s.

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - [email protected]
Send requests to [email protected]
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Reply via email to