Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak when mounting volumes? #14

Open
OskarPersson opened this issue Jun 16, 2016 · 2 comments
Open

Memory leak when mounting volumes? #14

OskarPersson opened this issue Jun 16, 2016 · 2 comments

Comments

@OskarPersson
Copy link

OskarPersson commented Jun 16, 2016

Is there a memory leak in the API? Running the script below from the python interpreter results in a very high memory usage that stays high until exiting the python interpreter.

#foo.py

from gluster.gfapi import Volume

def main():
    for _ in xrange(20):
        v = Volume("master", "glustervolume")
        v.mount()
        v.umount()

if __name__ == "__main__":
    main()

This can also be seen using the vprof memory profiler

$ vprof -c cmh -s bar.py

Or am I missing something?

@prashanthpai
Copy link
Contributor

@OskarPersson This is a known issue present in the libgfapi C library. The python-bindings cannot do much here to do the cleanup. Freeing up all the resources during unmount is intricate and complex. It was addressed to some extent earlier and has improved over time. However there are further residual cleanups that needs to be done.

@prashanthpai
Copy link
Contributor

@OskarPersson Many consumers of libgfapi C library (Samba, NFS ganesha) usually do mount once and consume the same session for all subsequent I/O operations. May I know whether your actual application workflow intends to mount and unmount multiple times ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants