On Wed, 25 Oct 2023 09:03:48 +0200
Xavier Humbert <[email protected]> wrote:

> Le 10/25/23 09:01, Cy Schubert a écrit :
> > In message<[email protected]>, Xavier
> > Humbert w
> > rites:  
> >> Le 10/25/23 08:46, Cy Schubert a écrit :  
> >>> In message<[email protected]>, Xavier
> >>> Humbert w
> >>> rites:  
> >>>> Hi,
> >>>>
> >>>> When building rust, all memory is eaten, leading to OOM killing almost
> >>>> everything, eventually failing, and leading to an unstable system.
> >>>>
> >>>> Is there a way to tell the compiler to avoid this behaviour ?  
> >>> How much RAM does your machine have? How many CPU cores/threads does it
> >>> have?
> >>>  
> >> I have 16 GB RAM, and 4 cores  
> > That should be plenty. I build it on a 4 core 8 GB machine.
> >
> > How much swap does it have?
> >
> > Could this machine by chance be running a browser or other large apps at
> > the same time?  
> 
> It has 24GB swap, And I stop bhyve before building

When the machine runs out of virtual memory -- that is RAM + swap --
while the kernel is trying to satisfy an app's memory allocation, it
picks the largest process (Linux uses a "badness" score which IMO is
inferior) and kills it.

Try setting the sysctl vm.pfault_oom_attempts=-1.


-- 
Cheers,
Cy Schubert <[email protected]>
FreeBSD UNIX:  <[email protected]>   Web:  https://FreeBSD.org
NTP:           <[email protected]>    Web:  https://nwtime.org

                        e^(i*pi)+1=0

Reply via email to