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.

updatedb, can I disable it?

Discussion in 'General Discussion' started by VIPsNET, Aug 13, 2004.

  1. VIPsNET

    VIPsNET Active Member

    Joined:
    Jun 13, 2002
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    hi, can you guys tell me if I can disable the updatedb so it does not run each day at 4AM ? Will it cause any problems to the server when I disable it or I won't be just able to use 'locate' command ?
     
  2. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lewisville, Tx
    Why would you want to stop it?
     
  3. VIPsNET

    VIPsNET Active Member

    Joined:
    Jun 13, 2002
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    It increases load and sometimes kills my server. Just wake up at 4AM and You will see what I'm talking about, especilly on a busy servers.

    So can I disable it without any problems ?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    You can disable it if you want (by removing /etc/cron.daily/slocate.cron) but you will effectievly not be able to use locate anymore as it will be completely unreliable and so should remove the database:
    rm /var/lib/slocate/slocate.db

    It is, obviously, very I/O intensive when slocate runs, but it really is an essential tool for server administration and will definitely hamper managing a server having it disabled and unsable. What you could do is move the slocate.cron out of /etc/cron.daily and run it through the root crontab at a more convenient time of the day for you when your server load is at its lightest.
     
  5. VIPsNET

    VIPsNET Active Member

    Joined:
    Jun 13, 2002
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Jonathan, thank You for the reply.
     
  6. clook

    clook Well-Known Member
    PartnerNOC

    Joined:
    Jun 9, 2002
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Preston, UK
    We've had the slocate cron removed on our servers for a while for this reason. The locate command isn't used a whole lot but if it is needed at any time it's no biggie just to run updatedb beforehand as and when needed.
     
  7. kris1351

    kris1351 Well-Known Member

    Joined:
    Apr 18, 2003
    Messages:
    963
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Lewisville, Tx
    If your system is that overloaded there are more issues than updatedb. One solution is to load SPRI from http://www.rfxnetworks.com. This will allow you to change the priority of applications when they run so they are not at the highest priority like Linux typically runs them.
     
  8. patchwork

    patchwork Well-Known Member

    Joined:
    Nov 2, 2001
    Messages:
    92
    Likes Received:
    0
    Trophy Points:
    16
    I was getting very high server loads at night 60+, I finally tracked it down to the /etc/cron.daily/slocate.cron script

    Pete
     
Loading...

Share This Page