LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-30-2007, 06:59 AM   #1
ferradura
Member
 
Registered: Jun 2006
Location: PT
Distribution: CRUX & Slackware
Posts: 100

Rep: Reputation: 15
is swap efective?


Here is my situation:
At work i am dealing with huge datasets of 3d scans. I am using a windows machine to run some proprietary software for the alignment and merging of that data to make a 3d model. The problem is i reach a point were i run out of memory and the machine has 2 GB of RAM.

I am considering to switch to a Linux machine but i need to know if SWAP really works. Will i be able to load the complete dataset and have 4/6/8 GB of swap in use? Is it a real alternative to physical RAM?
The software i am considering is SCANALYZE.

Quote:
Needless to say, for datasets of this size we recommend a computer with plenty of physical memory (at least 1 GB) and swap space (many GB)
I am asking because in my day to day use of my system i don`t recall ever needing to use my swap space...

Hope to read from similar experiences.
Thanks

Last edited by ferradura; 08-30-2007 at 07:13 AM.
 
Old 08-30-2007, 07:08 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Windows uses "swap space" also when it runs out of RAM, possibly even before. It saves that information to a swap file on the disk, though. You can do that in Linux too, but the usual way is to have a separate partition for swap, because that partition doesn't need to have a regular filesystem on it, and if I'm not completely mistaken, that way it's faster to access than if the swap space was used on a regular filesystem. Anyhow, be it in file or partition, it's not a match for RAM; RAM is much faster than accessing the harddisk, and SWAP is meant to be used when RAM runs out. If you do hard work that needs a lot of RAM, then buy a lot of RAM; as long as you don't use swap, you work fast, and when you use swap, you don't work that fast anymore.

SWAP space "works" in the sense that when you run out of RAM, your machine won't freeze and die if you have swap available. With big work like yours I can't help saying: buy more RAM if you feel it's not enough. Having enough swap space is definitely needed to have your machine usable, but it's not equal to having RAM free, and if you like doing your job quickly and without machine slowing down a lot, don't think you can get away with little RAM and a lot of swap.

In my daily usage I don't use swap space much either, but sometimes it's needed when I do run out of memory.

Did I say "buy more RAM"? If I didn't, BUY MORE RAM! It's not that expensive if that's your profession. Note that there's a limit that you can fairly easily meet nowadays, in the amount of RAM I mean, especially on 32-bit systems.
 
Old 08-30-2007, 10:03 AM   #3
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 43
Swap is best put on another partition for the reason that it is faster than going through the standard filesystem overhead for a simple file-based access (like the swap file on Windows uses). Further, memory stored in swap will be "swapped in" to RAM when it is used, and swapped out when other memory requirements become more important. This means that if you run out of RAM for all active applications your system will commence to thrashing, which is the process of constantly swapping memory onto and off of the disk. So, you will always need enough main memory to hold the resident sets of all active processes. But it is very useful to have swap, say in the event that your email client becomes inactive and all your RAM is used by another active process.

In short: yes, it works, and is good.

Usually, the recommendation used to be to have twice as much swap space as RAM, and that is the rule I follow, with 2048 MB or swap for 1 GB RAM.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM
Need Help Increasing Swap by creating a swap file froggo Red Hat 3 06-13-2006 08:04 AM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Difference between Swap Virtrual memory and Swap Parition Nappa Slackware 4 11-27-2003 07:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:01 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