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.

What is an Updatedb process

Discussion in 'General Discussion' started by achieverzain, May 18, 2010.

  1. achieverzain

    achieverzain Registered

    Joined:
    May 18, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    Can any one explain me better about why the update db process in the server is increasing the load to a great extent where is the PU resource usage was not found great for that process. Was searching for it for a long time still unable to find something more helpful.

    Thanks.
     
  2. DomineauX

    DomineauX Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    414
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    That would be the daily cron to update the locate database:

    /etc/cron.daily/mlocate.cron


    From the Man page (command: man updatedb):
    ---------
    DESCRIPTION
    updatedb creates or updates a database used by locate(1). If the database already exists, its data is reused to avoid rereading directories that have not changed.
    updatedb is usually run daily by cron(8) to update the default database.
    ---------
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    DomineauX covered it pretty good but just to expand upon that ....

    Updatedb is part of 'mlocate' which is simply an indexing system to keep a database listing all the files on your server that you can do searches from using the 'locate' command at the shell.

    It it much faster to use 'locate' than 'find' to locate files because 'locate' uses the index database last built by updatedb while 'find' searches the live file system looking for the files you are searching.

    The loads during updatedb running because of it building the database but should have very limited impact to your server other than really negligible and marginally higher load numbers while running. If it is impacting your server more than that then I suspect that you don't have enough memory to really be running Cpanel or your server has far too many accounts loaded on it --- on or the other most likely.

    The 'updatedb' is run daily from /etc/cron.daily/mlocate.cron and is controlled by the configuration settings in /etc/updatedb.conf
     
Loading...

Share This Page