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

Re: how to deal with "virtual memory exhausted: Cannot allocate memory"?


On 15/10/16 13:10, Jeffrey Walton wrote:
>>>> "virtual memory exhausted: Cannot allocate memory"
>>>> What would be your recommendation -- demand removing mips* from
>>>> supported architectures or there is a chance... ? ;)
>>> The build log says
>>>   make -j4
>>> This is due to the following in debian/rules:
>>>   dh $@ --parallel --sourcedirectory=src
>>> Running 4 instances of the compiler in parallel can quadruple
>>> the memory usage.
>> That is true, however the amount of memory per 32-bit process is
>> unchanged and still limited to 2GB, so I doubt it will make any
>> change.
> IoT gadgets and other resource constrained devices usually don't have
> virtual memory. I frequently experience OOM kills when using make's
> job option on dev boards, like ci20, beaglebone, cubietrucks, banana
> pi's, raspberry pi's, etc.
> We experienced so many OOM kills with our test script we had to stop
> using make's job option on certain machines. The machines had less
> than 1280 MB of memory or lacked a swap file. Cf.,
> https://github.com/weidai11/cryptopp/blob/master/cryptest.sh#L893

I think you're confusing virtual memory and physical memory here. The
error is "virtual memory exhausted", not an OOM kill. On MIPS 32-bit
there is always[1] 2GB of user virtual memory per process regardless of
the amount of RAM. If you exceed that, then you could add 100GB of RAM
and it wouldn't help.

[1] Ignoring EVA here... (none of the buildds support it anyway)

> Does anyone know what kind of board is being used? What are its cpu
> and memory specs? Does /proc/meminfo report a swap file?

Memory: 8GB


Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: