LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: tuning of CPU usage

To: "Andreas J. Koenig" <andreas.koenig@xxxxxxxx>
Subject: Re: tuning of CPU usage
Cc: <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
From: Julian Anastasov <ja@xxxxxx>
Date: Thu, 11 Oct 2001 11:08:39 +0300 (EEST)
        Hello,

On 11 Oct 2001, Andreas J. Koenig wrote:

> The CPU usage of my LVS director worries me and I'd ask for advice for
> tuning parameters. Or any other advice what might be causing the high
> CPU usage. ipvsadm shows the number of connections isn't really high
> (250 active, 2100 inactive), but vmstat shows system's CPU usage is

        The number of connections is not so meaningful but the traffic
is.

> >50%. The CPU is a 700MHz Celeron. I'm running DR, kernel 2.4.5-ac8
> and I haven't upgraded for a while. Would upgrading improve the
> situation?
>
> # ipvsadm -Ln    # IP addresses censored
> IP Virtual Server version 0.8.0 (size=131072)
> Prot LocalAddress:Port Scheduler Flags
>   -> RemoteAddress:Port             Forward Weight ActiveConn InActConn
> TCP  XX.XX.XX.190:443 wrr
>   -> XX.XX.XX.181:443               Route   100    0          0
> TCP  XX.XX.XX.190:80 wrr
>   -> XX.XX.XX.182:80                Route   7      25         151
>   -> XX.XX.XX.181:80                Route   7      14         153
>   -> XX.XX.XX.180:80                Route   86     208        1836
>
> # vmstat 3
>    procs                      memory    swap          io     system         
> cpu
>  r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy  
> id
>  1  0  1  43496  11256 184536  38580   1   0     1     0  655   100   6  53  
> 41
>  0  0  0  43496  11248 184536  38580   0   0     0    63  729   110   1  57  
> 42
>  0  0  0  43496  11236 184536  38580   0   0     0     9  685   107   2  56  
> 42
>  0  0  1  43496  11232 184536  38580   0   0     0     0  592    97   1  57  
> 42
>  0  0  0  43496  11228 184536  38580   0   0     0    16  586   108   1  56  
> 42
>  0  0  0  43496  11220 184536  38580   0   0     1     9  705   102   1  56  
> 43
>  0  0  0  43496  11208 184536  38580   0   0     0     0  729   104   3  57  
> 41

        And what I see is a low number of interrupts, something like
500 packets/sec ? And there is mostly system time, no user time. Check
for processes dealing with many files in one dir (ext2) or similar.
But there is no block i/o. May be there are processes that waste too
much system time, for example, cycling in syscalls. Check with top.
The last step is to update the kernel or to change the hardware. If the
most suspected is LVS then your CPU does not behave like a 700MHz one,
may be as 486. Or may be you have ISA NIC(s) :)

> # uptime
>   9:11am  up 40 days, 17:14,  3 users,  load average: 0.00, 0.00, 0.00

        It is possible one running process (not detected in loadave)
to make the problems.

> Thanks,


Regards

--
Julian Anastasov <ja@xxxxxx>



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