diff --git a/FUSE-Mount.md b/FUSE-Mount.md index fcbbac1..96282c3 100644 --- a/FUSE-Mount.md +++ b/FUSE-Mount.md @@ -99,16 +99,18 @@ So if your data is temporary local files, try to move the writes to other unmoun For example, you can create a soft link to a directory or a file on a local disk, and put temp data there. -#### Benchmark Results +#### Sysbench Benchmark Results -"sysbench" is used here. If you have better benchmarking tools, please share your results. +"sysbench" is used here. The mount command line is `weed mount -dir=xx -chunkSizeLimitMB=4` + +If you have better benchmarking tools, please share your results. ``` $ brew install sysbench $ cd /a/mounted/folder $ sysbench --test=fileio --file-total-size=1G prepare -$ sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw --max-time=300 --max-requests=0 --num-threads=1 run +$ sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw --max-time=60 --max-requests=0 --num-threads=1 run WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options. WARNING: --max-time is deprecated, use --time instead sysbench 1.0.19 (using bundled LuaJIT 2.1.0-beta2) @@ -134,40 +136,40 @@ Threads started! File operations: - reads/s: 6854.90 - writes/s: 4569.93 - fsyncs/s: 14624.11 + reads/s: 8502.51 + writes/s: 5668.35 + fsyncs/s: 18140.64 Throughput: - read, MiB/s: 107.11 - written, MiB/s: 71.41 + read, MiB/s: 132.85 + written, MiB/s: 88.57 General statistics: - total time: 300.0030s - total number of events: 7814670 + total time: 60.0026s + total number of events: 1938693 Latency (ms): min: 0.00 - avg: 0.04 - max: 244.85 - 95th percentile: 0.15 - sum: 292121.06 + avg: 0.03 + max: 4.32 + 95th percentile: 0.11 + sum: 58311.71 Threads fairness: - events (avg/stddev): 7814670.0000/0.00 - execution time (avg/stddev): 292.1211/0.00 + events (avg/stddev): 1938693.0000/0.00 + execution time (avg/stddev): 58.3117/0.00 ``` -The above is single-threaded. The following uses 32 threads. +The above is single-threaded. The following uses 16 threads. ``` -$ sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw --max-time=300 --max-requests=0 --num-threads=32 run +$ sysbench --test=fileio --file-total-size=1G --file-test-mode=rndrw --max-time=60 --max-requests=0 --num-threads=16 run WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options. WARNING: --num-threads is deprecated, use --threads instead WARNING: --max-time is deprecated, use --time instead sysbench 1.0.19 (using bundled LuaJIT 2.1.0-beta2) Running the test with following options: -Number of threads: 32 +Number of threads: 16 Initializing random number generator from current time @@ -187,31 +189,40 @@ Threads started! File operations: - reads/s: 18479.45 - writes/s: 12319.70 - fsyncs/s: 39436.17 + reads/s: 20368.01 + writes/s: 13578.67 + fsyncs/s: 43485.34 Throughput: - read, MiB/s: 288.74 - written, MiB/s: 192.50 + read, MiB/s: 318.25 + written, MiB/s: 212.17 General statistics: - total time: 300.0393s - total number of events: 21069361 + total time: 60.0111s + total number of events: 4644841 Latency (ms): min: 0.00 - avg: 0.45 - max: 123.55 - 95th percentile: 1.64 - sum: 9547894.18 + avg: 0.20 + max: 8.22 + 95th percentile: 0.90 + sum: 944779.04 Threads fairness: - events (avg/stddev): 658417.5312/1098.35 - execution time (avg/stddev): 298.3717/0.02 + events (avg/stddev): 290302.5625/1954.88 + execution time (avg/stddev): 59.0487/0.01 ``` +##### Sysbench Result Analysis +sysbench works on 128 files, 8MiB each. It will do random read and write on these files. + +`weed mount` has default `cacheCapacityMB=1000`, but because the cache has different section for different sized chunks, the actual cache used for this workload is about 500MB. However, due to the randomness, the actual hit rate is not high. + +Even with the cache, the data are persisted on the filer and volume servers first, then cached locally. + +#### FIO Benchmark + Here is the result of using tool [fio](https://github.com/axboe/fio). * The server and mount are restarted before each run. * Mount disabled the local cache: `weed mount -dir=xx -cacheCapacityMB=0`