system caches

Discussion in 'macOS' started by chihiro, Dec 18, 2007.

  1. chihiro macrumors regular

    Joined:
    Mar 25, 2007
    #1
    Hi
    I would like to ask you is it good to clean (for better performance with software such as Main menu) the USER CACHES and SYSTEM CACHES please?
    and also could you please tell me whats the difference between them?

    thanks in advanced!
     
  2. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #2
    The user cache relates only to your account whereas the system cache relates to the whole operating system. They clear themselves automatically so there's no point in doing it manually. :)
     
  3. TheZA macrumors regular

    Joined:
    Sep 14, 2007
    #3
    As typically for mac maintenance questions, I've heard various opinions on this. Somewhere I read that if your computer was always turned off or in sleep during the time when the maintenance scripts were supposed to run that they wouldn't run and that your system performance would degrade. There is a command you can enter in Terminal to find out when they last ran. I don't have it with me, something like -al var/log/*.out
    When I do that I usually see that they ran fairly recently. You know that there are three; the daily, weekly, and monthly. They clean up your caches and some other stuff, and you might be able to find a description if you search the web. I found the command for finding out when they last ran and the description of what the scripts did somewhere on the web.

    Even so, I sometimes run them from Terminal; it can't hurt. Not 100% certain on the syntax without my reference, but I believe the command is:

    sudo periodic daily weekly monthly

    It will ask for your administrators password, and you will know it is complete when you get the prompt following your root directory with '%' (otherwise there isn't anything to tell you it is running.

    Oh, and you don't have to run all three.

    P.S. Be careful with what you do with sudo, as the warning will tell you, but it is hard to screw up the with periodic maintenance scripts.
     
  4. TheZA macrumors regular

    Joined:
    Sep 14, 2007
    #4
    Just confirmed, syntax of command (in Terminal) to find out when maintenance scripts last ran:

    ls -al /var/log/*.out

    and the command to run the utilities was correct:

    sudo periodic daily weekly monthly

    The daily script removes old log files, "scratch" and "junk" files, backs-up the NetInfo database, rotates system.log file, reports system statistics, and prunes logs. The weekly script rebuilds the locate and what is databases and rotates various log files. The monthly script reports per-user usage accounting and rotates various other logs.

    Caches are mostly cleared at startup, a reason you should restart periodically.
     
  5. mad jew Moderator emeritus

    mad jew

    Joined:
    Apr 3, 2004
    Location:
    Adelaide, Australia
    #5
    Since 10.4.2, the scripts run once the computer is woken from sleep assuming the computer was sleeping when they were scheduled. Unfortunately, this is not the case for a machine that has been shut down.
     
  6. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #6
    another reason to sleep rather than shutdown! :)
     

Share This Page