[Gluster-users] Old story - glusterfs memory usage

Amon Ott ao at m-privacy.de
Mon Mar 29 14:07:01 UTC 2010


On Monday 29 March 2010 wrote Krzysztof Strasburger:
> On Fri, Mar 26, 2010 at 03:40:27PM +0100, Amon Ott wrote:
> > > Now we should check, whether fuse_forget() is called at all during the
> > > test. I would not assume blindly that it is.
> >
> > Added a counter to fuse_forget():
> > [2010-03-26 15:34:31] N [fuse-bridge.c:3203:fuse_thread_proc] fuse:
> > unmounting /home/user after 42732 forgets
>
> Great. BTW, is the number of forgets consistent with the number of touched
> files? If the latter would be significantly larger, it could mean that the
> kernel decided not to forget some inodes, for whatever reason. Hmmm. The
> calls to forget could be also made after the umount request. The solution
> would be to log each forget() with its time stamp. I know, this means
> flooding the logfile, but for a test, we could live with it. But maybe not
> needed. I remember running glusterfs under valgrind and there were lots of
> still allocated memory before exiting. So fuse_forget() does not forget?

40161 forgets for non-dirs:
[2010-03-29 15:22:14] N [fuse-bridge.c:3207:fuse_thread_proc] fuse: 
unmounting /home/user after 2839 dir and 40161 other forgets

But 56473 files there backed up:
find /home/user/ -type f| wc -l
56473

And 5324 dirs:
find /home/user/ -type d| wc -l
5324

So either I get something wrong or fuse does not deliver all forgets. Still, 
some memory should be freed after a while, but memory usage only grows.

If the dentry and inode structs in the gluster code follow the idea in the 
Linux kernel, it could be that the dentry cache is not cleaned up with 
forget. So repeated lookups find the existing dentry in the cache and the 
glusterfs process does not grow with repeated accesses, but memory does not 
get freed. Memory does not even seem to be freed when I delete complete 
directory trees, so I guess that something with the reference counters of 
dentries is wrong.

The gluster code for inodes and dentries is too complicated for me to 
understand within some minutes, so I leave it to others who know it better.

Amon Ott
-- 
Dr. Amon Ott - m-privacy GmbH
Am Köllnischen Park 1, 10179 Berlin
Tel: +49 30 24342334
Fax: +49 30 24342336
Web: http://www.m-privacy.de
Handelsregister:
 Amtsgericht Charlottenburg HRB 84946
Geschäftsführer:
 Dipl.-Kfm. Holger Maczkowsky,
 Roman Maczkowsky
GnuPG-Key-ID: EA898571



More information about the Gluster-users mailing list