LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SOLVED: virtual memory exhausted: Cannot allocate memory (https://www.linuxquestions.org/questions/linux-newbie-8/solved-virtual-memory-exhausted-cannot-allocate-memory-4175507767/)

tonj 06-11-2014 04:11 PM

SOLVED: virtual memory exhausted: Cannot allocate memory
 
I'm compiling mythtv that I got from https://github.com/MythTV/mythtv on a fedora 20 64 bit machine with 1Gb ram, 60Gb hard drive. The 'make install' command stops with "virtual memory exhausted: Cannot allocate memory". I've googled around but I can't see a solution to this problem. If I do # ulimit-a I get
Quote:

# ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 7761
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) 7761
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
I don't know what to do with these figures. I tried #ulimit -v 60000 but make install still gave the same error. I also tried #free -m
Quote:

# free -m
total used free shared buffers cached
Mem: 984 885 99 50 9 347
-/+ buffers/cache: 528 456
Swap: 0 0 0
Would this be solved by adding more physical ram?

johnsfine 06-11-2014 04:18 PM

Quote:

Originally Posted by tonj (Post 5186571)
Would this be solved by adding more physical ram?

Configuring a few GB of swap space would probably be a simpler solution.

syg00 06-11-2014 07:00 PM

Agreed - cheap and simple.
Also looks like F20 assigns /tmp to tmpfs which would likely put more pressure on the RAM - maybe make /tmp disk-resident for the duration of the compile.

Mind you, a Gig is probably "minimal" these days for something like gnome or KDE.

orasis 06-11-2014 07:02 PM

If you plan on compiling software you should have a swap file. 1GB of physical ram is not enough to compile relatively large apps.

tonj 06-12-2014 07:14 AM

I solved this by following the instructions here:

http://www.cyberciti.biz/faq/linux-a...ap-file-howto/

jpollard 06-12-2014 07:27 AM

A GB of memory should be enough... but not when using tmpfs (which takes up to half the physical memory by default). The problem is that the working files for the compiler are in /tmp... causing a double hit on memory.

Glad swap made it workable...

jpollard 06-12-2014 07:27 AM

A GB of memory should be enough... but not when using tmpfs (which takes up to half the physical memory by default). The problem is that the working files for the compiler are in /tmp... causing a double hit on memory.

Glad swap made it workable...


All times are GMT -5. The time now is 05:44 AM.