Re: cpu usage

Mario Remy Almeida <[email protected]>
Newsgroups gmane.mail.qmail.ldap
Organization ISA
Message-ID <1221137511.6544.38.camel@mario>
Hi Russ,

There is no problem if kernel allows qmail-smtpd for 100% cpu usage but
the load average should not go high. which means there are more request
waiting for the processor.


Please help me with this issue

Below is the output of top and vmstat.


Output of  *** TOP ***


 12:15:53  up 37 days,  5:10,  4 users,  load average: 32.13, 31.24,
30.32
156 processes: 123 sleeping, 33 running, 0 zombie, 0 stopped
CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
           total   98.5%    1.1%    0.2%   0.0%     0.0%    0.0%    0.0%
           cpu00   98.6%    0.7%    0.5%   0.0%     0.0%    0.0%    0.0%
           cpu01   98.4%    1.5%    0.0%   0.0%     0.0%    0.0%    0.0%
Mem:   244072k av,  234236k used,    9836k free,       0k shrd,   34580k
buff
                     74336k actv,   10812k in_d,    1744k in_c
Swap: 1052248k av,   30248k used, 1022000k free                   42360k
cached

  PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU
COMMAND
26509 root      25   0   180  180   104 R     3.9  0.0  54:16   1
qmail-smtpd
27131 root      25   0   180  180   104 R     3.9  0.0  35:45   0
qmail-smtpd
27939 root      25   0   180  180   104 R     3.9  0.0  26:53   1
qmail-smtpd
28198 root      25   0   180  176   104 R     3.9  0.0  24:13   0
qmail-smtpd
28307 root      25   0   180  180   104 R     3.9  0.0  23:43   0
qmail-smtpd
29099 root      25   0   188  188   112 R     3.9  0.0  16:32   1
qmail-smtpd
29460 root      25   0   268  268   192 R     3.9  0.1  14:32   1
qmail-smtpd
29540 root      25   0   264  264   192 R     3.9  0.1  13:47   0
qmail-smtpd
30162 root      25   0   268  268   192 R     3.9  0.1   9:36   1
qmail-smtpd
32114 root      25   0   448  448   372 R     3.9  0.1   2:05   1
qmail-smtpd
28777 root      25   0   188  188   112 R     3.7  0.0  19:00   1
qmail-smtpd
30403 root      25   0   268  268   192 R     3.6  0.1   8:43   1
qmail-smtpd
30390 root      25   0   268  268   192 R     3.1  0.1   8:35   0
qmail-smtpd
26009 root      25   0   180  180   104 R     2.9  0.0  91:38   1
qmail-smtpd
26236 root      25   0   176  176   104 R     2.9  0.0  70:51   0
qmail-smtpd
26434 root      25   0   176  176   104 R     2.9  0.0  57:30   0
qmail-smtpd
26629 root      25   0   180  180   104 R     2.9  0.0  47:31   0
qmail-smtpd
26902 root      25   0   180  180   104 R     2.9  0.0  41:03   1
qmail-smtpd
26957 root      25   0   184  180   104 R     2.9  0.0  41:45   1
qmail-smtpd
27411 root      25   0   180  180   104 R     2.9  0.0  33:25   1
qmail-smtpd
28855 root      25   0   188  188   112 R     2.9  0.0  18:45   0
qmail-smtpd
29879 root      25   0   264  264   192 R     2.9  0.1  12:10   1
qmail-smtpd
25937 root      25   0   180  180   104 R     2.9  0.0  92:05   1
qmail-smtpd
30694 root      25   0   444  444   372 R     2.9  0.1   7:38   1
qmail-smtpd
31109 root      25   0   448  448   372 R     2.9  0.1   4:58   0
qmail-smtpd
31251 root      25   0   444  444   372 R     2.9  0.1   4:22   1
qmail-smtpd
31439 root      25   0   448  448   372 R     2.9  0.1   3:43   0
qmail-smtpd
32657 root      25   0   448  448   372 R     2.9  0.1   0:18   0
qmail-smtpd
32661 root      25   0   448  448   372 R     2.9  0.1   0:19   0
qmail-smtpd
28052 root      39  15   176  176   104 R N   0.5  0.0   6:35   0
qmail-smtpd
27108 root      39  19   176  176   104 R N   0.2  0.0  15:57   0
qmail-smtpd
27794 root      39  19   180  180   104 R N   0.2  0.0   7:16   0
qmail-smtpd


