python | gtk | gnome | ubuntu
sync ; sudo echo 3 | sudo tee /proc/sys/vm/drop_caches
Why would you want to clear the disk cache?I thought that disk cache is a way of getting to your recently used files faster.Please reply to pascal (at) tipisoft.dk
You want to clear cache for testing/profiling reasons, so you can run multiple tests while always starting with an empty cache. You should never do that in normal use, since the cache will have to be re-filled.
I hope you know about sync command, it is a good practice to use sync before you clear disk cache
Thanks, I needed this to benchmark/profile some applications that need access to the same files over and over.
Thanks for the hint!Using "sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'" probably makes more sense than involving tee.Also, your post is formatted such that I couldn't read the line (fixed width, font goes off edge) and had to dig it out of the HTML source. :-)But again, thanks.
Post a Comment
5 commentaires:
Why would you want to clear the disk cache?
I thought that disk cache is a way of getting to your recently used files faster.
Please reply to pascal (at) tipisoft.dk
You want to clear cache for testing/profiling reasons, so you can run multiple tests while always starting with an empty cache. You should never do that in normal use, since the cache will have to be re-filled.
I hope you know about sync command, it is a good practice to use sync before you clear disk cache
Thanks, I needed this to benchmark/profile some applications that need access to the same files over and over.
Thanks for the hint!
Using "sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'" probably makes more sense than involving tee.
Also, your post is formatted such that I couldn't read the line (fixed width, font goes off edge) and had to dig it out of the HTML source. :-)
But again, thanks.
Post a Comment