LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-11-2014, 04:11 PM   #1
tonj
Member
 
Registered: Sep 2008
Posts: 546

Rep: Reputation: 37
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?

Last edited by tonj; 06-12-2014 at 07:13 AM. Reason: solved
 
Old 06-11-2014, 04:18 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by tonj View Post
Would this be solved by adding more physical ram?
Configuring a few GB of swap space would probably be a simpler solution.
 
Old 06-11-2014, 07:00 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
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.
 
Old 06-11-2014, 07:02 PM   #4
orasis
Member
 
Registered: Mar 2008
Distribution: Slackware, Free-BSD
Posts: 53

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

Last edited by orasis; 06-11-2014 at 07:03 PM.
 
Old 06-12-2014, 07:14 AM   #5
tonj
Member
 
Registered: Sep 2008
Posts: 546

Original Poster
Rep: Reputation: 37
I solved this by following the instructions here:

http://www.cyberciti.biz/faq/linux-a...ap-file-howto/
 
1 members found this post helpful.
Old 06-12-2014, 07:27 AM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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...
 
Old 06-12-2014, 07:27 AM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
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...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How much base memory to allocate for the virtual machine? ravisingh1 Linux - Virtualization and Cloud 6 05-02-2013 09:44 AM
[SOLVED] error while compiling llvm : virtual memory exhausted: Cannot allocate memory aashayshah Linux From Scratch 5 03-13-2013 10:04 AM
[SOLVED] Virtual Memory limit exhausted at 1TB? malloc/mmap failures even with free memory mfkraft Linux - Server 2 09-16-2012 08:27 AM
ffmpeg: make: virtual memory exhausted simopal6 Linux - Software 15 05-30-2011 03:31 PM
how to make virtual machine in xen allocate memory automatically? jimmyjiang Red Hat 0 03-13-2008 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration