Swap File Size

xtrmerik

Junior Member
Oct 11, 2001
9
0
0
I am setting up a new system that will be dual-booting between Win98SE & either XP or Win2KPro.

I have two IBM GXP 60's that I am setting up with a promise card for Raid 0 (striped).

I want to partition the drive after it is set up so I can have a small partition that is just used for the Window's Swap file. I have been told that this will help the system run better and keep the fragmentation down.

The question is what is the correct size for this drive (swap file) to be?

The final drive size will be recognized as 80Gig's and I have one Gig of Ram.

Thanks for your help,

Erik


 

Fallen Kell

Diamond Member
Oct 9, 1999
6,097
461
126
Well standard UNIX convention for swap size is 2.5 times amount of RAM, but we are using Windows..... Since you have 1 gig of RAM I would recommend a swap size of 1.5 - 2 gigs. You should not run into any problems (at least in the immediate future) of running out of swap space with that size. But I do want to warn you that anything much less then that might be painfully restricting, especially if you do any type of software development. I personally have had my swap file as large as 2.5 gigs on my laptop, but I only have 128 megs of RAM on my laptop. With you having 1 gig RAM 1.5 to 2 gigs should be fine.
 

btvillarin

Senior member
Nov 3, 2001
469
0
0
Wow..1.5-2 GB of Swap File!?! How nutz! With his amount of memory, and maybe a setting or two, he could easily get by with a 500MB partition. xtrmerik, I recommend a 600MB partition, then the rest for your OS. For the best setup possible, I'm not sure if RAID would be the best choice. What I can tell you is how I've set my computer up.

I have a whole 30GB 75GXP for Windows XP, then a WD600AB 60GB for data and paging file. The first partition is 600MB for my paging file, so it's at the front of the drive. Then the other partition is just data. I'm organized, so everything's in it's separate folder. I set the paging file to stay the same size (contigious) of 500MB, to reduce paging file fragmentation. With 512MB of RAM, I can do without it, but I keep it just in case. The Windows XP partition is reduced, since the paging file isn't included - it doesn't need to be backed up. So, I image my Windows XP partition the way I want it, then image it to my 2nd hard drive, then burned to CD, in case everything goes bonkers. Diskeeper 7 is set to run with FragGuard, so that fragmentation is minimal. I don't worry about it, except perhaps to run a full defrag once a month. I'm not using RAID or anything; I just have the IBM as primary master and the WD as primary slave. Everything is running speedy, without problems.

I hope this helps you in any way. I tried to explain it as easy as possible, but sorry if I wasn't clear.
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
239
106
I echo btvillarin's erudite comments. Basically, the more real RAM you have, the less you need a swap file at all. A swap or pagefile is simply virtual memory to make up for a ashortfall in the real thing. Therefore, if you increase the real thing, you need less of the fake or virtual thing.

The exception is if you are heavy into editing and processing video clips where files can exceed 20 megs.
 

aceO07

Diamond Member
Nov 6, 2000
4,491
0
76
I have never understood why people recommend 1.5 to 2 times the amount of RAM. Not sure who's correct in this matter either.

On my 800mhz system with 512MB RAM, I only use 250MB swap max. I don't notice any slow down or extra drive access, though I've never tried a 500MB to 1GB swapfile before to compare.

I like to have my OS and swapfile on two different physical drives, or at least 2 partitions.
 

VH5150

Junior Member
Dec 8, 2001
10
0
0
I have Windows ME with 512 megs of ram and i set my VM to 500 minimum and 500 maximum, i like setting the same amount for the min. and max. because it cuts down on fragmentation and free space errors.
 

ConFuseMe

Member
Oct 8, 2001
40
0
0
Any standard user with a 700 MB of RAM doesn't even need a swap file.
I have 640 MB of ram and don't use one at all because my main memory never gets used up.

Seeing since I don't know how much ram your system will actually use though to be safe I would recommend a VM swap file the same size as how much memory you have.

