Hide Forgot
Not sure where this is coming from yet but a core dump showed glusterfsd with nfs using 5.7g memory during long running tests which were running for one week. The tests included compilebench and postmark on 2 clients. We need a thorough investigation into this.
Simplest way to reproduce: o Setup a simple posix exported through nfs. o Mount on nfs client. o Start top at the server. o Run the following command and see memory increase continuously. while [ true ]; do echo Copying..;cp -R /etc/ /mnt/;echo Removing..;rm -rf /mnt/*;done
The leak is somewhere in the file/dir inode_t creation path. Investigating..
Possible inode leak paths: o NFS LOOKUP followed by another NFS LOOKUP o NFS LOOKUP or CREATE followed by NFS REMOVE
First memory leak path: In root dir, create a file, then remove it. Just doing this results in inode of the newly created file to leak. Commands to use: 1. touch <MNT-POINT>/testfile 2. rm -f <MNT-POINT>/testfile Second memory leak path: 1. mkdir <MNT-POINT>/testdir 2. touch <MNT-POINT>/testdir/testfile 3. ls <MNT-POINT>/testdir Wait 30 secs. 4. stat <MNT-POINT>/testdir The fd for testdir has leaked by this time. I think it is because when a dir inode is used as a parent inode, it is not being unrefd correctly.
PATCH: http://patches.gluster.com/patch/5031 in master (nfs: Free inodes layer fop locals to fix memory leak)