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

From:
Omar Polo <op@omarpolo.com>
Subject:
gotwebd: disable the object cache
To:
gameoftrees@openbsd.org
Date:
Tue, 30 Aug 2022 18:07:28 +0200

Download raw body.

Thread
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.

diff /home/op/w/got
commit - 95a4a5a1e8d0952ee0d2523dc31df7170d80e0b3
path + /home/op/w/got
blob - 20032d2e4a12c2f228cca01ced963187b2238556
file + gotwebd/Makefile
--- gotwebd/Makefile
+++ gotwebd/Makefile
@@ -25,7 +25,7 @@ CPPFLAGS +=	-I${.CURDIR}/../include -I${.CURDIR}/../li
 LDADD +=	-lz -levent -lutil -lm
 YFLAGS =
 DPADD =		${LIBEVENT} ${LIBUTIL}
-#CFLAGS +=	-DGOT_NO_OBJ_CACHE
+CFLAGS +=	-DGOT_NO_OBJ_CACHE
 
 .if ${GOT_RELEASE} != "Yes"
 NOMAN = Yes