You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using goofys + catfs and observing that if I read the first N bytes of a file, it seems to cache only those bytes and not the whole file as stated in the README.
Example of reading first N bytes (same behavior happens when reading from a python script:
head --bytes 100 /tmp/test_dir_mount/large_file.mp4
The size of the large file here is 158M:
ls -halp /tmp/test_dir_mount/large_file.mp4
However the size of the cached file after the read is 128K:
ls -halp /tmp/test_dir_cache/large_file.mp4
I have tested this with multiple files and reads from 10 bytes up to 100M, resulting in the same behavior of only caching the read part. If instead the last N bytes are read, the entire file is cached.
This seems to contradict the README, which states Entire file is cached if it's open for read, even if nothing is actually read..
My desired behavior would be to have a flag that toggles these two behaviors, and appropriate documentation. As it currently stands, one of our use cases is failing because it depended on caching the entire file on touching it.
Finally, please comment if this should be opened as a goofys issue instead.
System:
goofys version 0.24.0-45b8d78375af1b24604439d2e60c567654bcdf88
catfs 0.9.0 (also tried 0.8.0 and 0.7.0)
Linux 4.15.0-142-generic #146~16.04.1-Ubuntu SMP Tue Apr 13 09:27:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered:
I am using
goofys
+catfs
and observing that if I read the first N bytes of a file, it seems to cache only those bytes and not the whole file as stated in the README.Mount command:
Example of reading first N bytes (same behavior happens when reading from a python script:
The size of the large file here is 158M:
However the size of the cached file after the read is 128K:
I have tested this with multiple files and reads from 10 bytes up to 100M, resulting in the same behavior of only caching the read part. If instead the last N bytes are read, the entire file is cached.
This seems to contradict the README, which states
Entire file is cached if it's open for read, even if nothing is actually read.
.My desired behavior would be to have a flag that toggles these two behaviors, and appropriate documentation. As it currently stands, one of our use cases is failing because it depended on caching the entire file on touching it.
Finally, please comment if this should be opened as a goofys issue instead.
System:
The text was updated successfully, but these errors were encountered: