HOW BIG SHOULD THE SWAP FILE BE ??
This is a discussion about HOW BIG SHOULD THE SWAP FILE BE ?? in the Windows Hardware category; i have a p3 500 with 384 mb of ram. even with that much ram w2000 makes a swap file sized 550 mb !!!! do i need a file that big or can/should i make it smaller ???? under nt4 i used the programm superdisk to create a virtual swap drive of 100 mb in ram is this also possible under w2000 ??.
i have a p3 500 with 384 mb of ram . even with that much ram w2000 makes a swap file sized 550 mb !!!! -- do i need a file that big or can/should i make it smaller ????
under nt4 i used the programm superdisk to create a virtual swap drive of 100 mb in ram -- is this also possible under w2000 ??
under nt4 i used the programm superdisk to create a virtual swap drive of 100 mb in ram -- is this also possible under w2000 ??
Participate in our website and join the conversation
This subject has been archived. New comments and votes cannot be submitted.
Jan 21
Apr 4
0
35 minutes
Responses to this topic
Under NT4 you took 100Mb of RAM away from the OS to make a RAM disk for the swap file? This is a very silly thing to do. Why not just make a zero sized swap file in the first place? The OS can manage memory a bit better than that...
The best size for the swap file it whatever size the OS decides is best - usually size-of-memory + a margin. If you're really unhappy with the OS swapping, zero the swap file size...
The best size for the swap file it whatever size the OS decides is best - usually size-of-memory + a margin. If you're really unhappy with the OS swapping, zero the swap file size...
well in nt i think it is best to set min and max the same and put it on a sperate partition. helped on my laptop wich i run 2195 and only have 32meg of ram with a min/max 260 meg swap space. I am still hurting for memory but this at least made it bareble.
p.s dont mean a partician just for swap space i mean on a different particion then the OS
[This message has been edited by chopper2000 (edited 22 January 2000).]
p.s dont mean a partician just for swap space i mean on a different particion then the OS
[This message has been edited by chopper2000 (edited 22 January 2000).]
Good point about max and min sizes - set both to the max size to stop fragmentation of the swap file.
However, a different partition is not always a good idea for the swap file, unless the partition is
1. On a seperate physical device - on the same just increases the amount of head movement.
2. On a seperate channel if you run IDE. Putting the OS on master and swap on slave on the same IDE channel will seriously degrade performance.
However, a different partition is not always a good idea for the swap file, unless the partition is
1. On a seperate physical device - on the same just increases the amount of head movement.
2. On a seperate channel if you run IDE. Putting the OS on master and swap on slave on the same IDE channel will seriously degrade performance.
Yuppie, I think he was making 2 differnet comments he wasnt saying he was going to make it 0 megs, he wanted to make it smaller, and the second question was can u make virtual drives out of ur RAM using the afore mentioned software.
Actually, he's talking about creating a RAM disk, and putting the swap file on it. If you think about it, that's why I suggested just zeroing the swap file instead...
i have no clue, i remember in whe win98 days i was told it should be: RAM x 2.5 = Best swap size. I dunno about win2k, if anyone has any suggestions about it i'd love to hear it. And as far as making a RAMDisk and using that as the swap file, it would actually slow down the computer, I have tried it before.
now that i think about it, with that much RAM it would be a good idea just to zero out the swap file size, the RAM x 2.5 thing was for computers with like 32-64mb's. sorry
I actually laughed out loud after reading the first post... Surely he wasn't serious... I mean creating a RAM disk to place a SWAP file on?!?! No WAY!!
Maybe an explanation is in order:
The SWAP file with Win9X, WinNT, and Win2K is for the OS to use when the memory space needed to run programs/services is larger than the physical RAM available. When this happens, the OS will copy the least used processes in memory and copy them to disk, placing whatever is currently requesting the memory into the newly freed memory. (At least this is the theory...) In practice, there are many that question if the OS moves the "least" used processes to HD.
So when whoever, creates a RAM disk for a SWAP file, they just made less RAM available to the OS, and created an extra wait state for times when the lesser amount of memory is not enough (the OS has to start using the RAM disk SWAP file, when it might have had enough memory to run without any swapping otherwise.)
That said, there are several ways to manage your SWAP file:
- set the Min and the Max the same size: this creates a SWAP file that is contiguous and should minimize the overhead that the OS needs to manage it.
- on placement on partitions and channels, Yuppie's points are well taken.
- personally, I would NEVER set my swap file to 0. If you do this, if the situation ever arises that the OS needs to use a SWAP file, you'll get a message that the system is out of memory, and that you'll need to increase SWAP file size and REBOOT (I absolutely hate rebooting!!)
- and finally: According to what I have read, MS recommends a SWAP file size of 2.5X the size of your existing RAM. Granted that if you have very little RAM, you'll want to increase that factor, and if you have gobs of RAM, you'll probably want to decrease that factor.
My current setup is a 256MB RAM machine with a SWAP file min and max set to 384MB. At one time, I had 128MB RAM with a 256MB SWAP file - and I got that ugly not enough memory message above. (UT uses an ungodly amount of RAM, as well as the other programs I had running at the time...)
Regards...
------------------
J. Byron Todd
Computer Consultant
byron@toddcomp.com
Todd Computer Solutions
Maybe an explanation is in order:
The SWAP file with Win9X, WinNT, and Win2K is for the OS to use when the memory space needed to run programs/services is larger than the physical RAM available. When this happens, the OS will copy the least used processes in memory and copy them to disk, placing whatever is currently requesting the memory into the newly freed memory. (At least this is the theory...) In practice, there are many that question if the OS moves the "least" used processes to HD.
So when whoever, creates a RAM disk for a SWAP file, they just made less RAM available to the OS, and created an extra wait state for times when the lesser amount of memory is not enough (the OS has to start using the RAM disk SWAP file, when it might have had enough memory to run without any swapping otherwise.)
That said, there are several ways to manage your SWAP file:
- set the Min and the Max the same size: this creates a SWAP file that is contiguous and should minimize the overhead that the OS needs to manage it.
- on placement on partitions and channels, Yuppie's points are well taken.
- personally, I would NEVER set my swap file to 0. If you do this, if the situation ever arises that the OS needs to use a SWAP file, you'll get a message that the system is out of memory, and that you'll need to increase SWAP file size and REBOOT (I absolutely hate rebooting!!)
- and finally: According to what I have read, MS recommends a SWAP file size of 2.5X the size of your existing RAM. Granted that if you have very little RAM, you'll want to increase that factor, and if you have gobs of RAM, you'll probably want to decrease that factor.
My current setup is a 256MB RAM machine with a SWAP file min and max set to 384MB. At one time, I had 128MB RAM with a 256MB SWAP file - and I got that ugly not enough memory message above. (UT uses an ungodly amount of RAM, as well as the other programs I had running at the time...)
Regards...
------------------
J. Byron Todd
Computer Consultant
byron@toddcomp.com
Todd Computer Solutions
Good point ByronT about the OS being out of memory.
TOS will swap out programs to disk even when there is RAM available. The reason for this is to allocate more RAM for use a dynamic buffer cache for HD reads.
Byron, thanks for doing the wordy version - I really couldn't be bothered

