Replies: 4 comments 1 reply
-
It do hit page cache, you can check the access log when read. |
Beta Was this translation helpful? Give feedback.
-
Hi @jiefenghuang , thanks for the reply. How can I determine if these requests hit the page cache? As I understand it, requests that hit the page cache should bypass the user-space JuiceFS and be read directly from the kernel space, right? |
Beta Was this translation helpful? Give feedback.
-
yes, maybe you can add a log in fuse.go:Read(...). you could potentially introduce a deliberate delay (using a sleep function) right at the start of the vSlice.Read(...) method. By doing this, you might be able to observe and compare the differences in performance when the method is executed repeatedly. Performance is roughly the same because it hit read cache. |
Beta Was this translation helpful? Give feedback.
-
Hi @jiefenghuang, I found the cause of the issue. It was because I was reading a dataset with a large number of images, exceeding 10,000. I discovered in the official documentation that there is a parameter --open-cache-limit value: max number of open files to cache (soft limit, 0 means unlimited) (default: 10000) (https://juicefs.com/docs/community/command_reference/#mount-metadata-cache-options) When I set this parameter to 0, reading the dataset hits the page cache successfully. I have two things I'm unclear about:
|
Beta Was this translation helpful? Give feedback.
-
What happened:
When repeatedly reading some files in the same directory, which is expected to benefit from page cache established by the kernel, leading to performance improvements. However no speed-up is observed. The performance of repeated reads remains similar to that when the kernel cache is cleared.
When using juicefs profile tool to analyze, it shows that the average time spent per read operation remains approximately 4000 us, I think it is far from achieving the performance of in-memory page cache."
What you expected to happen:
Repeatedly reading files can hit the page cache.
Environment:
juicefs --version
) or Hadoop Java SDK version: 1.2.0+2024-06-18.873c47bBeta Was this translation helpful? Give feedback.
All reactions