Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the default GOGC to 100. 800 proves to be a bit insane. #803

Merged
merged 1 commit into from
Dec 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ var defaultConfig = &Config{
Retry: 500 * time.Millisecond,
},
Runtime: Runtime{
GOGC: 800,
GOGC: 100,
GOMAXPROCS: runtime.NumCPU(),
},
UI: UI{
Expand Down
15 changes: 3 additions & 12 deletions docs/content/ref/runtime.gogc.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,9 @@ the value from the config file.
Increasing this value means fewer but longer GC cycles
since there is more garbage to collect.

The default of `GOGC=100` works for Go 1.4 but shows
a significant performance drop for Go 1.5 since the
concurrent GC kicks in more often.

During benchmarking I have found the following values
to work for my setup and for now I consider them sane
defaults for both Go 1.4 and Go 1.5.

GOGC=100: Go 1.5 40% slower than Go 1.4
GOGC=200: Go 1.5 == Go 1.4 with GOGC=100 (default)
GOGC=800: both Go 1.4 and 1.5 significantly faster (40%/go1.4, 100%/go1.5)
NOTE - the default for fabio up to 1.5.14 was 800. This changed
to 100 in version 1.5.15

The default is

runtime.gogc = 800
runtime.gogc = 100
18 changes: 3 additions & 15 deletions fabio.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1184,24 +1184,12 @@
# environment variable which also takes precedence over
# the value from the config file.
#
# Increasing this value means fewer but longer GC cycles
# since there is more garbage to collect.
#
# The default of GOGC=100 works for Go 1.4 but shows
# a significant performance drop for Go 1.5 since the
# concurrent GC kicks in more often.
#
# During benchmarking I have found the following values
# to work for my setup and for now I consider them sane
# defaults for both Go 1.4 and Go 1.5.
#
# GOGC=100: Go 1.5 40% slower than Go 1.4
# GOGC=200: Go 1.5 == Go 1.4 with GOGC=100 (default)
# GOGC=800: both Go 1.4 and 1.5 significantly faster (40%/go1.4, 100%/go1.5)
# NOTE - the default for fabio up to 1.5.14 was 800. This changed
# to 100 in version 1.5.15
#
# The default is
#
# runtime.gogc = 800
# runtime.gogc = 100


# runtime.gomaxprocs configures GOMAXPROCS.
Expand Down