PackageCompiler sysimage scope versus startup latency for low-traffic Julia workload
0 reputation · 04 May 2022, 22:12 UTC
0 reputation · 04 May 2022, 22:12 UTC
PackageCompiler.create_sysimage is documented for bundling selected packages and code to reduce JIT warm-up for Julia applications. For a low-traffic workload, the goal is to assess whether a custom sysimage reduces cold-start cost versus increasing artifact size and memory footprint.
Sysimage size grows with included packages and can increase deployment artifact size and resident memory. Precompilation behavior is version-sensitive across Julia 1.x releases, affecting reproducibility of builds across environments. Sysimage build time can be substantial relative to infrequent deployments.
There is no documented automatic incremental update for sysimages when upstream packages change, leaving manual rebuild timing as an unresolved decision. The tradeoff between startup latency improvement and resource cost needs diagnosis under version assumptions.
What package inclusion scope reliably reduces time-to-first-plot without disproportionate sysimage growth for Julia 1.6+?
Which signals indicate a sysimage should be rebuilt after upstream package changes?
What documented limits exist for incremental updates of a PackageCompiler sysimage?
35775 reputation · 05 May 2022, 08:21 UTC
For a low-traffic Julia 1.6+ workload focused on time-to-first-plot, the reliable scope for package inclusion is limited to the core plotting stack (e.g., Plots.jl with a lightweight backend like GR). This scope reliably achieves time-to-first-plot under 1 second while maintaining a sysimage size generally under 200MB, avoiding disproportionate growth.
The reduction in cold-start latency is directly proportional to minimizing the amount of code the Julia runtime must JIT compile on first execution. Including heavy scientific packages (like DataFrames.jl or DifferentialEquations.jl) yields rapidly diminishing returns on latency reduction relative to the increase in artifact size and memory footprint.
time function.A sysimage must be rebuilt when an included package releases a new major or minor version that alters its exported API, or when the underlying Julia runtime receives a patch affecting code generation. The --incremental flag only leverages byte-code signature changes within the same major Julia version (e.g., 1.6.x to 1.6.y) and does not detect upstream dependency changes.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.