Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-19-2005, 08:15 AM   #1
Registered: Jul 2004
Location: Berlin
Distribution: fedora 3
Posts: 79

Rep: Reputation: 15
telling linux to use not ram but swap ?

hi everybody,

i have a huge problem:

i have a big database (17 GB) and a query-script in perl. the machine on which the database is running has only 1 GB RAM. if i do a query via the perl script, the result set i get is always bigger than 1 GB and i get the error message:

>> out of memory

i have searched cpan for a modul with which i can tell perl not use the ram but the swap partition , but i didnt find anything

is there a way i can tell linux:
"if a running script causes a running out of memory, use the swap partition instead of the ram"?

thx for any help
Old 05-19-2005, 11:36 AM   #2
Registered: Apr 2005
Distribution: LFS 5.0 and 6.1
Posts: 705

Rep: Reputation: 30
I never get this message (out of memory), and I do alot of Graphics work, and the swap is used automagically when needed...................

How big is your swap partition??
Old 05-19-2005, 11:50 AM   #3
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
As far as applications are concerned, there is no difference between ram and swap. It is all mapped to the same virtual addressing space.
Old 05-19-2005, 12:26 PM   #4
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
Is your swap partition actually active? If you type:
does it include swap?
Old 05-19-2005, 01:15 PM   #5
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

Rep: Reputation: 30
Else, do:

dd if=/dev/zero of=swap0 bs=1000000 count=1
makeswap swap0
swapon swap0

That will automatically start working in swap when memory nearly runs out.

--Abid Kazmi
Old 05-19-2005, 05:28 PM   #6
Registered: Mar 2005
Location: New York
Distribution: FC3
Posts: 39

Rep: Reputation: 15
Try reading through this article.

It tells you how to use more ram rather than hard disk and the other way around i.e more hard disk and less ram.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Telling Linux what to use as its swap partition timelord726 Fedora 26 01-01-2005 10:19 PM
Use RAM as swap??? oneandoneis2 Linux - General 3 08-19-2004 04:48 AM
A how to: How much Swap to setup/Linux eats my RAM MasterC Linux - General 5 01-13-2004 06:30 AM
16 GB of RAM and Linux still uses over 1 GB of a 2 GB swap partition!? lumberjack77 Linux - Software 8 09-25-2003 01:07 PM
Swap and RAM ? mikeshn Linux - General 1 09-18-2002 09:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:48 PM.

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