You are not logged in.
Recently I've seen this error more and more often. When I tried compiling some packages from AUR, I ended up getting "virtual memory exhausted" error. The first time it happened with clementine-git, then android-studio. Can I do something about it?
Offline
How exactly are you compiling these packages - using makepkg?
Offline
are you using an aur helper? most aur helper compile using tmpfs by default so you can run out of ram compiling stuff, change it to compile on your hdd instead.
Offline
I use packer, so I guess it uses make or makpkg.
@bwat47, thanks. How do I make them to do that? By changing the build directory?
Last edited by ravicious (2013-06-03 17:12:46)
Offline
I use packer, so I guess it uses make or makpkg.
@bwat47, thanks, I'll look into it.
yeah by default packer and most other aur helpers use the /tmp dir for compiling. By default in arch /tmp is mounted in ram using tmpfs, so when compiling you are limited to the amount of ram. Packer probably has an option to change the compiling dir.
Offline
Packages are built in the TMPDIR path. If the TMPDIR variable is not set then the default path is /tmp
Offline
Hmm, even though I set TMPDIR to /usr/local/src (and packer actually uses this dir), the problem still exist.
Offline
Do you have any swap space? If you're low on ram with no or very little swap, you can have problems, too.
And stop using packer! When you have a problem, always try it with makepkg first to see if that fixes it.
Last edited by Scimmia (2013-06-03 18:30:59)
Offline
I have 3 GB of RAM and no swap space at all. I tried to compile clementine-git without using packer, just with makepkg and it thrown an "virtual memory exhausted" error, too.
Offline
Add a swap file, I'll bet the problem goes away.
Offline
You're right. I made a 1,5 GB swapfile and it worked, thanks!
I followed wiki and changed vm.swappiness and vm.vfs_cache_pressure values. What's strange is that usually there would be like 90% of RAM used, now during compilation it was like 60% of RAM and 9% of swap.
Last edited by ravicious (2013-06-06 19:08:34)
Offline
I followed wiki and changed vm.swappiness and vm.vfs_cache_pressure values. What's strange is that usually there would be like 90% of RAM used, now during compilation it was like 60% of RAM and 9% of swap.
It may be due to a heavy program that run and took a lot of memory (i.e. the linker), so other processes executing in parallel had to use swap. When the heavy program exited, a huge amount of RAM was freed, but the other programs were still having much of their memory in swap. And it was then that you run free, might that be possible? RAM usage should be meticulously monitored.
I'm sorry for my English, and also for the terminology. If the example explained above is not your case, try reverting back the values, or put another ones. In any case, RAM usage is too trivial.
Offline
I am also facing the same problem. I am trying to install a package, and the installations aborts saying 'virtual memory exhausted'. The RAM is 2 GB and i have alloted 2 GB as swap. Things i have tried so far
-install using yaourt
-install using makepkg.
-change TMPDIR to HDD.
Even when i tried it without any window manager to start, limiting the RAM usage, the problem still persists. The only way is to allot an extra swap space, but that would mean that i will have to delete a partition, which is not a feasible solution. Is there anything else one could do. ?
if it helps,
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16033
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 16033
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Offline