"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
"Omar Polo" <op@omarpolo.com>
Subject:
Re: improve gotwebd worker selection
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 07 Sep 2025 11:33:13 +0200

Download raw body.

Thread
Stefan Sperling <stsp@stsp.name> wrote:
> Improve gotweb.c worker selection.
> 
> Instead of distributing requests across workers in a round-robin fashion
> keep track of how many requests a given worker has queued and send new
> requests to the worker which has the least amount of work queued for it.
> 
> This makes gotwebd much more responsive than stupid round-robin, even
> though the new strategy is still not optimal because different types of
> requests carry different cost. E.g. blaming a file is usually heavier than
> listing trees. But it might be good enough, for now. Let's try and see.
> 
> This applies on top of the "run just one gotwebd process which listens"
> patch I sent earlier.

ok op@

> M  gotwebd/gotwebd.c  |   7+  0-
> M  gotwebd/gotwebd.h  |   2+  0-
> M  gotwebd/sockets.c  |  36+  5-
> 
> 3 files changed, 45 insertions(+), 5 deletions(-)
> 
> commit - 968aa2bf0321618be8cfe7a56f986fc176fd3736
> commit + 6b69d5ce1682c758e4bb6b27b780b094d35e156f