Re: cpu usage
Mario Remy Almeida <[email protected]>
| Newsgroups | gmane.mail.qmail.ldap |
|---|---|
| Organization | ISA |
| Message-ID | <1221376399.6544.59.camel@mario> |
Hi Russ, Thanks for the advice. I am using maillog file since a year past without any problem the problem of 100% cpu usage started just a month back. I never added tarpit count and delay rest other options i was using them. I have added now will observe it for 2 days and let you know the status. Regards, Mario On Thu, 2008-09-11 at 10:21 -0400, Russell Simpkins wrote: > > > > 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 > > > > Well, you sure do have something there. At least nothing is blocked. Does > this go away if you restart qmail? How long does it take to get back up to > 100%. Your logs sure aren't showing off the activity. I would stop qmail, > make sure everything is shutdown, then restart and watch the logs to see > how fast it spikes. Also, make sure you verify you don't have a massive > maillog file. > > > Why are you running qmail-smtpd as root? You really should not do that. > > I wonder if you have someone spamming from your server. Do you have > MAXRCPTCOUNT set? I would turn that on if you don't. I've seen people try > to bcc 1000's of people which can be a drag on your system. > > cat /etc/tcp.smtp > 127.:allow,RELAYCLIENT="",RCPTCHECK="",RETURNMXCHECK="",SANITYCHECK="",MAXRCPTCOUNT="50",TARPITCOUNT="10",TARPITDELAY="5" > :allow,SMTPAUTH="",RCPTCHECK="",SENDERCHECK="",RETURNMXCHECK="",SANITYCHECK="",MAXRCPTCOUNT="50",TARPITCOUNT="10",TARPITDELAY="5" > > Russ >