File tree Expand file tree Collapse file tree
web/platform/src/content/docs/docs/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ memory and filesystem stores instead of S3 and Redis.
2626 " filesystem" : {
2727 " content_path" : " /tmp/nativelink/data-worker-test/content_path-ac" ,
2828 " temp_path" : " /tmp/nativelink/data-worker-test/tmp_path-ac" ,
29+ // Limit concurrent writes to avoid disk I/O saturation.
30+ // Set to 0 for unlimited.
31+ " max_concurrent_writes" : 8 ,
2932 " eviction_policy" : {
3033 // 1gb.
3134 " max_bytes" : 1000000000 ,
@@ -40,6 +43,9 @@ memory and filesystem stores instead of S3 and Redis.
4043 " filesystem" : {
4144 " content_path" : " /tmp/nativelink/data-worker-test/content_path-cas" ,
4245 " temp_path" : " /tmp/nativelink/data-worker-test/tmp_path-cas" ,
46+ // Limit concurrent writes to avoid disk I/O saturation.
47+ // Set to 0 for unlimited.
48+ " max_concurrent_writes" : 8 ,
4349 " eviction_policy" : {
4450 // 10gb.
4551 " max_bytes" : 10000000000 ,
Original file line number Diff line number Diff line change @@ -454,6 +454,20 @@ Here is the final CAS Config JSON without the 99 extra shards for writing to S3.
454454}
455455` ` `
456456
457+ ## Limit Concurrent Filesystem Writes
458+
459+ If the CAS server is under heavy disk I/O pressure, cap the number of
460+ simultaneous writes to the filesystem store with ` max_concurrent_writes` .
461+ Each write streams to a temp file and calls ` sync_all ()` , which can saturate
462+ the disk and block the async runtime if too many happen at once.
463+
464+ ` ` ` json5
465+ " filesystem" : {
466+ " content_path" : " /var/lib/nativelink/cas" ,
467+ " temp_path" : " /var/lib/nativelink/tmp" ,
468+ // Set to 0 for unlimited.
469+ " max_concurrent_writes" : 16
470+ }
457471## Limit Worker Inflight Tasks
458472
459473If your workers are getting saturated, cap the number of concurrent tasks they
You can’t perform that action at this time.
0 commit comments