Click to See Complete Forum and Search --> : swap file
discipledoc
11-29-2000, 12:24 PM
How big do a swap file(s) need to be for two-30 gb hard drives and 384 mb memory?
------------------
Original translation: "The fool says in his heart, 'no God'" Psalm 53:1
A_Lawn_GNOME
11-29-2000, 12:32 PM
Someone correct me if I'm wrong but...
Swap partitions are usually 2x your memory unless you have something silly like 512 MB. Swap partition have a maximum length of 128 MB so you need to create more than one to get the desired size.
discipledoc
11-29-2000, 12:40 PM
I thought I remembered something like that, but I was unsure. I did a 'drake 7.2 install last night and i did not do a correct swap file partition...and as a result, my machine locked up....thanks!
------------------
Original translation: "The fool says in his heart, 'no God'" Psalm 53:1
Linuxman
11-29-2000, 01:27 PM
not to be anal about this, but a swap file is not the same as a swap partition and they should not be used interchangeably as they have different means of setup and have different characteristics. thank you.
------------------
ADOPTION not abortion. Proud father of an adopted boy.
NFL Week 13
Ravens 44, Brownies 7
No shutout, but the Ravens are looking more and more like the AFC's best team. Bring on the Vikings.
W 9
L 4
Next Week, Bye. What do you mean, bye? Oh no. I have to wait two weeks before another game?! Oh shoot. In week 15 at home vs. San Diego.
DrDrake
11-29-2000, 01:30 PM
My box has 256 megs of ram and a 128meg swap partition.. I say screw making a 500+ meg swap partition, I DEFINITELY do not want 500megs stored on my harddrive being accessed as if it were ram, no matter what.
Think about it.. a computer with 64 megs runs fien with 128meg swap partition.. So by increasing ram to 256 or 384, why enlarge it? It is actually taking the need for a swap partition away. A swap just simulates ram, but if you add more, then why must you increase swap?
Food for thought..
A_Lawn_GNOME
11-29-2000, 01:50 PM
I suppose everyone has their preferences.
yvrich
11-29-2000, 01:51 PM
Right, swap partitions are useful if your computer doesn't have much RAM, and needs more space to store information on the fly. If you've got 384 meg of RAM, you might not even need a swap partition, unless you're running a real memory hog.
(Anybody, please feel free to correct me.)
A couple of things, recent Distros (those that came out this year) can have swap files larger 127mb (the old limit with say RH 5.2).
On my current machine I Have 256mb of a Swap partion just in case. I have 256mb RAM as well. The old theory was that 127 was good enough. The new theory is that you should have 1x-2.5x depending. If you have a ridiculous amount of ram (over 192 would count) you really don't need much of a swap file, but you also probably have a ridiculous amount of storage as well. I rarely if ever touch my Swap (you can check gtop or top to check on swap usage) partion. Linux has fairly intelligent memory handling. It will fill up the RAM, but not swap unless it really needs to. So having a large swap partion (or file) will not hinder performance.
Not having enough swap will be quite disastrous. I speak from expierence here. I literally wtched a bottleneck stop my computer.
------------------
Just a Tuna in the Sea of Life
bytemare
11-29-2000, 02:37 PM
those small swap areas are fine for an at home workstation, but if you're running any large apps, then 2.5x your RAM is the way to go.
I have 2 Gigs of RAM here at work and 3 Gig of swap area... just in case http://www.linuxnewbie.org/ubb/wink.gif
discipledoc
11-29-2000, 04:54 PM
Also, I have two-30 gig hard drives. Do I need to split the swap partitions up or make them both twice the RAM?
------------------
Original translation: "The fool says in his heart, 'no God'" Psalm 53:1
TheLinuxDuck
11-29-2000, 05:16 PM
discipledoc:
I want to offer some of my experiences with swap partitions and such... I have a machine at home that has 256 meg o ram and a 128meg swap file. I have never seen the swap file be used... not once.. I haven't bothered to delete it because I don't need the extra space. Even if you're running a mega site with tons of goodies, I very seriously doubt that your swap partition will ever get used.
My advice:
Make one swap partition, 32 meg in size.
I am betting that your distro will never touch it anyway.
You can monitor how much ram is being used with top.
I think the whole "double your ram" swap partition size is a load of hooey. If you've got 16-64 meg of ram, you'll want a 128 meg swap partition. If you've got +64-128mego ram, a 64 meg swap partition will suffice. If you're running better than 128meg of ram, I don't see a need for more than 32meg swap partition. Unless you're running xwindows, don't fret the swap partition, especially with 384meg.
Just my advice, take it as it is, just my humble opinion. http://www.linuxnewbie.org/ubb/smile.gif
------------------
TheLinuxDuck
Wait... that's a penguin?!?!?
:wq
I don't beleive in the idea of making swap twice the size of your ram in linux. Maybe you need that much in windows, but not in linux. I have a system with 128mb ram, and a ~20mb swap partition, with no problems. I have a 48mb ram system and a 12mb swap file, again with no problems, even on compiling.
The size I will choose for a swap depends on how much total HD space I have and what the system is being used for. For a server, I would use 50-100mb, while on a home machine I generally use 30mb or less.
Saai
discipledoc
11-29-2000, 05:35 PM
Thanks, fellas! I just read some stuff on the 'drake website and it agrees with what you guy are saying. I guess I'll just make ONE swap partition and leave it at that. BTW, is there a BIG difference in pc100 and pc133 in Linux?
------------------
Original translation: "The fool says in his heart, 'no God'" Psalm 53:1
Linux puts more stuff into ram and tries to use the swap as little as posible. This is the exact opposite of what MS Windows does in practice. I would imagine that faster memory would see faster performance, but I have no hard numbers to back it up, just a gut feeling.
------------------
Just a Tuna in the Sea of Life
Craig McPherson
11-29-2000, 11:10 PM
The more RAM you have, the less swap space you need. "Twice the amount of memory you have" is radical left-wing Communist propoganda created by child-molesting paedophiles.
Supposedly.
With 384MB of RAM, you'll probably never use any swap space at all unless you do some really heavy stuff. So go for 256MB of swap space just to be safe, unless you think you're going to be tight on space, in which case do 128.
------------------
http://users.ipa.net/~cmcpher/paminv.gif DEBIAN (http://www.debian.org/) http://users.ipa.net/~cmcpher/paminv.gif
It turns girls into statues!
[This message has been edited by Craig McPherson (edited 29 November 2000).]
bytemare
11-30-2000, 10:41 AM
2.5 x RAM for swap space is standard operating procedure for unix servers. My Solaris admin guide here from SUN recommends it.
In a server enviroment you want enough swap to be able to swap your entire RAM. So in the case you're maxed out, you have a RAM image in RAM, one in swap and you need the extra .5 for overhead.
Naturally for a home machine this doesn't matter, but for a large server swap is critical.
DrDrake
11-30-2000, 10:46 AM
PC133 makes a big difference. I have 256 megs of CAS 2:2:2 PC133, its hella quick. Especially since linux places so much in memory, and it is used so much. Our servers at work have 128-256 megs of ram, and we have over 200+ websites per server (some sites running php and cgi also), and we never touch the swap file. I just think there was some swap file nazi's in these forums that want to make you believe you need one
bytemare
11-30-2000, 11:22 AM
Sun Sparc enterprise 450
2 Gigs of RAM
73 users currently
running several databases, self serve clients and remote clients via odbc
Memory: 2048M real, 32M free, 1311M swap in use, 2366M swap free
so one person thinks a communist is the one who needs swap space, another thinks it's a nazi..... http://www.linuxnewbie.org/ubb/smile.gif
Craig McPherson
11-30-2000, 02:34 PM
I acknowledge that busy servers need a lot of swap space.
However, in the example above, if the Sun Sparc Enterprise 450 had had 4GB of RAM instead of 2GB, it would likely be using LESS swap space, not MORE.
Fuzzy math.
bytemare
11-30-2000, 02:48 PM
If this server had 4 Gig, then the recommended swap space would increase so that the entire core could be dumped into the swap. Not only that, I would be happy to allocate more of this RAM as shared memory for the database brokers.
I've been going by the book on this for a long time. Maybe Sun didn't undderstand
"fuzzy math" though when they wrote their Solaris admin book.
Sweede
11-30-2000, 04:23 PM
i used to run 192 megs of ram in my pc (freind of mine stole his 64 dimm back :\ )
running X windows, xmms, netscape, enlightenment with no epplets running (no gnome either), i was using 192 megs of ram AND about 70-80 megs of swap.
each time i opened a new Netscape window, another 20 megs was used.
i had a 256 meg swap partition and have FILLED it up using X 3.3.6, netscape (about 10 windows i think) xmms, apache, mysql, blue fish (for HTML editing), and gimp.
In comparison, because im w2k troll http://www.linuxnewbie.org/ubb/smile.gif (not like goughmezzz, which is probably craig.).
im running 5 explorer windows, homesite, photoshop aim AOL winamp PuTTy(Huge ram hog there http://www.linuxnewbie.org/ubb/wink.gif), MySQL-nt for win32
and i have 128 megs of ram and whatever for page.sys (not sure).
im only using 160 megs of ram, which is pretty damn good. i still have 33megs of physical memory free.
nathaniel
11-30-2000, 05:28 PM
It is 2x the size of the Ram amount but like me it is nice to have a partion for swap of a whopping 1.1gigs :-) yes u read correct, I have 512mb ram and the space for it (56gig scsi) half windows/RD7
NB
MovingTarget
12-01-2000, 12:50 AM
i have 256mb ram and a swap of 128mb thing thats so funny is i just cant seem to fill my ram up so my swap stays empty LOL
[This message has been edited by MovingTarget (edited 30 November 2000).]
Funny thing is that my notebook has 192mb RAM. I can run GNOME/Sawfish, XFree86 3.3.6, Netscape 4.76, XMMS, Eterm, and a few applets like battery monitor and CPU/Memory monitor plus maybe gkrellm; and I will still not use any swap. Ic ould even open up Wordperfect 2000 (that runs in WINE no loess) and swap still wouldn't be touched.
Of course Windows (on my desktop that has even more memory) will have memory free but will still use about 128 mb of swap. I could edit the registry so Windows has better swap handling, but haven't bothered seeing as I haven't used it at home in over 2 weeks.
------------------
Just a Tuna in the Sea of Life