Skip to content

Commit

Permalink
add scenarios for the heap target, and add live bytes to the plots
Browse files Browse the repository at this point in the history
  • Loading branch information
mknyszek committed Feb 16, 2021
1 parent 06535e4 commit 3eb2a6c
Show file tree
Hide file tree
Showing 8 changed files with 1,577 additions and 301 deletions.
409 changes: 409 additions & 0 deletions data/scenarios/heavy-step-alloc-high-heap-target.json

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions data/scenarios/high-GOGC.json

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions data/scenarios/high-heap-target.json

Large diffs are not rendered by default.

200 changes: 100 additions & 100 deletions data/scenarios/jitter-alloc.json

Large diffs are not rendered by default.

409 changes: 409 additions & 0 deletions data/scenarios/low-heap-target.json

Large diffs are not rendered by default.

409 changes: 409 additions & 0 deletions data/scenarios/step-heap-target.json

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions scenario/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,54 @@ var generators = map[string]func() exec{
length: 50,
}
},
"low-heap-target": func() exec {
return exec{
globals: Globals{
Gamma: 2,
GlobalsBytes: 32 << 10,
InitialHeap: 2 << 20,
},
allocRate: random(0.1).offset(4),
scanRate: constant(31.0),
growthRate: constant(1.5).mix(ramp(-0.5, 4), random(0.01), unit(3).delay(25)),
scannableFrac: constant(1.0),
stackBytes: constant(8192),
heapTargetBytes: constant(64 << 20),
length: 50,
}
},
"step-heap-target": func() exec {
return exec{
globals: Globals{
Gamma: 2,
GlobalsBytes: 32 << 10,
InitialHeap: 2 << 20,
},
allocRate: random(0.1).offset(4),
scanRate: constant(31.0),
growthRate: constant(2.0).mix(ramp(-1.0, 8), random(0.01)),
scannableFrac: constant(1.0),
stackBytes: constant(8192),
heapTargetBytes: constant(-1).mix(constant((256 << 20) + 1).delay(25)),
length: 50,
}
},
"heavy-step-alloc-high-heap-target": func() exec {
return exec{
globals: Globals{
Gamma: 2,
GlobalsBytes: 32 << 10,
InitialHeap: 2 << 20,
},
allocRate: constant(1.0).mix(ramp(10.0, 1).delay(25)),
scanRate: constant(31.0),
growthRate: constant(2.0).mix(ramp(-1.0, 8), random(0.01)),
scannableFrac: constant(1.0),
stackBytes: constant(8192),
heapTargetBytes: constant(2 << 30),
length: 50,
}
},
}

type stream func() float64
Expand Down
3 changes: 2 additions & 1 deletion tools/gen-plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def bytesPlot(axs):
triggerPlot, = axs.plot(t, data['Trigger'] / float(1<<20), label='GC trigger')
peakPlot, = axs.plot(t, data['Peak'] / float(1<<20), label='Peak heap')
stackPlot, = axs.plot(t, data['Stack_Bytes'] / float(1<<20), label='Stack')
doLegend(axs, handles=[goalPlot, triggerPlot, peakPlot, stackPlot])
livePlot, = axs.plot(t, data['Live_Bytes'] / float(1<<20), label='Live')
doLegend(axs, handles=[goalPlot, triggerPlot, peakPlot, stackPlot, livePlot])
axs.set_ylabel('MiB')
axs.set_xlim(t[0], t[-1])
axs.grid(True)
Expand Down

0 comments on commit 3eb2a6c

Please sign in to comment.