The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cpanel cron job causing very high load

Discussion in 'General Discussion' started by hmm, Jan 11, 2006.

  1. hmm

    hmm Well-Known Member

    Joined:
    Jan 11, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Hi,
    I am running Dual Xeon 2.4 machine with 1 GIG RAM.
    For last few days I have been facing this strange load problem.

    The load reaches very high (around 30+) when /etc/cron.daily is run..

    It doesnt happen when it runs logrotate but the loado starts increasing when it reaches updatedb task..

    and once I kill that task..the load starts going down...

    following things were found in in cron.daily folder

    Code:
    lrwxr-xr-x    1 root     root           28 Sep 18 07:32 00-logwatch -> ../log.d/scripts/logwatch.pl*
    -rwxr-xr-x    1 root     root           57 Sep 18 13:38 fw*
    -rwxr-xr-x    1 root     root          180 Jul  9  2003 logrotate*
    -rwxr-xr-x    1 root     root          418 Aug 27  2003 makewhatis.cron*
    -rwxr-xr-x    1 root     root         1603 May  5  2004 prelink*
    -rwxr-xr-x    1 root     root          120 Sep 18 14:17 rkhunter.sh*
    -rwxr-xr-x    1 root     root          104 Mar  2  2005 rpm*
    -rwxr-xr-x    1 root     root          104 Jul 15 09:21 rpm.rpmnew*
    -rwxr-xr-x    1 root     root          132 Aug  8 18:38 slocate.cron*
    -rwxr-xr-x    1 root     root          271 Aug  4 02:25 squirrelmail.cron*
    -rwxr-xr-x    1 root     root          193 Feb 10  2003 tmpwatch*
    
    the exact name of that file is slocate.cron

    following is the content of that file

    Code:
    #!/bin/sh
    renice +19 -p $$ >/dev/null 2>&1
    /usr/bin/updatedb -f "nfs,smbfs,ncpfs,proc,devpts" -e "/tmp,/var/tmp,/usr/tmp,/afs,/net"
    
    I cannot paste the output of "top" because server is running fine now.

    Can anyone put some light on it so I can trace the problem and fix it?
     
  2. hmm

    hmm Well-Known Member

    Joined:
    Jan 11, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    Hi,
    It happened again and this time I managed to get the output of top...

    Here is the output...

    Code:
    04:20:28  up 1 day,  3:15,  1 user,  load average: 11.89, 8.40, 6.28
    292 processes: 283 sleeping, 6 running, 2 zombie, 1 stopped
    CPU states:  cpu    user    nice  system    irq  softirq  iowait    idle
               total   11.3%    0.1%   19.8%   0.0%     0.2%   68.3%    0.0%
               cpu00   13.8%    0.1%   19.8%   0.1%     0.9%   64.9%    0.0%
               cpu01   11.4%    0.0%   19.8%   0.0%     0.0%   68.7%    0.0%
               cpu02    9.1%    0.1%   18.8%   0.1%     0.0%   71.6%    0.0%
               cpu03   10.9%    0.3%   20.8%   0.0%     0.0%   67.8%    0.0%
    Mem:  1025320k av, 1007052k used,   18268k free,       0k shrd,  207260k buff
                        706032k actv,  132480k in_d,   18492k in_c
    Swap: 2040212k av,  219040k used, 1821172k free                  190280k cached
    
      PID USER     PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
    28939 mysql     15   0 44088  34M  2152 S     3.4  3.4   0:00   1 mysqld
    26203 nobody    15   0 20444  15M  2920 S     1.1  1.5   0:00   0 httpd
       12 root      15   0     0    0     0 SW    1.0  0.0   2:12   1 kscand
    26322 root      25   0  1008 1008   832 R     0.8  0.0   0:00   1 bfd
    23248 nobody    15   0 24184  20M  3200 S     0.5  2.0   0:42   3 httpd
    13519 root      34  19   768  588   440 D N   0.5  0.0   0:06   0 updatedb
    27307 root      15   0  1196 1196   920 R     0.4  0.1   0:00   2 rpmq
    32728 root      21   0  5188 5188  2880 R     0.4  0.5   0:00   0 apacheadmin
    31436 homebusi  17   0  6880 4276  1600 S     0.3  0.4   0:00   1 cpsrvd
    26210 nobody    15   0 16844  12M  2856 S     0.2  1.2   0:00   2 httpd
    30711 mailnull  15   0  3516 3516  2360 R     0.2  0.3   0:00   3 exim
    32074 homebusi  19   0  6880 4264  1600 S     0.2  0.4   0:00   0 cpsrvd
    32080 homebusi  19   0  6880 4264  1600 S     0.2  0.4   0:00   3 cpsrvd
     3661 root      15   0  4316 1656   980 S     0.1  0.1   2:32   2 authProg
    23250 nobody    15   0 24244  20M  3552 S     0.1  2.0   0:51   3 httpd
    23251 nobody    15   0 24132  20M  3476 S     0.1  2.0   0:32   3 httpd
    23292 nobody    15   0 23716  19M  3552 D     0.1  1.9   0:47   0 httpd
     3257 nobody    15   0 24144  19M  3484 S     0.1  1.9   0:45   1 httpd
    10970 root      16   0  6308 2752  1116 S     0.1  0.2   0:02   3 cpsrvd
    25876 nobody    15   0 21584  17M  3020 S     0.1  1.7   0:00   0 httpd
    26316 root      15   0  1316 1316   884 R     0.1  0.1   0:00   2 top
    29515 mysql     15   0 44088  34M  2152 S     0.1  3.4   0:00   3 mysqld
        1 root      15   0   452  444   396 S     0.0  0.0   0:07   1 init
        2 root      RT   0     0    0     0 SW    0.0  0.0   0:00   0 migration/0
        3 root      RT   0     0    0     0 SW    0.0  0.0   0:00   1 migration/1
        4 root      RT   0     0    0     0 SW    0.0  0.0   0:00   2 migration/2
        5 root      RT   0     0    0     0 SW    0.0  0.0   0:00   3 migration/3
        6 root      15   0     0    0     0 SW    0.0  0.0   0:00   0 keventd
        7 root      34  19     0    0     0 SWN   0.0  0.0   0:00   0 ksoftirqd/0
        8 root      34  19     0    0     0 SWN   0.0  0.0   0:00   1 ksoftirqd/1
        9 root      34  19     0    0     0 SWN   0.0  0.0   0:00   2 ksoftirqd/2
       10 root      34  19     0    0     0 SWN   0.0  0.0   0:00   3 ksoftirqd/3
       13 root      15   0     0    0     0 SW    0.0  0.0   0:00   3 bdflush
    
    it shows very high iowait time...

    following is the output of vmstat command

    Code:
    procs                      memory      swap          io     system         cpu
     r  b   swpd   free   buff  cache   si   so    bi    bo   in    cs us sy id wa
     0 17 224928  15904 205432 184612    4    7    48    89   60   102  4  2 79 15
    Can anyone figure out anything?

    The load went down just after I killed updatedb process...
     
  3. hmm

    hmm Well-Known Member

    Joined:
    Jan 11, 2006
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    India
    I guess i fixed it...

    the problem was with updatedb itself..when it was reaching few files it was getting stuck and the load was going very high..

    The same problem occured when I ran the command manually...so I have commented it out from the daily cronjob...
     
Loading...

Share This Page