PDA

View Full Version : Swap file question



stu140103
16-01-2004, 11:41 AM
Hello every one

I have noticed a lot around here about people saying about there Swap file. ( I guess the other reason why more people are saying about it is that more people have a NT based OS e.g. win XP)

As I never had a NT based OS on my computer before (that will not be like that for long ;)) I have only had 9X OS on mime e.g. win 95, 98(I think)/98SE, ME

And I am guessing Swap file are to do with NT based OS?????

What I what to know is why do people stuff around with it??? (As I guess you could stuff it up badly.) (I would guess to improve how well their computer works) And what is wrong with letting windows do it is job as it meant to.

Sorry about the stupid question, but I just donít get why people would what play around with it & possible cause more problems then it could be worth it.

Noel Nosivad
16-01-2004, 12:14 PM
Hi stu140103,

Swap File, Paging File, Hard Disk Cache, Virtual Memory and probably a lot more names referred to this. It's not only NT based, but also is found on Win9x/ME.

The Swap File is RAM on your Hard Drive basically, it's to store memory pages from Physical RAM (your actual memory sticks) to the Virtual RAM (hard drive) when that information is not required.

e.g. You have a word document opened an an excel document opened but you decide to work on the excel document, since Word has been loaded in Physical Memory but you are not using it, Windows decides to put it on the Hard Drive so Excel can use the speedy Physical RAM, when you switch back to Word, Windows takes the page stored in the Virtual RAM and places it back in the memory, and Windows may decide to store the Excel information in the swap file.

Whatever you are working on at the time, is using Physical RAM, you can't use Virtual RAM to work off, it can only be a place to store information for the Physical RAM to resume back to.

Windows Method is an underestimate use of how big your swapfile should be, a lot of fragmented files is created by the swap file due to windows increases the size of this to account for what is needed.

The best method is to try and eliminate this swapping process and Windows increasing sizes automatically, reason being your Physical RAM is considerably faster than your Hard Drive's speed and everytime it is swapping slows your hard drive down as well as using up storage space, and soon things may seem to crawl because of fragmentation caused by the swapfile.

To eliminate swap file you need enough RAM suitable for all the things you do, 512GB is minimal for no swap file but to really eliminate the use about 256MB more on top of it. I currently have 1GB and when I've done a lot of work, it shows around half my RAM is used up.


Noel Nosivad

stu140103
16-01-2004, 01:09 PM
Hello Noel Nosivad

Thank you for your reply to this post :)

Greg S
16-01-2004, 03:01 PM
One thing I'd like to know is:

On my XP Pro system, I've chosen to have a fixed swapfile. I've set the min/max to the same size (1GB). Should I have the min at 0 or some other amount? I'm not short of disk space or RAM

Chilling_Silently
16-01-2004, 03:15 PM
Greg>
I wouldnt bother, many people reakon it increases performance if its just the one size.

Its not to say that its using the entire 1GB, but rather that the file size 1GB. Chances are its using around 150MB.

Hit Ctrl + Shift + Esc and click on the Performance tab and it should tell you how much its using :-)

Some people with ample RAM (512MB +) like to set it to 5MB max/min, forcing it (apparently) to use more RAM.

Hope this helps


Chill.

Greg S
16-01-2004, 03:18 PM
Thx Chilly. I did notice that it's using less since I made it a static size. But no noticeable performance increase. (was about 250 megs to now about 150 megs when machine is idle).

kiwibeat
16-01-2004, 06:48 PM
mine is set to 600 megs min {on my 2nd HDD } and max in 98Se with 512 megs of sd133 ram I hardly ever use it all though except when playing warcraft 3

JohnD
16-01-2004, 08:06 PM
In fact a swap file is not just a MS Windows phenomenon - Linux has one too but tends to be a swap partition.

I like to think of it's function as overflow. When there is not enough internal memory in the CPU, data overflows to L1 cache and onwards as below:

Internal CPU registers -> L1 cache -> L2 cache -> Main RAM -> Swap file on hard disk.

As you go to the right, speed decreases but capacity increases. Some systems have a level 3 cache as well.