-
Notifications
You must be signed in to change notification settings - Fork 11
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
Leofs_gateway do not cache large(1.2GB) files, although configured #14
Comments
I do more tests for sure by creating some big files to test how big Leofs_gateway will cache by: # dd if=/dev/urandom of=100MB_file bs=1M count=100 conv=fdatasync # dd if=/dev/urandom of=300MB_file bs=1M count=300 conv=fdatasync # dd if=/dev/urandom of=900MB_file bs=1M count=900 conv=fdatasync I upload 3 files to leofs, then download full files few times to make sure Leofs_gateway will cache it. ls -lRh /usr/local/leofs/1.2.6/leo_gateway/cache/data/ | less And i found that with above configuration, only 2 files are cached: ... /usr/local/leofs/1.2.6/leo_gateway/cache/data/10: total 300M -rw-r----- 1 root root 300M Mar 4 11:18 hehe1%2F300MB_file .... /usr/local/leofs/1.2.6/leo_gateway/cache/data/4: total 108M -rw-r----- 1 root root 100M Mar 4 11:11 hehe1%2F100MB_file -rw-r----- 1 root root 7.6M Mar 4 11:05 hehe1%2F8.07.14_MegaCLI.zip .... (other dirs are empty) |
On downloading 900MB_file, i see the cache file is created, but it's auto-removed when the download finish: /usr/local/leofs/1.2.6/leo_gateway/cache/data/15: total 155M -rw-r----- 1 root root 155M Mar 4 11:39 hehe1%2F900MB_file.tmp |
Thank you for sharing the issue. We'll check it soon. |
@minhchuduc Thank you for reporting this issue.
Since the number of directories to store cache files will be equal to You might hit this problem. |
Hi, but my disk cache capacity = 30123456789 (~ 30GB) #ls -lRh /usr/local/leofs/1.2.6/leo_gateway/cache/data/ /usr/local/leofs/1.2.6/leo_gateway/cache/data/: total 64K drwxr-x--- 2 root root 4.0K Mar 4 10:12 1 drwxr-x--- 2 root root 4.0K Mar 4 12:00 10 drwxr-x--- 2 root root 4.0K Mar 4 10:12 11 drwxr-x--- 2 root root 4.0K Mar 4 10:12 12 drwxr-x--- 2 root root 4.0K Mar 4 10:12 13 drwxr-x--- 2 root root 4.0K Mar 4 11:15 14 drwxr-x--- 2 root root 4.0K Mar 4 11:39 15 drwxr-x--- 2 root root 4.0K Mar 4 11:34 16 drwxr-x--- 2 root root 4.0K Mar 4 10:12 2 drwxr-x--- 2 root root 4.0K Mar 4 10:12 3 drwxr-x--- 2 root root 4.0K Mar 4 11:11 4 drwxr-x--- 2 root root 4.0K Mar 4 11:58 5 drwxr-x--- 2 root root 4.0K Mar 4 10:12 6 drwxr-x--- 2 root root 4.0K Mar 4 10:12 7 drwxr-x--- 2 root root 4.0K Mar 4 10:12 8 drwxr-x--- 2 root root 4.0K Mar 4 11:33 9 /usr/local/leofs/1.2.6/leo_gateway/cache/data/1: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/10: total 300M -rw-r----- 1 root root 300M Mar 4 11:18 hehe1%2F300MB_file -rw-r----- 1 root root 0 Mar 4 12:00 hehe1%2F300MB_file.tmp /usr/local/leofs/1.2.6/leo_gateway/cache/data/11: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/12: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/13: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/14: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/15: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/16: total 200M -rw-r----- 1 root root 200M Mar 4 11:34 hehe1%2F200MB_file /usr/local/leofs/1.2.6/leo_gateway/cache/data/2: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/3: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/4: total 108M -rw-r----- 1 root root 100M Mar 4 11:11 hehe1%2F100MB_file -rw-r----- 1 root root 7.6M Mar 4 11:05 hehe1%2F8.07.14_MegaCLI.zip /usr/local/leofs/1.2.6/leo_gateway/cache/data/5: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/6: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/7: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/8: total 0 /usr/local/leofs/1.2.6/leo_gateway/cache/data/9: total 0 then i tried to increased disk cache capacity to 300123456789 (~ 300GB), the result is the same (not cached) |
@minhchuduc Thank you for clarification. We will fix this issue before long. |
@minhchuduc I filed this issue at leo-project/leofs#322, Anyway. thanks for your contribution. |
Thank you! I will file next issue on LeoFS repo. |
Environments:
Leofs version 1.2.6, installed using .deb file
Erlang R16B03-1 (erts-5.10.4) [source] [64-bit halfword] [smp:16:16] [async-threads:10] [kernel-poll:false]
Ubuntu 14.04 on Baremetal
Kernel 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 GNU/Linux
Problem:
10MB file is cached on gateway, when download again, I see leofs-gateway does not need to load from storage-node again (i monitored network traffic between nodes)
But when download 1.2GB, it's not cached whether i configured on leofs_gateway.conf:
Output of my "leofs-adm status gateway_0@172.x.y.z":
The text was updated successfully, but these errors were encountered: