fork of https://github.com/sourcegraph/zoekt
0

Configure Feed

Select the types of activity you want to include in your feed.

docker: only set GOGC for webserver image (#405)

Only zoekt-webserver zoekt has a large stable heap. So we likely were
using a non-optimal value for GOGC in indexserver. Additionally we don't
publish the image from "Dockerfile" so we don't need the GOGC envvar
there.

Test Plan: built and inspected the env. Only webserver should have a
GOGC value. Otherwise will rely on CI.

docker build -t zoekt .
docker build -t zoekt-indexserver . -f Dockerfile.indexserver
docker build -t zoekt-webserver . -f Dockerfile.webserver
docker inspect zoekt-indexserver | jq '.[] | .Config.Env'
docker inspect zoekt-webserver | jq '.[] | .Config.Env'

-12
-6
Dockerfile
··· 23 23 24 24 COPY --from=builder /go/bin/* /usr/local/bin/ 25 25 26 - # zoekt-webserver has a large stable heap size (10s of gigs), and as such the 27 - # default GOGC=100 could be better tuned. https://dave.cheney.net/tag/gogc 28 - # In go1.18 the GC changed significantly and from experimentation we tuned it 29 - # down from 50 to 25. 30 - ENV GOGC=25 31 - 32 26 ENTRYPOINT ["/sbin/tini", "--"]
-6
Dockerfile.indexserver
··· 22 22 /usr/local/bin/zoekt-merge-index \ 23 23 /usr/local/bin/ 24 24 25 - # zoekt indexing has a large stable heap size (gigs), and as such the default 26 - # GOGC=100 could be better tuned. https://dave.cheney.net/tag/gogc 27 - # In go1.18 the GC changed significantly and from experimentation we tuned it 28 - # down from 50 to 25. 29 - ENV GOGC=25 30 - 31 25 ENTRYPOINT ["/sbin/tini", "--", "zoekt-sourcegraph-indexserver"]