LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: CPU Usage

To: Joseph Mack <mack.joseph@xxxxxxx>
Subject: Re: CPU Usage
Cc: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Mon, 10 Sep 2001 22:54:54 +0000 (GMT)
        Hello,

On Mon, 10 Sep 2001, Joseph Mack wrote:

> > Michael McConnell wrote:
> >
> > Top doesn't display CPU usage of IPChains or IPVSADM
> > VMStat doesn't display CPU usage of IPChains or IPVSADM
>
> ipchains and ipvsadm are user tools that configure the kernel.
> After you've run them, they go away and the kernel does it's new
> thing (which you'll see in "system").
>
> Unfortunately for some reason
> that no-one has explained to me "top/system" doesn't see everything.
> I can have a VS-DR director which is running 50Mbps on a 100Mpbs link
> and the load average doesn't get above 0.03 and system to be
> negligable. I would expect it to be higher.

        Yes, the column is named "%CPU", i.e. the CPU spend for
one process related to all processes. As for the load average, it is
based on the length (number of processes except the current one) of
the queue with all processes in running state. As we know, LVS does
not interract with any processes except the ipvsadm. So, the normal
mode is the LVS box just to forward packets without spending any CPU
cycles for processes. This is the reason we to see load average 0.00

        OTOH, vmstat reads /proc/stat and there are the counters
for all CPU times. Considering the current value for jiffies (the
kernel tick counter) the user apps can see the system, the user and
the idle CPU time. LVS is somewhere in the system time. For more
accurate measurement for the CPU cycles in the kernel there are some
kernel patches/tools that are exactly for this job - to see what time
takes the CPU in some kernel functions.

> Joe

Regards

--
Julian Anastasov <ja@xxxxxx>



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