Building on limited memory environments (or does -M really work?)

Niklas Hambüchen mail at nh2.me
Wed Nov 8 19:21:14 UTC 2017


Hey Saurabh,

from my experience with CircleCI it builds on machines with e.g. 32
cores showing up in htop (but allows you to use way less that that).

But ghc sees 32 cores so -j will compile up to 32 modules at the same
time (thus using tons of RAM).

I solved that by setting -jN to the actual number of cores I bought from
CircleCI.

Greetings!
Niklas

On 21/10/17 14:36, Saurabh Nanda wrote:
> We're struggling to get our build pipeline working on CircleCI, which
> has a 4GB RAM limit.


More information about the ghc-devs mailing list