FUSEX: reduce the default wr/ra buffer to 256 MB if ram>=2G otherwise ram/8

parent ae2ea7f7
......@@ -97,8 +97,8 @@ You also need to define a local cache directory (location) where small files are
"read-ahead-bytes-nominal" : 262144,
"read-ahead-bytes-max" : 2097152,
"read-ahead-blocks-max" : 16,
"max-read-ahead-buffer" : 1073741824,
"max-write-buffer" : 1073741824
"max-read-ahead-buffer" : 268435456,
"max-write-buffer" : 268435456
}
```
......
......@@ -1048,8 +1048,8 @@ EosFuse::run(int argc, char* argv[], void* userdata)
// auto-scale read-ahead and write-back buffer
uint64_t best_io_buffer_size = meminfo.get().totalram / 8;
if (best_io_buffer_size > 1 * 1024 * 1024 * 1024) {
best_io_buffer_size = 1 * 1024 * 1024 * 1024;
if (best_io_buffer_size > 256 * 1024 * 1024) {
best_io_buffer_size = 256 * 1024 * 1024;
} else {
// we take 1/8 of the total available memory, if we don't have one GB available
best_io_buffer_size /= 8 ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment