Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: C++ compiler excessive memory usage?



On Tue, 13 Oct 2026, Havard Eidnes wrote:

It doesn't look too primising, I'm afraid.  I'm building the
preprocessed file, patched as above, and "env TERM=dumb top -I |
grep <pid>" is currently showing:

16356 he        83    4  6263M 1881M biowait    17:06  4.88%  4.88% cc1plus
16356 he        82    4  6263M 1882M biowait    17:07  3.52%  3.52% cc1plus
16356 he        83    4  6263M 1883M biowait    17:07  5.86%  5.86% cc1plus
16356 he        83    4  6263M 1880M RUN        17:07  4.88%  4.88% cc1plus

It has yet to complete, and I need to go somewhere else...

The last 4 5s-separated entries from "top | grep":

16356 he        83    4  8213M 1720M biowait    75:21  9.33%  9.33% cc1plus
16356 he        83    4  8213M 1720M biowait    75:21  6.79%  6.79% cc1plus
16356 he        83    4  8213M 1721M biowait    75:22  4.88%  4.88% cc1plus
16356 he        81    4  8217M 1723M biowait    75:23  8.69%  8.69% cc1plus


I had a similar issue when compiling webkit-gtk with GCC 14. With my default
of 6 make jobs, I had to frantically add 2 4GB swapfiles because 8GB of RAM
and 8 GB of "real" swap wasn't enough to build that beast. Even with the swap
files, the build was only making a very slow forward progress because the
system was trashing.

I had to kill the build and set jobs to 2 to prevent trashing when compiling the
"difficult" files. Then, kill the build again and set jobs back to 6 once over
the "hump". It was a pain and a chore...

Try reducing the no. of parallel compiles is my recommendation.

-RVP


Home | Main Index | Thread Index | Old Index