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

Support time_gran and max_pages fuse options #239

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

felixbuenemann
Copy link

This updated the supported FUSE protocol from 7.12 to 7.28.

The time_gran field can be set to a multiple of one nanosecond, if the
timestamps of files has less than nanosecond precision. This avoids
mismatches when the kernel compares timestamps.

The max_pages feature raises the maximum size of a FUSE message from 32
to 256 pages on Linux >= 4.20. This affects both reads and writes.
To be able to read more than 128 KB in a single ReadOp, Direct I/O must
also be used, since the kernel otherwise splits the read into 128 KB
chunks and requests them asynchronously (if max_readahead is at least
128 KB, otherwise max_readahead is used, or 4 KB if it is disabled).

This updated the supported FUSE protocol from 7.12 to 7.28.

The time_gran field can be set to a multiple of one nanosecond, if the
timestamps of files has less than nanosecond precision. This avoids
mismatches when the kernel compares timestamps.

The max_pages feature raises the maximum size of a FUSE message from 32
to 256 pages on Linux >= 4.20. This affects both reads and writes.
To be able to read more than 128 KB in a single ReadOp, Direct I/O must
also be used, since the kernel otherwise splits the read into 128 KB
chunks and requests them asynchronously (if max_readahead is at least
128 KB, otherwise max_readahead is used, or 4 KB if it is disabled).
fuse.go Show resolved Hide resolved
@darthShadow
Copy link

Would you mind also adding a mount option to set the max pages? It just makes it easier to test the difference caused due to increasing the max pages.

@tv42
Copy link
Member

tv42 commented Mar 2, 2020

Thank you, this looks interesting. I'm traveling for about a week but will get back to testing this after that.

@felixbuenemann
Copy link
Author

@tv42 Thanks for the update, no rush!

@felixbuenemann
Copy link
Author

@tv42 One think I'd like to discuss is wether the allocation of the buffer pool for fuse messages needs to be changed, because this change causes each buffer to be allocated with 1 MB + 4K instead of 128 K + 4 K.

In my testing I didn't really see a notable jump in memory usage, but that might be different with async reads or writes when lots more fuse messages can be in flight.

@ivandeex ivandeex mentioned this pull request Jan 11, 2021
5 tasks
@ivandeex
Copy link

@tv42 @felixbuenemann
Why is this PR stalled?

@felixbuenemann
Copy link
Author

@ivandeex No idea, but since other features with a higher fuse level have been implemented in the mean time this will need to ne rebased on top of those changes.

I have also started work to support macFuse 4.x, but I currently don't have the time to finish it. I could share my findings, if rclone is working on that as well (will be required for arm64 (M1) Macs).

@ivandeex
Copy link

Thank you, this looks interesting. I'm traveling for about a week but will get back to testing this after that.

@tv42
Please find time to review this PR.
rclone/rclone#3949 is pending on this one since March 2020.

cc @darthShadow
cc @felixbuenemann
cc @ncw

@darthShadow
Copy link

Hi @tv42,

Given the recent update in the FUSE protocol version support, would it be possible to reconsider this PR (once a rebase is done)? Is there anything that needs to be fixed in the approach?

Will fix #293.

@tv42
Copy link
Member

tv42 commented Dec 18, 2022

Yeah... the devil is in the details, in this case mostly the interaction with the memory allocation. It's already the part that slows down filesystems most.

@darthShadow
Copy link

Ah, alright. I am not very familiar with the working of fuse systems in general so can't comment on the impact of this change in terms of memory.

However, I am willing to help out with any testing at different values of max pages, if needed.

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

Successfully merging this pull request may close these issues.

4 participants