Output of vmstat for every 2sec


procs                      memory      swap          io     system
cpu
 r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy
id wa
34  0  29152  82484   3380  18852    0    0     0    56  136    52 100
0  0  0
34  0  29152  82052   3404  19128    0    0   146   104  152   110 100
0  0  0
34  0  29152  82052   3412  19132    0    0     0    74  136    52 100
0  0  0
35  0  29152  82052   3460  19152    0    0    10    92  121    82 100
0  0  0
33  0  29152  82068   3500  19140    0    0    12    84  114    62 100
0  0  0
33  0  29152  82068   3500  19140    0    0     0     0  130    36 100
0  0  0
33  0  29152  82068   3508  19140    0    0     0    66  137    61 100
0  0  0
33  0  29152  82068   3508  19140    0    0     0     0  132    40 100
0  0  0
33  0  29152  82068   3508  19140    0    0     0     0  105    34 100
0  0  0
33  0  29152  82068   3516  19140    0    0     0     6  109    36 100
0  0  0
33  0  29152  82068   3516  19140    0    0     0     0  137    38 100
0  0  0
33  0  29152  82068   3524  19140    0    0     0     6  106    35 100
0  0  0
33  0  29152  82068   3524  19140    0    0     0     0  133    38 100
0  0  0
33  0  29152  82068   3532  19140    0    0     0     6  109    37 100
0  0  0
33  0  29152  82068   3532  19140    0    0     0     0  105    32 100
0  0  0
35  0  29152  82060   3532  19140    0    0     0     0  137    49 100
0  0  0
33  0  29152  82068   3548  19136    0    0     4   112  142    56 100
0  0  0
33  0  29152  82068   3548  19136    0    0     0     0  128    38 100
0  0  0
33  0  29152  82068   3556  19136    0    0     0    84  149    62 100
0  0  0
34  0  29152  82068   3556  19136    0    0     0     0  107    35 100
0  0  0
33  0  29152  82068   3556  19136    0    0     0     0  130    38 100
0  0  0
33  0  29152  82068   3564  19136    0    0     0    58  119    35 100
0  0  0
33  0  29152  82068   3564  19136    0    0     0     0  127    38 100
0  0  0
33  0  29152  82068   3572  19136    0    0     0     6  106    38 100
0  0  0
33  0  29152  82068   3572  19136    0    0     0     0  108    32 100
0  0  0
33  0  29152  82068   3572  19136    0    0     0     0  134    37 100
0  0  0
33  0  29152  82068   3580  19136    0    0     0     6  108    37 100
0  0  0
33  0  29152  82068   3580  19136    0    0     0     0  132    39 100
0  0  0
33  0  29152  82068   3588  19136    0    0     0     6  108    36 100
0  0  0
33  0  29152  82068   3588  19136    0    0     0     0  105    34 100
0  0  0
33  0  29152  82068   3588  19136    0    0     0     0  131    37 100
0  0  0
33  0  29152  82068   3596  19136    0    0     0    24  108    35 100
0  0  0
33  0  29152  82068   3596  19136    0    0     0     0  134    39 100
0  0  0
33  0  29152  82068   3604  19136    0    0     0    32  118    66 100
0  0  0
33  0  29152  82068   3604  19136    0    0     0     0  131    54 100
0  0  0

Regards,
Mario

On Thu, 2008-09-11 at 07:47 -0400, Russell Simpkins wrote:
> > Hi Russ,
> >
> > As i told you that i have enabled the log level to 16 but no luck i
> > din't get any such messages releated to errors of cpu usage.
> >
> >
> > Regards,
> > Mario
> 
> Do you see anything abnormal when you look at the output of
> 
> top
> 
> or with
> 
> vmstat 2
> 
> ? Just because a process is using 100% of the cpu, does not in and of
> itself always mean there is a problem. If there are no other process
> running, then the kernel can allow the mail server to use 100%. You should
> look at top to see how busy the server is vs how idle. If the box is 98%
> busy and 2% idle and/or you see a lot of blocked threads with vmstat, then
> you should continue looking.
> 
> If you find that your server is too busy, you could try adjusting down
> some of your checks to see if that helps. Make sure that you don't have
> log files growing out of control. You can try a restart of qmail. You
> should verified that your ldap server is optimized.
> 
> Hope that helps.
> 
> Russ
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.