VH5150 is right too. Setting the Minimum and Maximum numbers to the same size will decrease the defragmentation of your swap file.
 

Fallen Kell

Diamond Member
Oct 9, 1999
6,097
461
126
The reason that 2 - 2.5 times the amount of RAM is usually recommended for swap comes from the fact that UNIX, Linux, BSD, OSX, etc. ALL use that swap space if the system ever panics. All the data in RAM gets dumped to the Swap partition during a system panic, if you do not have enough swap, you are not able to recover the session, and can not figure out the reason for the system panic.

My recommendation comes from the fact that I HAVE PERSONALLY USED and SEEN MY swap file reach WELL OVER 1.5 gigs. You need to remember here, that since this will be a swap partition on a RAID system, you will NOT be able to easily resize the partition in the future without COMPLETELY deleting the ENTIRE setup (or the addition of a new HD purely for swap). Remember that you not only have to worry about the demands of todays programs, but the demands of programs that come out one, maybe two or even three years from now. Like I already stated, I have already had the need for 2 gigs of swap space with TODAY'S applications. Programers are no longer taught to worry about the amount of memory their programs need, because they are being told that everyone has plenty of RAM and plenty of swap space. The effects are being seen in today's programs and games that require 800 megs of more for that application alone. And like I said, if you are a programer, in Microsoft Visual Studios .NET, I needed 3 GIGS of swap on my MAIN system, and that has 768 megs of DDR RAM. Its not like you can just arbitrarilly change your swap partition size, and if you ever need more then what you have, you will plain not be able to run the program. Its up to you, but personally, its best to play it safe and have a few extra megs of swap available to you and not need it, then to not have enough.
 

btvillarin

Senior member
Nov 3, 2001
469
0
0
What operating system are you running, Fallen Kell? I'm especially curious since you didn't mention anything about Windows. You mentioned everything but Windows; I know you said "ALL", but subconsciously, you didn't really include it.

We that use Win9x know that there isn't a way to exactly debug a crash (unless Dr. Watson is running). If we have WinXP, there is a memory dump that we can choose to have, in case there is a crash, but that's put into the system root directory. For me at least, I have yet to experience a crash and I've been running for two weeks. So, it's set to not write any debugging information.

xtrmerik hasn't written back if he does work with graphics or anything, so we don't know exactly what his uses are with his computer. That'd give a better insight on what it really should be. Not a lot of people use MS Visual Studios or whatever it is, so to me, I would think 500MB is a safe size.

If you really needed to change your swap file size, you're allowed to in Windows.
System Devices > Advanced tab > [Performance] Settings > Advanced tab > [Virtual Memory] Change...

xtrmerik, If you don't take up that much space on your hard drives, perhaps do leave a partition on that 2nd HD for maybe 1GB. But, I'm not sure. Post back and do tell us what you do with your computer.

An corky-g, I'm not sure what "erudite" means, but if I'm learned and rude, I didn't mean to make it that way. I was just shocked that Fallen Kell suggested the paging file be 1.5-2GB. I mean, I really do think that's nutz. That space can be used for something else, right? *everybody nods their heads* j/k...
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
The reason that 2 - 2.5 times the amount of RAM is usually recommended for swap comes from the fact that UNIX, Linux, BSD, OSX, etc. ALL use that swap space if the system ever panics. All the data in RAM gets dumped to the Swap partition during a system panic, if you do not have enough swap, you are not able to recover the session, and can not figure out the reason for the system panic.

Actually Linux doesn't do this, atleast not in the standard kernel.

The reason so much swap is recommended for Linux is because it avoids disk I/O but not always freeing swap space which speeds things up, but if it needs to swap something out it needs more swap to allocate and if it has to free swap to allocate more you probably more than doubled your disk I/O.

A swap or pagefile is simply virtual memory to make up for a ashortfall in the real thing.

Virtual Memory and swap files are not the same thing, but I don't want to have that argument again.

Any standard user with a 700 MB of RAM doesn't even need a swap file.I have 640 MB of ram and don't use one at all because my main memory never gets used up.

