LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Statistics

To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
Subject: Statistics
From: Tobias Klausmann <klausman@xxxxxxxxxxxxxxx>
Date: Fri, 27 Feb 2004 15:12:09 +0100
Hi!

We're using IPVS/LVS and keepalived in a loadbalancing-and-failover 
setup. In order to provide monitoring and statistical services,
it would be nice to have a quick and not too CPU-bound way to
determine how many active (i.e. ESTABLISHED) connections there
are at a given point in time. Ideally, this statistic would be
per real server.

While one can walk over /proc/net/ip_vs_conn and collect those
statistics, this becomes awfully slow even with a single server
farm that has light traffic (a scan with a not-too-stupid program
I wrote takes about 13s - at a total line count of ~1000 hosts
in said proc file).

I know that netfilter's way of providing the conntracking table
is very slow due to the fact that it walks over the whole table
up to the currently-requested line (i.e. for line 1 over 1, for
line 2 over 1 and 2, for 3 over 1, 2 and 3 etc). I wondered if
the slow performance of ipvs' conntrack-reporting is due to the
same algorithm and if it can be helped in any way.

My first idea was to keep a counter in the table for every real
server and provide that in a dedicated /proc file, but that might
be a bad idea. I'm not much of a kernel hacker, either, so any
ideas would be nice to know of.

Greets,
Tobias
<Prev in Thread] Current Thread [Next in Thread>