Skip to content

Support COFF/bigobj for large images on Windows. #52561

Open
@ufechner7

Description

MWE:
Check out from git:

cd repos # any folder of your choice, but without spaces in the folder name
git clone https://github.com/ufechner7/Tethers.jl

Build the system image:

cd repos/Tethers.jl
cd bin
./create_sys_image

Now look into the task manager and check the CPU load. My CPU load was mostly at 7%, sometimes a bit higher,
but 8 threads where not used when creating the system image.

Doing the same on Linux is much faster, and the CPU load reaches 800% after about 2 minutes of the progress
of "building system image".

I used juliaup to run Julia. The machine had 24GB of RAM, never more than 50% where in use.

julia> versioninfo()
Julia Version 1.10.0-rc2
Commit dbb9c46795 (2023-12-03 15:25 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × AMD Ryzen 9 7950X 16-Core Processor
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, znver3)
  Threads: 1 on 16 virtual cores

Summary: Building a system image is slow on Windows and fast on Linux because on Windows Julia 1.10-rc2 uses only one thread.

Is this a known limitation?


How it should work is documented:
JULIA_IMAGE_THREADS

An unsigned 32-bit integer that sets the number of threads used by image compilation in this Julia process. The value of this variable may be ignored if the module is a small module. If left unspecified, the smaller of the value of JULIA_CPU_THREADS or half the number of logical CPU cores is used in its place.

Metadata

Assignees

No one assigned

    Labels

    pkgimagesystem:windowsAffects only WindowsupstreamThe issue is with an upstream dependency, e.g. LLVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions