-
Notifications
You must be signed in to change notification settings - Fork 241
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
[RFC] Ideas to reduce memory usage #132
Labels
Comments
rfjakob
added a commit
that referenced
this issue
Jul 30, 2017
...and move all profiling functionality to its own file, as the main function is already long enough. Periodically saving the memory profile allows capturing the used memory during normal operation, as opposed to on exit, where the kernel has already issued FORGETs for all inodes. This functionality has been used to create the memory profile shown in #132 .
rfjakob
added a commit
that referenced
this issue
Jul 30, 2017
...and move all profiling functionality to its own file, as the main function is already long enough. Periodically saving the memory profile allows capturing the used memory during normal operation, as opposed to on exit, where the kernel has already issued FORGETs for all inodes. This functionality has been used to create the memory profile shown in #132 .
rfjakob
added a commit
to rfjakob/go-fuse
that referenced
this issue
Sep 2, 2017
The "generation" field in "Inode" is not used anywhere. "portableHandleMap" has it's own generation field, which is actually used. The "check" field, embedded through the "handled" struct, is checked for zero, but never set. This is part of an effort to reduce the memory usage of go-fuse and gocryptfs. Details can be seen at rfjakob/gocryptfs#132 .
rfjakob
added a commit
to rfjakob/go-fuse
that referenced
this issue
Sep 2, 2017
Reduces Sizeof(nodefs.Inode{}) from 112 to 96 bytes. The "generation" field in "Inode" is not used anywhere. "portableHandleMap" has it's own generation field, which is actually used. The "check" field, embedded through the "handled" struct, is checked for zero, but never set. This is part of an effort to reduce the memory usage of go-fuse and gocryptfs. Details can be seen at rfjakob/gocryptfs#132 .
hanwen
pushed a commit
to hanwen/go-fuse
that referenced
this issue
Sep 3, 2017
Reduces Sizeof(nodefs.Inode{}) from 112 to 96 bytes. The "generation" field in "Inode" is not used anywhere. "portableHandleMap" has it's own generation field, which is actually used. The "check" field, embedded through the "handled" struct, is checked for zero, but never set. This is part of an effort to reduce the memory usage of go-fuse and gocryptfs. Details can be seen at rfjakob/gocryptfs#132 .
Good enough. Not a single user complaint about memory usage. |
I have major problems with RSS usage using the ubuntu 20.04 LTS version of armhf: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am looking at the memory usage of a gocryptfs mount right now, containing 531300 inodes. After an
ls -R
, we are at 470MB RSS, with all of the inodes cached by the kernel. EncFS uses 92MB RSS for the same workload.Looking at the memory profile, most of the memory is used in
One could argue that the problem solves itself once the kernel starts evicting inodes from the cache, but still, there might be room for improvement.
For future reference, I'm pasting the most interesting part of the profile below and attaching the full memory profile and gocryptfs binary.
2.memprofile.tar.gz
The text was updated successfully, but these errors were encountered: