-
Notifications
You must be signed in to change notification settings - Fork 120
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
Multithreading Support? #272
Comments
I think it might be possible: https://john-millikin.com/the-fuse-protocol#multi-threading I haven't tried to implement it though |
Will you implement it in the near Future? I don't think, that I'll be able to contribute that. My knowledge is to small. |
No. It'll be a long time, if ever, before I get to it
…Sent from my phone
On Fri, Dec 29, 2023, 5:59 AM Martin Maximilian Kutschka von Rothenfels < ***@***.***> wrote:
Will you implement it in the near Future? I don't think, that I'll be able
to contribute that. My knowledge is to small.
—
Reply to this email directly, view it on GitHub
<#272 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGNXQALERHP2NNX4PEQF7DYL3ECXAVCNFSM6AAAAABBF67ZI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZSGEYTANJXHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Hi, |
I've started work on adding Multi-threading support in my fork here: https://github.com/volfco/fuser |
thanks a lot, checking it now. |
Started a MR to close this. |
does this suggested solution have any significant benefit compared to the I really would like this kind of feature, but i'm also afraid of even more fragmentation realized by all this [partial working] fuse implementations. It's really hard to decide, which one to choose for performance critical applications. |
Hi Mash, |
fuse-mt is single-threaded when communicating with the kernel; same as fuser3. They both send the kernel request to a threadpool where multi-threaded processing can happen, but I would not call either of the true multi-threaded.
From what I saw, there is zero standard way libraries handle multi-threading (if they try at all). The best async implementation I've seen is https://github.com/datenlord/datenlord/blob/master/src/async_fuse, but they're not shipping it as a standalone crate. fuse3 would require a bit of work to re-work to support multi-threaded kernel communication. For my uses, async is less than idea, which is why I avoided looking more at fuse3 |
Thanks for your explanations. In the meanwhile I also took a look at the relevant source files. The approach suggested here and used in the datenlord implementation looks very similar to the strategy described in https://john-millikin.com/the-fuse-protocol#multi-threading. This may have the benefit, that it will just reproduce conventions already used in other traditional C implementations.
I'm not sure, if this 2nd variant is really slower in practice? Very likely it will not cover as much corner cases and possible application specific demands as the other one, because only those four functions are wrapped into concurrency improvements, but on the other hand it may reduce the synchronization overheap and code complexity of all other calls. In my specific use case multi threading is anyway only a rather simple kind of improvement but no perfect solution. It makes more sense in those cases, where you really run lots of computation within the application itself. But if you are just waiting for other external processes and similar kinds of blocking lightweight async solutions resp. their generated state machines would be a more desirable model to handle concurrency. But we all know, that this variant in real live doesn't come without other significant drawbacks... |
Hi Mash, |
Yes -- it's using the old
No -- I don't agree. But is this solution really the key to more throughput? The relevant papers don't give an answer because multithreading is just one improvement beside It's interesting, that the The required adaptations look rather small. That's somehow encouraging, because I would really like to base my work on a mature, widely used and well maintained crate like |
Hi Mash, |
fuse-mt bills itself as a high level library while saying [fuser] is the low level library, so I don't think they can be compared.
The primary motivation is to have multiple independent I/O streams between the userspace and kernel over different file descriptors. fuse-mt is still limited by a lock on the file descriptor as multiple threads will be trying to use the same descriptor.
My eventual goal is to be able to have my filesystem pin itself and the associated kernel thread to a specific core (which it would have exclusive access to. I'm assuming this will enable higher performance [because why not lol]), but even if it's a 20% gain- that's still something worth having. |
Hey,
I was wondering, if there is a Multithreading support in the current Version. I was experimenting with the examples/simple.rs and realized, that copying a large amount of files was really slow. My Computer was running 1CPU on 100% all the time. Is there a solution to improve the performance?
The text was updated successfully, but these errors were encountered: