diff options
author | Simon Rettberg | 2021-04-13 16:41:26 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-04-14 13:17:59 +0200 |
commit | 0be00336f97a7ef3590ee803d4ad19e305aa1583 (patch) | |
tree | b00b91b8c6d687ad4116405818e2cecb3e6cf44b /pkg | |
parent | [CLIENT] Use SO_GETPEERCRED instead of braindead setuid crap (diff) | |
download | dnbd3-0be00336f97a7ef3590ee803d4ad19e305aa1583.tar.gz dnbd3-0be00336f97a7ef3590ee803d4ad19e305aa1583.tar.xz dnbd3-0be00336f97a7ef3590ee803d4ad19e305aa1583.zip |
[SERVER] Make prefetching synchronous
There is a race condition where we process the next request from the
same client faster than the OS will schedule the async prefetch job,
rendering it a NOOP in the best case (request ranges match) or fetching
redundant data from the upstream server (prefetch range is larger than
actual request by client). Make prefetching synchronous to prevent this
race condition.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/config/server.conf | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/config/server.conf b/pkg/config/server.conf index 5f0b2a0..95a71db 100644 --- a/pkg/config/server.conf +++ b/pkg/config/server.conf @@ -48,6 +48,8 @@ maxClients=2000 maxImages=1000 maxPayload=9M maxReplicationSize=150G +; Maximum number of bytes to prefetch when relaying client request to upstream server +maxPrefetch=256k ; Log related config [logging] |