LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-28-2008, 02:58 PM   #1
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Rep: Reputation: 30
ffmpeg: make: virtual memory exhausted


Hello,
I'm trying to compile ffmpeg (required by vlc) from SVN.
After running ./configure, I get:
Code:
make: *** virtual memory exhausted.  Stop.
I get this error even if I don't have anything running (not even X).
What's the problem?
Thanks!
 
Old 04-28-2008, 03:08 PM   #2
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
How much ram do you have and how much swap?
 
Old 04-29-2008, 04:03 AM   #3
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by lazlow View Post
How much ram do you have and how much swap?
500 MB RAM, 510 MB swap.
 
Old 04-29-2008, 06:14 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
How small is your disk drive? If you aren't seriously short of disk space, you should have more than 510MB of swap.
 
Old 04-29-2008, 06:42 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You mean you get this after running make, right ? If you run make make sure NOT to use the '-j' option at all with low RAM, and try not to have too many things running while its compiling.
 
Old 04-29-2008, 11:56 AM   #6
lazlow
Senior Member
 
Registered: Jan 2006
Posts: 4,363

Rep: Reputation: 172Reputation: 172
The old rule of thumb on swap still applies(2 x Ram = swap size).
 
Old 04-29-2008, 05:06 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by lazlow View Post
The old rule of thumb on swap still applies(2 x Ram = swap size).
Yeah, I agree, that's what I do too, just in case.
 
Old 04-29-2008, 05:36 PM   #8
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 lazlow View Post
The old rule of thumb on swap still applies(2 x Ram = swap size).
Yuck!

The old rule of thumb on swap never applied. Badly selecting swap size rarely does much harm, so lots of people can be satisfied with a basically useless rule of thumb.

Where the swap size actually matters (as seems to be the case here) you ought to make a better guess than that about what it ought to be.

On the topic of this thread, we don't know:

1) Whether the real problem actually is too little swap space. It looks like that on the surface, but error messages don't always tell you what the real problem is.

2) Does it needs more swap space because the task being attempted really needs so much or
2a) Some other task(s) are idling in the background using up swap space or
2b) A j switch or similar error is making the task need more than it ought to need.

3) If that task really needs so much memory and a big swap file would make it work, how big?

4) If that task would need a very big swap file, then will that cause it to run so slowly that it isn't worth doing.

That rule of thumb I hate is a crude attempt at controlling for question 4. If a task needs a swap file more than double ram size, probably it will run so slowly it isn't worth running. But maybe it won't run that slowly or maybe it's worth a lot to you and you would run it even if it took a week to finish. So the rule of thumb still has virtually no value.

Anyway, taking a most probable collection of guesses through all the above unknowns, since it doesn't get very far with 500Mb of ram and 510Mb of swap, odds are it won't finish with 500Mb of ram and 1000Mb of swap.

If you aren't seriously short of disk space, the next logical step is a 3Gb swap area. Then see:

If it works, great.

If it fails right away, something else is wrong.

If it keeps running and doesn't finish, poke around with top and/or similar tools to see how bad things are.

Needing more than 3Gb of swap (from where you started) would clearly mean something else is fundamentally broken. But needing more than 1000Mb of swap is likely (given what you already know) and doesn't mean that more won't work well.
 
Old 04-29-2008, 10:22 PM   #9
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
@johnsfine

I usually enjoy reading your posts, (and I agree with you) but why on earth you use b for byte? SI is case-sensitive! This means B for byte and bit for bit. Can we leave illiteracy for middle-school dropouts?

http://physics.nist.gov/cuu/Units/prefixes.html
http://physics.nist.gov/cuu/Units/binary.html
 
Old 04-30-2008, 04:52 AM   #10
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 Emerson View Post
B for byte
You're right. I use b vs. B more carefully in contexts where there is a chance of misunderstanding the intent. But I should use B even when the context makes it clear that it doesn't mean bit.
 
Old 04-30-2008, 05:11 AM   #11
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
the better way is to use 'o' for bytes (octets).
 
Old 05-02-2008, 05:12 AM   #12
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
I tried adding a 4 GB swap file, but nothing changed. There are no -j switches, and the error message is printed immediately (I didn't think it was a swap problem, since the hard disk led never turned on).
 
Old 06-25-2008, 01:05 PM   #13
simopal6
Member
 
Registered: Jun 2006
Location: Italy
Distribution: Slackware 13.1
Posts: 230

Original Poster
Rep: Reputation: 30
Problem solved: upgrade make from 3.80 to 3.81
 
Old 12-05-2008, 05:23 PM   #14
j0h4n
LQ Newbie
 
Registered: Dec 2008
Posts: 1

Rep: Reputation: 0
Smile

Quote:
Originally Posted by simopal6 View Post
Problem solved: upgrade make from 3.80 to 3.81
I can confirm that this may help; after upgrading to gmake version 3.81, I was able to compile ffmpeg in FreeBSD 6.1. Adding virtual memory had made no difference. Thanks for the great advice!
 
Old 06-01-2009, 12:36 AM   #15
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
I'm getting the same error and have 4 gigs of ram. about to upgrade gmake.
 
  


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 to make virtual machine in xen allocate memory automatically? jimmyjiang Red Hat 0 03-13-2008 02:17 PM
Help!!! memory exhausted error on RedHat ES V3U6 cojo Linux - Software 4 06-01-2006 08:00 AM
HLFS: sed-4.1.4 & uClibc-0.9.28, Memory Exhausted. Yerp Linux From Scratch 1 01-05-2006 02:26 PM
Memory Exhausted? thachp Linux - Newbie 9 01-04-2006 07:16 PM
squirellmail, Fatal error: Allowed memory size exhausted illtbagu Linux - Software 6 11-08-2003 05:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:27 PM.

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