PDA

View Full Version : Swapfile!



Axle Gear
11-18-2003, 06:49 PM
I got 3 drives, and swapfile on all 3. But their speeds vary heavily:

Is there a way to control which swapfiles Windows uses first? I heard windows uses the biggest minimum first, but I wanna know.

I MUST know! FOR ULTIMATE POWAH!

Oc2theSkY
11-19-2003, 07:33 AM
Why don't you just put one swap file on one drive. You don't need more than that and it would solve your problem. Also the two drives that don't have the swap file may seem faster since the swap data is on another hdd. Give it a try and see.

Axle Gear
11-19-2003, 08:36 AM
Actually, no. By cramming windows, data, and the swapfile all on one drive, it forces that drive to do a ton of work, severely crippling the speed.
Putting the swapfile on it's own disk will improve speed significantly. Example:
You have two disks that read at 50 MBps. The swapfile requires 10 MBps, and windows requires 30 MBps. That leaves you with 10 MBps for games and files if you put it all on one disk: Very little. Making the system slow.
Now, put windows on one, and the swapfile on the other, and you have 20 MBps on one, and 40 MBps. Much more speed.
This is just a numeric example.
You also must keep some swapfile on the main windows drive/partition, else it can cause problems with windows not booting should an error occur. It's a common occurance, and just isn't wise. At least 32 MB should be left there.

You can further speed up the system by splitting the swapfile between them. Which is what i'm trying to do. For it to work best, though, I need to see how windows allocates swapfile to see which drives it will access first. This way, I can make it access the faster drives for swapfile first, leaving the slower to be used last.

The optimal configuration for a desktop is 2-3 drives, but there are configurations that can help out any combination od drives. With one:
Drive 1: Three partitions: Swapfile (small, 128-512 MB), Windows (5-10 GB), and then Data.
This method gives swapfile the front of the drive, which is the fastest. Windows gets the second fastest, and the less speed intensive data gets the rest.
Also, since each is on it's own partition, if Windows §§§§s up, you can format it without losing your data and programs on the third partition, thus providing some data security. It's saved my ass countless times.

With two drives:
Drive1: One partition, Windows (and small ~32 MB swapfile) and some data.
Drive2: Two partitions, Swapfile (128-512 MB), and Data

This way, windows gets it's own drive, so it can load quickly without competing for access with the swapfile and data. While the second drive stores the swapfile and data.

The penultimate setup for a desktop is 3 drives:
Drive1: Windows, and small swapfile (~32 MB) and perhaps some data.
Drive2: One/Two partitions, Data, and perhaps a small swapfile (32-256 MB)
Drive3: Two partitions, Data, and Swapfile (64-256 MB)

This way, the swapfile is split up, letting 3 drives provide their power, giving three times faster yield. Windows is seperate, providing data security. Data is seperate from swapfile partitions, so there is never too little space for swapfile expansion when it becomes necessary.

Also, when setting swapfile, to prevent swapfile fragmentation, one should make sure that the drives used first have the same minimum and maximum settings. This way the swapfile's size never changes, and thus never fragments. This can greatly improve speed, and even reliability.
With them on seperate partitions, however, you can set it to whatever you want, and because nothing else ever goes on that partition, it will not become fragmented because another file gets in the way of it's expansion path.



So there. Hopefully now you see the values of intelligent swapfile and partition management. =3
I managed to get my Yatta to move rather fast like this by splitting it's 3 drives up this way. Now that i'm upgrading my PC, i'm gonna try to do the same for it.

ScissorClaw
12-04-2003, 05:47 PM
What do you do with your computer that has 1GB of memory and still requires that you have such a massive need for swapfiles on all three drives? I realize you must have a swapfile for windows to work properly, but I think think you might be into overkill here. Do you actually have two drives with a total of three partitions? Or do you have three seperate drives?

Axle Gear
12-04-2003, 06:02 PM
Well, when you share over 10 GB and nearly 10,000 files on WinMX, it can consume an awful lot of swapfile (about 100-400 MB, depending on how long it's been running)

I usually run a /lot/ of programs at once. A virus scanner, firewall, WinMX, Trillian, a couple of robots, outlook express, just tons of stuff at once, plus the thing i'm using at the moment.

Plus, most newer games use a ton of swapfile. I've logged Morrowind consuming as much as 780 MB alone.