Skip to content

Memory use during build #45949

Closed
Closed
@htot

Description

@htot

What is the problem this feature will solve?

My build machine is 8 cores / 16 threads. It has 16GB RAM. If I build with make -j 16 the compile stage takes about 30 min. But during link 5 executables are being linked simultaneously, each taking 4GB RAM. Disk thrashing starts and the link phase takes an extreme long time to complete. In the mean while keyboard/mouse stop responding.

Alternative I can set make -j 2 in which case the compile phase takes multiple hours.

I would like only one executable linked at a time, but compiling to respect 16 threads.

What is the feature you are proposing to solve the problem?

Possibly a hard coded limit in the makefile. Or a command line switch.

What alternatives have you considered?

Other then buying more RAM, I can send SIGSTOP from over ssh (seems to respond better then local terminal). The stopped linkers are swapped out and not swapped back in. Then I can SIGCONT one by one. This works but requires manual intervention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions