LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-19-2005, 09:15 AM   #1
supersucker
Member
 
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, 12:36 PM   #2
freakyg
Member
 
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, 12:50 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
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, 01:26 PM   #4
Komakino
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:
free
does it include swap?
 
Old 05-19-2005, 02:15 PM   #5
securehack
Member
 
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, 06:28 PM   #6
morneo
Member
 
Registered: Mar 2005
Location: New York
Distribution: FC3
Posts: 39

Rep: Reputation: 15
Try reading through this article.

http://www.linuxjournal.com/article/8308

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.
 
  


Reply


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 11:19 PM
Use RAM as swap??? oneandoneis2 Linux - General 3 08-19-2004 05:48 AM
A how to: How much Swap to setup/Linux eats my RAM MasterC Linux - General 5 01-13-2004 07: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 02:07 PM
Swap and RAM ? mikeshn Linux - General 1 09-18-2002 10:33 PM


All times are GMT -5. The time now is 10:52 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration