mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [BUG] Possible cache memory leak.
@ 2007-09-21 10:00 Michał Kazior
  0 siblings, 0 replies; 2+ messages in thread
From: Michał Kazior @ 2007-09-21 10:00 UTC (permalink / raw)
  To: linux-kernel

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <95NCx-7eE-13@gated-at.bofh.it>]

end of thread, other threads:[~2007-09-21 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-21 10:00 [BUG] Possible cache memory leak Michał Kazior
     [not found] <95NCx-7eE-13@gated-at.bofh.it>
2007-09-21 14:47 ` Bodo Eggert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®