Mailinglist Archive: opensuse (1239 mails)

< Previous Next >
Re: [opensuse] Re: XFS and openSUSE 12.1
  • From: Per Jessen <per@xxxxxxxxxxxx>
  • Date: Tue, 11 Jun 2013 14:01:05 +0200
  • Message-id: <kp73i1$4vp$>
Roger Oberholtzer wrote:

I have seen one unexpected thing: when running xosview during all
this, the MEM usage shows the cache use slowly growing. The machine
has 32 GB of RAM. The cache use just grows and grows as file file
system is written to. Here is the part I don't get:

* If I close all apps that have a file open on the file system, the
cache use remains.
* If I run the 'sync(1)' command, the cache use remains. I would have
thought that the cache would be freed as there is nothing left to

sync flushes changed blocks to disk, but the file systems cache will
still hold data cached for reading.

If not immediately, over a decent amount of time. But this is
not the case.
* Only when I unmount the file system does the cache get freed.

Try /proc/sys/vm/drop_caches

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.

Per Jessen, Zürich (20.4°C) - free DNS hosting, made in Switzerland.

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
This Thread