lkml.org 
[lkml]   [2007]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[BUG] Possible cache memory leak.
Hi,

I've discovered a strange thing lately. My memory is being sucked out
when doing (I suppose) _a lot_ of stat() on the file system. I got left
once with ~30MB of ram (of 512 in total) which made my system trash
like hell. You might try doing the following to reproduce the effect:

$ echo 1 > /proc/sys/vm/drop_caches
$ vmstat # write down the result
$ du -s -x /lots/of/files # keep it running for a minute
$ echo 1 > /proc/sys/vm/drop_caches
$ vmstat # write it down too

The latter vmstat should report less memory then the previous one.
(sum up free+buff+cache) Is this an expected behaviour ? If yes,
please explain.

The memory can be magically freed by umount-ing the partition that was
scanned or by deleting the files that were stat()-ed. However, one
cannot simply umount "/".

Note: Make sure you point 'du' to a place where you have dozens of
files, so it can keep it running for a minute or more.

I can confirm that to be an issue to 2.6.23-rc6 and 2.6.23-rc7.
A friend of mine reports that 2.6.22.5 produces same results.
Tested on jfs and ext3.


Regards,
Michał Kazior.


PS. I'm not subscribed to the list, so CC me please.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-09-21 12:03    [W:0.037 / U:0.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site