Racket Build Plots - About and Tools

Each plot depicts memory use during the raco setup -j 1 part of installing main-distribution plus main-distribution-test in minimal Racket.

The X-direction is CPU time. Each color vertical line corresponds to a printout from raco setup:

  •  • orange = “making” (a collection)
  •  • blue = “running” (a document)
  •  • green = “rendering” (a document)
  •  • pink = “re-rendering” (a document)

The Y-direction for the black line is memory use sampled at each garbage collection; before and after are separate lines, but you can't usually see distinct lines if minor collections are rendered, which is the default for Racket BC. The gray line just above the black line is total memory with collector overhead just before a collection, so it's a truer measure of total memory use. The red line (parallel to the X-axis) shows peak memory use including collector overhead; that peeak can occur in between collections, but it should be fairly close to the gray line's peak.

By default, a garbage collection is forced at the start of compiling each collection and running or rendering each document. In that configuration, the black line will tend to return a live-memory baseline value frequently, which reduces overall memory use at the expense of some time. A slight upward slant for that baseline in the orange region is not necessarily a leak; the “making” phase uses caches that increase in size (toward some limit) during the build. An upward slant in the blue region is also not a leak; the “running” phase accumulates cross-reference information across documents.

Using plot.rkt, you can generate graphs from the (unzipped) logs, show in them in a GUI that provides more detail (such as the printouts correcting to the color lines), and compare multiple plots. Use the -h flag of plot.rkt for more information.