NT needs a swap file, period. If you don't create one 2K or XP will create one for you, NT 4 just BSODs. If you use an OS like Win9X that barely has any memory management you can probably get away with it because you're rebooting weekly anyway.

If we have WinXP, there is a memory dump that we can choose to have, in case there is a crash, but that's put into the system root directory.

Which is really dumb, because writing to a filesystem after the kernel crashes has a very good chance to corrupt the filesystem. But that's a different thread...

Anyway, 500M should be fine for him. He'll have to track his usage for a while and see how much swap he really hits to decide how much swap he really needs.
 

veryape

Platinum Member
Jun 13, 2000
2,433
0
0
I think the size of your swapfile was a lot more of a concern in windows 98 since it had such atrocious memory management. What with w2k and xp I don't think it's as much of an issue. Since i'm running win98 I still have mine set at 250mb right now, and even if I upgrade to xp or w2k i'm not so sure i'll change it, unless it actually brings my performance down.
 

ConFuseMe

Member
Oct 8, 2001
40
0
0
Thanks for clearing that up Nothinman. I do have Win98 SE and reboot often. So that would explain why I haven't had a problem yet.
I didn't know that you absolutely needed one in NT either.
I have Win XP also and was unaware that it creates one for you too. Everyones learning something here.
You seem very knowledgable about differen't OS's.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
I do have Win98 SE and reboot often

My Linux workstation at work just hit 117 days uptime, I really dislike rebooting =)

You seem very knowledgable about differen't OS's.

I try, well I try to learn about Linux and I'm forced to learn about Windows =)

I just hate all the misconceptions about memory management and virtual memory, and people who think that the pagefile is synonymous with virtual memory. I'm no mm guru but I made it through the mm sections of "Understanding the Linux kernel" and it learned me quite a bit.
 

BreakApart

Golden Member
Nov 15, 2000
1,313
0
0
My turn...

Swap File size recommendation of "2-3 times base memory" rule was created for a couple reasons.

-back in the day home PC's didn't have 1Gig of ram, only servers did, and even then they didn't short-change the swap file.
-Before Windows95 we didn't have the dynamic swap file ability, so you had to do just what xtrmerik is asking about-"setup a static dedicated swap file". *nix OS systems still require you to set them up.
-Using the 2.5 times rule, you are following the "better to be safe than sorry" rule. As everyone in this thread mentioned already, you may never USE the entire swap file, but if the system ever does ask for more swap space than you have allocated-YOU'LL CRASH!
-Running a server you would be a fool to shortchange your swap file, it just wouldn't be worth the trouble it could cause if the system runs out of swap space and crashes, possibily corrupting the system. Ouch, hate to explain to a business i ruined all their data over a few hundred megs of hard drive space. Just not worth it...

As you are creating this swap file onto a dedicated partition, i'm guessing you don't care to mess with it once it's setup. So i would make it larger than your system is likely to EVER use. This # will be based off your projected use for that computer.
-just gaming? (with over 512mb of ram you could likely get by with 1x RAM.)
-video editing? (much larger than gaming, hate to run out of swap space and ruin all the work you did on a large video rip...)


Good Luck
 

HiHoStevo

Member
Dec 19, 2001
63
0
0
Extrmerik is unavailable for the moment........

So as his Dad I will thank all of you that have been contributing. This has been a very interesting thread and education. Mostly Erik uses the computer for light MS-Office stuff... and lots of gaming. He put in that much ram, just because it was so cheap right now... I constantly regail him of stories of my first 2Meg ram upgrade card that cost $700! But of course that was a long time ago....... in a galaxy far far away.

Thanks again and keep the experience coming.

HiHoStevo

 

btvillarin

Senior member
Nov 3, 2001
469
0
0


<< Extrmerik is unavailable for the moment........So as his Dad I will thank all of you that have been contributing. >>



What the!?! Whoa...that's the first I've ever seen that. LoL
Great job Nothinman. Couldn't have said it better.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |