Closed akkartik closed 1 month ago
You should reduce the amount of simultaneous compiling processes with the MAKEJOBS
environment variable (to something less than how many threads your CPU has), additionally check if any apps are using a lot of memory, and avoid using them during the compilation process. A system reboot will also help to start with a lower memory usage.
There are no system requirements for building ladybird, as the only difference is how long it will take to get done, but you must ensure you have enough RAM relative to the number of CPU threads.
If there's only 13 tasks remaining, that's probably link jobs. Installing lld or mold should help with that. Those linkers use significantly less RAM than GNU's BFD linker.
But also yes, MAKEJOBS=1 (or 2, 3, 4..) will reduce the number of parallel jobs. For large C++ projects, I would expect that ~1 GiB of RAM per parallel job is a reasonable assumption.
Thank you for that info!
I've been building Ladybird from source on a nightly basis. For the last few nights I've been noticing my build get killed by Linux's OOM killer.
This is on a laptop with 16GB RAM running Manjaro Linux 24. The kernel is Linux 6.6.47-1. At the time when the build was getting repeatably OOM-killed by the kernel, there were 13 tasks remaining, based on the
[0/13]
progress display. The state of system memory was this:The build succeeded after I shut down my browser. I don't have a lot of tabs open; the system memory looked like this after a successful build:
Do y'all target any system requirements for building Ladybird? (I didn't immediately see them mentioned on the site or the docs.) Based on this superficial analysis, it seems like Ladybird currently requires a peak of ~8GB RAM during the build. This peak has been creeping up in my experience.