-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
when serval process read the same file,it will be slow using jni fuse #14007
Comments
@lilyzhoupeijie yes this is a known limitation. @LuQQiu will take a look on the potential optimizations later. |
when multiple processes reading the same file, The current way
To achieve one input stream for each process + each file, we need to use kind of
Could not come up with a solution that can truly improve the performance given the current libfuse structure. |
hi @lilyzhoupeijie one quick clarifications: when multiple processes are reading the same file, they will not be synchronized on the same input stream --- this is because each process gets a unique file descriptor (FD) with a dedicated input stream. The only case when different fuse threads are contending is when there are multiple 128-KB reads dispatched from libfuse but all are from the same process reading the same file. Do you observe slowness when you have only one process reading the file? |
discussed further offline with Lu, @lilyzhoupeijie I think there might be some slow read going on, preventing other libfuse worker threads competing the same FD to proceed. We want to reproduce this issue and identify the reason of the slowness. |
From the jstack, there are 31 libfuse threads, 19 are running fine, 8 are waiting to get data
4 are waiting to get the
There are 8 threads, 4 pairs, that share the same FileInStream @lilyzhoupeijie we do find that there is some contention during the FileInStream read, but the lock contention is not severe, but the more important problem is read being slow. If we modify to let each thread has one FileInStream, we may still face the read slowness issue. If the read slowness comes from resources contention like CPU resources contention, or network I/O, changing the FileInStream synchronization may not help. Can you share us more information of how to reproduce the issue? |
Close this issue, more important issue is some files are slow in reading |
when serval process read the same file,it will be slow using jni fuse
There is an synchronized func, and will cause read very slowly when reading the same file.
alluxio/integration/fuse/src/main/java/alluxio/fuse/AlluxioJniFuseFileSystem.java
The text was updated successfully, but these errors were encountered: