Feature #17693

[keep-web] Improve cache efficiency for a mix of fast and slow clients

Added by Tom Clegg 4 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Keep
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Story points:
-

Description

Currently, keep-web uses a block cache with a fixed number of 64 MiB blocks shared by all readers. When there are more active readers than buffer blocks, the cache thrashing is even worse than expected because a slow client can force a faster client's block to be ejected.

We might be able to alleviate this by having an output buffer for each active client connection whose size varies according to the speed data is being sent -- e.g., if there is not enough memory to buffer 2 seconds worth of data for each client, then we scale back to buffering 1 second worth of data for each client.

Also available in: Atom PDF