Click to See Complete Forum and Search --> : optimal size for swap partition


chaytah
12-22-2000, 05:02 AM
What's the optimal size for a swap partition?
I have 512MB RAM and have Mandrake 7.2 installed. Everything works just fine except once inawhile my hard drive starts getting accessed like crazy and everything stalls till the couple of minutes it takes is over. I have a hunch taht maybe it's my swap file, as it usually happens when I make changes or open a new program. My swap size right now is 256MB.

Strike
12-22-2000, 05:55 AM
Well, you can use programs to monitor your memory usage. I have a hard time believing you'd routinely fill up half a GB of RAM, unless you are running like 10 instances of Netscape on top of KDE2 while running 8 copies of Blender. Check and make sure that your memory is getting all used first. 256MB swap should be fine, though I usually like at least as much swap as I have memory if not more. But in your case that would give you more than a GB of RAM. I think 256MB is fine for you.

Oh, and my recommended monitoring program is GKrellM (http://www.gkrellm.net)

scott_R
12-22-2000, 07:13 AM
Most of the time people recommend between 2x and 3x memory for a swap. Th eproblem in this situation is that you have plenty of memory. First make sure your slowdown is actually a memory problem, then see if it you are using the ram you have. Another item to check is whether you have too much swap space. Just like a full hard drive, if your memory is too large, it can slow your box down significantly. If I were you, I'd be tempted (if you can afford to), to turn off the swap file and see if your performance doesn't improve. If it does, cut down on your swap space.

------------------
RTFM=Rewrite The F***ing Manual
For more info, visit http://rute.sourceforge.net/
The snow's falling, and so is MS...:)

Harry
12-22-2000, 07:15 AM
Originally posted by chaytah:
Everything works just fine except once inawhile my hard drive starts getting accessed like crazy and everything stalls till the couple of minutes it takes is over. I have a hunch taht maybe it's my swap file, as it usually happens when I make changes or open a new program. My swap size right now is 256MB.

Run "top" when the disk is going crazy. Most likely the program that is causing the disk thrashing is "locate". This program sort of catalogs all of the files on your harddrive for easy searching of a file. An example search is "locate netscape". All files and folders that have the name netscape will quickly be listed. It has nothing to do with your swap. The command "free -m" will show how much memory you are using and I will almost bet that barely any of your 256 MB of swap is being used. HTH

scott_R
12-22-2000, 07:19 AM
Originally posted by scott_R:
Most of the time people recommend between 2x and 3x memory for a swap. Th eproblem in this situation is that you have plenty of memory. First make sure your slowdown is actually a memory problem, then see if it you are using the ram you have. Another item to check is whether you have too much swap space. Just like a full hard drive, if your memory is too large, it can slow your box down significantly. If I were you, I'd be tempted (if you can afford to), to turn off the swap file and see if your performance doesn't improve. If it does, cut down on your swap space.



I have serious doubts if you even need that amount of memory, and am kinda curious if your mother board isn't part of the problem. Even though many say that they can handle a lot of memory, they use a cheap bios that can't handle it. All good things to double check.


------------------
RTFM=Rewrite The F***ing Manual
For more info, visit http://rute.sourceforge.net/
The snow's falling, and so is MS...:)