Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 53

Thread: HOWTO: Clear filesystem memory cache

  1. #11
    Join Date
    Apr 2006
    Location
    Alberta,Canada
    Beans
    1,135
    Distro
    Ubuntu Development Release

    Re: HOWTO: Clear filesystem memory cache

    Quote Originally Posted by crazy17 View Post
    Hi guys! This doesn't seem to work in 10.04. I get
    Code:
    bash: /proc/sys/vm/drop_caches: Permission denied
    I am not well versed in the terminal and have only been using linux for a couple of months now. I am using PAE with 6 gb of ram. Hope you guys can help. Oh, and the system monitor shows full memory cache use.
    I had the same problem...even sudo wouldn't let me.

    This worked however...
    Code:
    sudo su
    echo 3 > /proc/sys/vm/drop_caches
    What color do Smurfs turn when you choke em?
    ____________________________

  2. #12
    Join Date
    May 2010
    Beans
    1

    Re: HOWTO: Clear filesystem memory cache

    Quote Originally Posted by crazy17 View Post
    Hi guys! This doesn't seem to work in 10.04. I get
    Code:
    bash: /proc/sys/vm/drop_caches: Permission denied
    I am not well versed in the terminal and have only been using linux for a couple of months now. I am using PAE with 6 gb of ram. Hope you guys can help. Oh, and the system monitor shows full memory cache use.
    sudo su
    sync
    echo 3 > /proc/sys/vm/drop_caches

  3. #13
    Join Date
    Apr 2009
    Location
    not where I want to...
    Beans
    65
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Clear filesystem memory cache

    Thanks, this worked a treat.
    (\__/)
    (='.'=) The Senator, while claiming he was not intoxicated,
    (")_(") could not explain his nudity.

  4. #14
    Join Date
    Nov 2009
    Location
    Sri Lanka
    Beans
    31
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Clear filesystem memory cache

    don't use
    HTML Code:
    sudo
    to run it as root. Log in to the system as root, then this works fine
    sudo sync; echo 3 > /proc/sys/vm/drop_caches
    [sudo] password for darshana:
    bash: /proc/sys/vm/drop_caches: Permission denied

  5. #15
    Join Date
    Dec 2006
    Beans
    61

    Re: HOWTO: Clear filesystem memory cache

    Quote Originally Posted by darshana View Post
    don't use
    HTML Code:
    sudo
    to run it as root. Log in to the system as root, then this works fine
    I hate to 'sudo su' and it's ilk. I use:
    sudo sync; echo 3 | sudo tee /proc/sys/vm/drop_caches

  6. #16
    Join Date
    Mar 2010
    Beans
    10

    Re: HOWTO: Clear filesystem memory cache

    sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

    this worked for me on 10.04. i used the memory system monitor and it went down right away

  7. #17
    Join Date
    Nov 2006
    Beans
    31

    Re: HOWTO: Clear filesystem memory cache

    I tried these proposed solutions in Lucid lynx. No errors displayed. But the System Monitor showed no changes after, and I am having 37% of used memory and swap history. Is that normal?

  8. #18
    Join Date
    Oct 2009
    Beans
    39

    Re: HOWTO: Clear filesystem memory cache

    Quote Originally Posted by lakosshoots View Post
    sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"

    this worked for me on 10.04. i used the memory system monitor and it went down right away

    This worked great for me, thank you.

    I have 8gb 800 corsair (4x2gb)
    One of my issues with 10.04.
    Fresh reboot and watch a video using the default totem movie player and after about an hour my cache went up to about 68% after an hour.
    9.10 did not give me this issue with the same user setup profile.
    Also my cache would go up even using firefox.
    It seems to me the cache is not being cleared.
    If anyone has an answer to why this happens and what the causes are please post it here and also pm me, i always want to understand and learn.
    Thank you.

  9. #19
    Join Date
    Dec 2009
    Beans
    Hidden!
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: HOWTO: Clear filesystem memory cache

    that's cos ya need to be root ya crazyhorse

    sudo su root
    sync
    blah or whatever can't remember but it worked now it's a bash alias, thank you Sir.

  10. #20
    psusi is offline Ubuntu addict and loving it
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Beans
    3,980
    Distro
    Ubuntu Development Release

    Re: HOWTO: Clear filesystem memory cache

    As someone already mentioned, drop_caches is perfectly safe, there is no risk of data loss, however, the ONLY reason to do this is because you are doing performance benchmarking and want to time how long it takes to read something with a cold cache.

    Quote Originally Posted by Astrals View Post
    This worked great for me, thank you.

    I have 8gb 800 corsair (4x2gb)
    One of my issues with 10.04.
    Fresh reboot and watch a video using the default totem movie player and after about an hour my cache went up to about 68% after an hour.
    9.10 did not give me this issue with the same user setup profile.
    Also my cache would go up even using firefox.
    It seems to me the cache is not being cleared.
    If anyone has an answer to why this happens and what the causes are please post it here and also pm me, i always want to understand and learn.
    Thank you.
    That is SUPPOSED to happen. The cache is not supposed to be cleared. It is supposed to use all of your free ram to cache data you have accessed in case you need it again.


    Quote Originally Posted by guvnr View Post
    that's cos ya need to be root ya crazyhorse

    sudo su root
    sync
    blah or whatever can't remember but it worked now it's a bash alias, thank you Sir.
    Use sudo -s instead of sudo su.

Page 2 of 6 FirstFirst 1234 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •