Add GOGC and GOMEMLIMIT properties to BBS job#1130
Conversation
ameowlia
left a comment
There was a problem hiding this comment.
- since these are int properties, I think it is confusing to have the default be an empty string. If you don't provide a default is the value nil, which could serve the same purpose?
- Please add template tests.
- Is there any more description you could add? Like "consider setting this value to X, or increasing for this reason, or decreasing for that reason." ?
|
updated. both properties are strings because they are set as env variables and cant be represented as int, for example |
|
Just putting it here for future reference: The change was needed because of persistent latency spikes (5-10s) on the BBS ActualLRPs endpoint. CPU profiling and the execution trace showed GC was consuming nearly 100% of available CPU time. Setting GOGC=off and GOMEMLIMIT=8GiB immediately resolved the latency. With these settings, GC only runs when approaching the memory limit using smooth pacing, instead of aggressive GC cycles based on heap growth ratio. This PR adds BOSH properties so operators can configure these values through the deployment manifest. |
Summary
Adds two optional BOSH properties (
diego.bbs.gogc,diego.bbs.gomemlimit) that allow operators to configure Go GC behavior for the BBS process via the deployment manifest.When set, the values are injected as environment variables in
bpm.yml. When left empty (default), no env vars are added and Go defaults apply.Backward Compatibility
Breaking Change? No