Jump to content
Compatible Support Forums
Sign in to follow this  
skrause

HOW BIG SHOULD THE SWAP FILE BE ??

Recommended Posts

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 ??

Share this post


Link to post

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...

Share this post


Link to post

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).]

Share this post


Link to post

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.

Share this post


Link to post

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.

Share this post


Link to post

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...

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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 ..

Share this post


Link to post

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.

Share this post


Link to post

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 smile

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.

Share this post


Link to post

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!!!)

Share this post


Link to post

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.

Share this post


Link to post

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?

Share this post


Link to post

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.)

Share this post


Link to post

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.

Share this post


Link to 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....

Share this post


Link to post

I was wondering... Have you guys ever heard of solid state ram?? and whats with this overhead?? Putting a swap file on a ram drive has almost no overhead... And if you have an ungodly amount of ram... why not use a ram drive... Most of these systems we are talking about anyway are for games, Not CAD, Not VB, NOT DB and Not Servers.

I have been using a ramdrive with a swap file.. and my hard drive "thrashing" was cut to nill. SO callin this guy a yuppy for being different is not called for.. LOL.. Its guys who think outside the Box that actualy get stuff to run.

 

**this is not a slam.

Share this post


Link to post

Amazing. People STILL don't get it. There seems to be some sort of fundamental lack of understanding as to what a swap file actually does!

 

A machine will work BETTER with NO swap file than with a swap file in RAM.

 

Of course putting a swap file on a RAM disk will reduce thrashing. Turning off the swap file will do the same.

 

The whole point about the swap file is to increase the total amount of memory to the OS...how will taking some away be a benefit?

 

Solid State RAM - like there's any other kind?

 

What you actually mean are Solid State Disks - a sh1t load of RAM that presents itself to the OS as a disk drive. These are used generally in mainframes and other legacy I/O intensive environments to speed throughput - mainly because the actual hardware has limits on the addressable memory space.

 

I seriously hope you don't regard yourself as an IT professional - this kind of "thinking outside the box" looks more like "thinking outside the rubber room" and gives us all a bad name...

 

 

[This message has been edited by YuppieScum (edited 04 February 2000).]

Share this post


Link to post

JimmyK your funny d00d,,,

hehe , people buy these hi-end systems cause either salesmen tell them they need it and they don't know the difference,, or they are like you and me when we first bought our computers long ago (didn't you always want something fast or maybe the best ****,, of course you did)

people always want bigger and or better

its the way of life d00d,, anyways i've had a good chuckle reading you d00ds reply's ,, and remember don't be so hostile,, this is what these boards are for ,, ,how can anyone learn if they keep getting hassled,,,

,, best way to learn ,, is ask!

bigb otherwise known as byron

hehe and p.s no hostile intention intendid to any of you just an observation,,, peace! :P

Share this post


Link to post

That's it. That's all I can take.

 

For those of you who STILL think that placing your swap file in RAM is a good idea: On behalf of computer professionals everywhere, I politely submit that you need to give your computer away, and take a vow of computer silence. In return for removing yourself from the computer using world, we computer professionals will make sure that you always have bicycle playing cards so that you can play solitaire without having to worry about so called problems as "disk-thrashing", or even worrying about losing track of your game when the power goes out. We will even supply you with a UPS for your solitaire (two candles and a lighter.)

 

Now that was a joke and was not intended to offend. Just as the thought of using a RAM disk for a SWAP file must be a joke.

 

Regards...

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×