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

James Cowgill <[email protected]>
Newsgroups gmane.linux.debian.ports.mips
Message-ID <[email protected]>
Hi,

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?

https://db.debian.org/machines.cgi?host=mipsel-manda-03
Memory: 8GB

James
signature.asc (application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE-----

iQIcBAEBCgAGBQJYAh/GAAoJEMfxZ23qLQHvtB0QALQugNek6zFy3VPBwEqiOJ1b
Fj3HlywKmDbLmh3YZGWwCLrhNlAxJJwWO2FH093y8GTiw67Z8JhzaC6diAjHC3Xp
t80uZGSSq7yfEFohRhgMLZhIDfCng2JaPj2wGw2/D0ixh/+pmnj9RJbtvOVkWUT1
SmrvtnLOsi6a3Q6QubBM9qtNsqH6F6gzeOu2EHaFxXgmrkJZo41VYoesoHCn586v
oHgRXo/hPRsmh3W25nQo2/HmF1/kKdD/1+fnm3FJg7kqWEZm4bwg5nrabgsGwxh5
sksgOPy/6XBgqZPSVLiACEn6ig3um6lVmi4tldgCuGj+3Yjnp6lVxBuz5Sho7jZO
quZHINFavm8EUoTkqW7+WTJpeEW1sQeAnLiO9frdovEiiRo7H5rkms9//ls1g7Dk
YcujbwLCp4GUm7RlPqBM7Pz0LehJRWErRe4MglfCEPvX4Soi9Om4tvS/NK68vpnS
YrCdBh8BzNVp+AHsG+gX9jEdxkDO8cAAjmET2bruEFYAO7TEJ9OfAH3PXmaOvCrZ
xQxuHsLvneVGyL+aDdLtezPTKQc2UaELHm2zogaY5NyrQyCK9wPHc6l8movvS3xf
Bp4A1qtUbjAS8NyS9Dys/++a/7sbDR5scbET+Vb2j7LyPtXgV++9oXnJasSdaYCD
HfbC42N4cwoxEZbk+COs
=9qFE
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.