OP
tanks for your help guys,
but still want to know if it is better to make a min /max files of maybe 500mb or let the os choose the size.
some people think it is nonsens to create a swap file in ram , well i have lots of programs that use the swap file even with 384mb . also i use the ram disk , with is about of 128 mb as a temp dir , so that the garbage of installation programs and all other files with the os puts in the temp will be deleted after reboot - the installaion of programms is also much quicker , cause packed files will be unzipped in meomory ..
but still want to know if it is better to make a min /max files of maybe 500mb or let the os choose the size.
some people think it is nonsens to create a swap file in ram , well i have lots of programs that use the swap file even with 384mb . also i use the ram disk , with is about of 128 mb as a temp dir , so that the garbage of installation programs and all other files with the os puts in the temp will be deleted after reboot - the installaion of programms is also much quicker , cause packed files will be unzipped in meomory ..
Quote from WinNTMag Win 2000 Proi Update newsletter:
Yes, You Really Do Need a Pagefile that Big!
Two readers have written to question my comments regarding the Windows 2000 pagefile size in my column in the January 2000 issue of Windows NT Magazine (soon to be Windows 2000 Magazine). To reiterate: You need a pagefile at least as large as the physical RAM in your system. And, if you add RAM, you'll need to expand the pagefile. The reason is that Microsoft designed Win2K for nonstop operation. Other OSs--including early versions of OS/2--allow pagefile sizes significantly smaller than physical RAM. Under certain conditions, the system might need to page out more virtual memory than would fit in the file--and the system would hang. By making the minimum pagefile size in Win2K the same size as the RAM, this memory overrun won't happen. That doesn't mean you can't run out of virtual memory in Win2K--you can; the system will try to expand the pagefile, and in the process, the system will slow to a crawl, but it won't stop running. So, to those growing system requirements for Win2K Server, add at least as much hard disk space as physical RAM. On a Win2K AS system with 8GB of RAM, you'll need at least 8GB of space for a pagefile, over and above the 2GB minimum requirement.
Yes, You Really Do Need a Pagefile that Big!
Two readers have written to question my comments regarding the Windows 2000 pagefile size in my column in the January 2000 issue of Windows NT Magazine (soon to be Windows 2000 Magazine). To reiterate: You need a pagefile at least as large as the physical RAM in your system. And, if you add RAM, you'll need to expand the pagefile. The reason is that Microsoft designed Win2K for nonstop operation. Other OSs--including early versions of OS/2--allow pagefile sizes significantly smaller than physical RAM. Under certain conditions, the system might need to page out more virtual memory than would fit in the file--and the system would hang. By making the minimum pagefile size in Win2K the same size as the RAM, this memory overrun won't happen. That doesn't mean you can't run out of virtual memory in Win2K--you can; the system will try to expand the pagefile, and in the process, the system will slow to a crawl, but it won't stop running. So, to those growing system requirements for Win2K Server, add at least as much hard disk space as physical RAM. On a Win2K AS system with 8GB of RAM, you'll need at least 8GB of space for a pagefile, over and above the 2GB minimum requirement.
OMG, I cant belive he meant what he actually said, Yuppie I know what Ram disks are I worked with APK when he created one of the first software utilities to create ram disks
http://www.3dfiles.com/apk/
I just couldnt see any sense at all in making a ram disk and putting ur swap file on it. I guess Im just not used to questions that are so uhmm..... not right.
Man what are all these people doing with these hi end systems when they dont know the basics, dont buy a ferrari if u cant f-ing drive.
http://www.3dfiles.com/apk/
I just couldnt see any sense at all in making a ram disk and putting ur swap file on it. I guess Im just not used to questions that are so uhmm..... not right.
Man what are all these people doing with these hi end systems when they dont know the basics, dont buy a ferrari if u cant f-ing drive.
JimmyK:
>> Man what are all these people doing
>> with these hi end systems when they dont
>> know the basics, dont buy a ferrari if u
>> cant f-ing drive.
I believe they are called "management."
I'm still laughing over the setting of a SWAP file in a RAM disk... Setting up a RAM disk, ok I can see that. I once setup a RAM disk large enough to play Chuck Yeager's Flight Simulator (if any of you can remember that.)
But that was before I became a computer engineer and understood the darn things a little better. People, listen up, the OS is the only thing that "uses" the SWAP file. The OS controls access to it, the OS moves it, manipulates it, puts processes/services into it and pulls them out. AFAIK, nothing else is allowed to randomly access the SWAP file. That said, the idea of using a RAM disk for something as a SWAP file is ludicrous. In fact, the idea of using a RAM disk for programs is a close second in ludicrous. Maybe, just maybe you can make a case for the TEMP dir, but I wouldn't even dare: did you realize that MS puts protected files into the TEMP dir (temporarily, of course)? What will happen when you reboot and your TEMP dir was wiped?
Using a RAM disk to play games, store programs - even temporarily is not giving you the speed increase that you think it is. With the exception of that initial loading into memory, all other operations will be exactly the same speed (because the darn program has been loaded into the main memory - which you reduced by making a RAM disk and putting your SWAP file on it!!!!) As for unzipping files and then installing from the RAM disk... do you really unzip and install that much?!? Do a few seconds saved on the one time install make up for all the time lost with the new overhead for your RAM disk?
Just a few more thoughts.... (and still laughing: HA, a SWAP file in a RAM disk!!!)
>> Man what are all these people doing
>> with these hi end systems when they dont
>> know the basics, dont buy a ferrari if u
>> cant f-ing drive.
I believe they are called "management."
I'm still laughing over the setting of a SWAP file in a RAM disk... Setting up a RAM disk, ok I can see that. I once setup a RAM disk large enough to play Chuck Yeager's Flight Simulator (if any of you can remember that.)
But that was before I became a computer engineer and understood the darn things a little better. People, listen up, the OS is the only thing that "uses" the SWAP file. The OS controls access to it, the OS moves it, manipulates it, puts processes/services into it and pulls them out. AFAIK, nothing else is allowed to randomly access the SWAP file. That said, the idea of using a RAM disk for something as a SWAP file is ludicrous. In fact, the idea of using a RAM disk for programs is a close second in ludicrous. Maybe, just maybe you can make a case for the TEMP dir, but I wouldn't even dare: did you realize that MS puts protected files into the TEMP dir (temporarily, of course)? What will happen when you reboot and your TEMP dir was wiped?
Using a RAM disk to play games, store programs - even temporarily is not giving you the speed increase that you think it is. With the exception of that initial loading into memory, all other operations will be exactly the same speed (because the darn program has been loaded into the main memory - which you reduced by making a RAM disk and putting your SWAP file on it!!!!) As for unzipping files and then installing from the RAM disk... do you really unzip and install that much?!? Do a few seconds saved on the one time install make up for all the time lost with the new overhead for your RAM disk?
Just a few more thoughts.... (and still laughing: HA, a SWAP file in a RAM disk!!!)
seriously now, think about this...
by putting your swapfile on a ram disk, your read/write and access times are blazingly fast (as fast as writing to ram, duh). much faster than you would ever get with swapping to a physical disk. what he said makes a great deal of sense (if you can somehow pull it off, and you have the ram to do this with).
and overhead with a ram disk? again, it's there, but non-existent compared to a physical disk.
additionaly, you can have both NT & 2000 wipe swap when you shutdown/reboot.
by putting your swapfile on a ram disk, your read/write and access times are blazingly fast (as fast as writing to ram, duh). much faster than you would ever get with swapping to a physical disk. what he said makes a great deal of sense (if you can somehow pull it off, and you have the ram to do this with).
and overhead with a ram disk? again, it's there, but non-existent compared to a physical disk.
additionaly, you can have both NT & 2000 wipe swap when you shutdown/reboot.
I might be totally off on this but here goes..
Suppose you have a gig of ram. Im not sure how the os uses the swap file or whatever but if the os makes use of the swap file and I am only using... say 20 megs of my gig of ram then it might be benificial to have a swap file on a ram disk. Because ram is faster. But if the os only makes use of the swap file after all of my gig of ram is used up and it needs the swap file then making a ram disk would just basically make less ram available to the os. Make sense?
Suppose you have a gig of ram. Im not sure how the os uses the swap file or whatever but if the os makes use of the swap file and I am only using... say 20 megs of my gig of ram then it might be benificial to have a swap file on a ram disk. Because ram is faster. But if the os only makes use of the swap file after all of my gig of ram is used up and it needs the swap file then making a ram disk would just basically make less ram available to the os. Make sense?
Unbelievable! People still don't understand that the SWAP file is used when you run out of available RAM.... (WHY REDUCE YOUR AVAILABLE RAM BY MAKING PART OF IT A SWAP FILE?!?!?!)
Use that thing on top of your neck for more than growing hair!!!! THINK, for crying out loud.
If that doesn't kill this lame, underthought-out idea, I don't know what will.
And using a RAM disk for a TEMP dir!?!?!
Augh, just give me your computer, go buy some playing cards so that you can play your solitaire when the power goes out - and they work even when the power is ON!!!!
Representing computer engineers everywhere (or maybe just myself.)
Use that thing on top of your neck for more than growing hair!!!! THINK, for crying out loud.
If that doesn't kill this lame, underthought-out idea, I don't know what will.
And using a RAM disk for a TEMP dir!?!?!
Augh, just give me your computer, go buy some playing cards so that you can play your solitaire when the power goes out - and they work even when the power is ON!!!!
Representing computer engineers everywhere (or maybe just myself.)
Damn dude I think your going to have a heart attack. Anyway thats exactly what I just said. Reread my post and I confirmed exactly what you said. I just didnt know how the os used the swap file, but since you have made it so clear now I will go with the second part of my post.
Gee whiz ByronT, I think this is the first time I've seen you upset... 
Look all, good and simple. Get as much ram as you can afford. Multiply by 2.5.... be done with it. Hard drive space is cheap, so using too much aint gonna hurt so bad.
BTW, I've noticed my Win2k server buzzes along using 192mb of memory pretty consistantly. My Win2k Pro uses anywhere from 55-65mb of memory. Thought i'd throw these out just to show the basic memory requirements for each. Make sure you have more RAM installed than your system is using when just idling along....

Look all, good and simple. Get as much ram as you can afford. Multiply by 2.5.... be done with it. Hard drive space is cheap, so using too much aint gonna hurt so bad.
BTW, I've noticed my Win2k server buzzes along using 192mb of memory pretty consistantly. My Win2k Pro uses anywhere from 55-65mb of memory. Thought i'd throw these out just to show the basic memory requirements for each. Make sure you have more RAM installed than your system is using when just idling along....