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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotwebd: disable the object cache
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 30 Aug 2022 18:47:37 +0200

Download raw body.

Thread
On Tue, Aug 30, 2022 at 06:07:28PM +0200, Omar Polo wrote:
> I don't know much about the object cache, but I think that gotwebd is
> better off without.
> 
> The object cache just keeps growing until ENOMEM.  This means that
> gotwebd gradually increase its memory consumption until it hits the
> limit.  It also becomes ridicully slower over the time (i guess due to
> the weight of malloc/free) and since much of the code runs with the
> signal masked it also takes ages to stop.  (well, at least it's safe
> to brutally kill gotwebd with a SIGKILL.)
> 
> (this was hinted by tracey on IRC some time ago, thanks!)
> 
> I'm running my gotwebd instance without the object cache and I'm happy
> that I don't have to restart gotwebd every couple of days only because
> some random bot thought it was interesting to visit all the commits in
> the repositories I'm hosting.
> 
> objections?
> 
> don't know what this'll mean for -portable; this will be probably need
> to be tackled differently there.
> 

Could you try to disable only the caching of blobs, but leave
commits and trees in the cache?

Overall, I think it would be better to enforce a limit on the cache size
than to disable it entirely.
The cache is important for operations such as commit- or tree-traversals,
where even a relatively small cache will provide benefits.