Skip to content

Commit

Permalink
build(dockerfile): Set GODEBUG=madvdontneed=1. (#6955)
Browse files Browse the repository at this point in the history
Set GODEBUG=madvdontneed=1 to lower Go RSS memory usage.

MADV_DONTNEED is the default behavior in the upcoming Go 1.16:
https://go-review.googlesource.com/c/go/+/267100/
  • Loading branch information
danielmai committed Nov 24, 2020
1 parent 29bd773 commit 9e15123
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contrib/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ EXPOSE 9080
RUN mkdir /dgraph
WORKDIR /dgraph

ENV GODEBUG=madvdontneed=1
CMD ["dgraph"] # Shows the dgraph version and commands available.

0 comments on commit 9e15123

Please sign in to comment.