On Tue, 2013-06-11 at 14:06 +0200, Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 2013-06-11 14:01, Per Jessen wrote:
Roger Oberholtzer wrote:
Try /proc/sys/vm/drop_caches
from https://www.kernel.org/doc/Documentation/sysctl/vm.txt ---------------------------------------------------------------------
Writing to this will cause the kernel to drop clean caches, dentries and
inodes from memory, causing that memory to become free.
To free pagecache: echo 1 > /proc/sys/vm/drop_caches To free dentries and inodes: echo 2 > /proc/sys/vm/drop_caches To free pagecache, dentries and inodes: echo 3 > /proc/sys/vm/drop_caches
As this is a non-destructive operation and dirty objects are not freeable, the user should run `sync' first. --------------------------------------------------------------------
But
as this empties all, not only the ones he wants, other processes read/writing to disk will delay. For instance, syslog. Or library loading. Whatever. :-)
In my strange use, I have only one single writer per disk, no reader. No files are deleted. Just one growing file (up to 2GB) on a pristine disk. As a little test, I made a 60 second loop that runs the following each iteration: echo 1 > /proc/sys/vm/drop_caches This results in the cache going away. More interestingly, it seems that this also results in even write times. There are small variations, which I expect. But I have yet to see the longer ones. There is no discernible delay when the command is run. Just less memory given over to cache, and (fingers crossed) less periodic housekeeping as a result. Of course, I have been fooled before. Longer tests are needed. Yours sincerely, Roger Oberholtzer Ramböll RST / Systems Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 roger.oberholtzer@ramboll.se ________________________________________ Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden www.rambollrst.se -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org