I have heard of the technique of moving the swap file to a drive other than the one the OS is installed on as a way of speeding up the system. I think the idea is that if the OS and swap file need to be accessed at the same time, they don’t have to wait for their turn (so to speak)
Does this technique work for windows 7? Did it ever actually ‘work’ at all or was it just an old-wives-tale? (or old IT know-it-all’s tale)
If it did/does work - why does the OS not make some attempt to do it or suggest it be done?
Yes, its helpful. It’s even more helpful if the machine has two separate disk controllers.
All of which are found pretty much only on server scale hardware, not end-user machines.
If you are setting up a server machine with multiple drives and/or controllers, you’ll probably be installing Server 2008, not Win7. And if you’re doing that, you probably know what you’re doing and don’t need or want prompting from the installer UI.
One last point: If you have multiple drive letters on a single physical spindle, moving the swap file to another drive letter will produce no performance benefit but will cause additional complexity and perhaps in some extreme corner cases some slight performance degradation.
Sure, it works. Another less busy fast disk will always be a better place for a swap file. Of course, RAM being so crazy cheap its just smarter to max your RAM out and disable the swap file altogether if its performance you’re interested in.
I used put the cache on a different partition than the OS on the earlier Win OS so it wouldn’t fragment the drive really badly and slow down data access in that way. On that equipment it helped.
One way having the cache on a different drive with Win7 would be faster is the cache drive is a faster drive than the drive your OS is installed on. I found a new drive I bought accessed at about 30% faster than the OS drive. I used that drive as the cache drive until I could get another drive like it and transfer my OS in a couple weeks. The slower drive is now a backup drive.
Unix-based operating systems (including Linux, and probably also Mac OS X) usually devote an entire partition to swap space; this arrangement is probably more efficient than using a file on an existing partition, though it has the drawback that the size of the swap space can’t be easily increased or decreased. The rule of thumb is (or was) that you should allocate about twice the amount of physical memory you have to the swap partition. You’re free to put the swap partition on whatever physical drive you want—it can be the same one that the OS uses, or a different one.
This was true in older systems. These days, disk drives have enough of a cache built into them that you may not see much of a performance improvement. A lot depends on your exact system, how often you are hitting the swap file, how well the disk cache is designed, etc.
Adding more RAM so that you don’t hit the swap so much is a lot more effective than adding another disk. If you don’t have to swap at all, disk delays become irrelevant.
Amen. I love how much faster my computer is since I bought RAM here. Choosing a different swap disk didn’t matter at all.
BTW, you can keep your swap on a separate partition in Windows, too. It just has to be formatted NTFS, and the swap will be a little smaller since it’s in a file. I can’t remember why I did that, but it seemed like a good idea at the time.
I would do this if your boot drive is an SSD. These have limited writes per cell and the page file tends to see a lot of activity on systems with less ram. I’ve already gone through one SSD this way but it was an older model. Now they all have wear leveling algorithms so you can probably get away with it but I still put my page file on a hard drive.
I have 8gb of Ram, but Windows still creates a swap file. Currently it is also 8gb.
I once heard that, ironically, windows matches the size of ram with the swap file. This seems counter-intuitive. Surely the more RAM you have the smaller the swap file needs to be.
On a separate note. I already have (two) extra hard disks (so, three in total) so it would be free, versus buying more RAM which wouldn’t.
With that much ram, depending on what you use it for, you may want to consider making the swap file a lot smaller. It does seem like Windows pays attention to the amount of swap it has and will split stuff between memory and the hard drive even though there’s enough space. At least, I noticed it on my old Sempron running Windows XP.
You can even try removing it altogether–but I’m wary of that unless you just never use up all your RAM. Swap space gives you a little bit of leeway so that programs don’t just automatically shut down from out of memory errors. When things start going slow, you know you need to close some applications.
Still, I have been told that no swap or a really small swap is a lot faster. And it doesn’t hurt to try.
Windows always allocates a pagefile to match your memory. I have 16gig running win 7 x64 and it allocated a 16gig page file.
Modifying the page file size is pretty simple but requires a reboot. There are plenty of guides on the net that show you how to do it.
I would never set the page file to zero even if you only run a couple of apps at a time. Due to memory leaks and other problems you can run out of RAM regardless of how much you have to start with.
If you don’t have much ram and your system is slow due to memory paging, consider getting a fast thumb drive to use with the Windows ReadyBoost feature. This will be a lot faster than HDD access speeds and should make things more tolerable.
Of course increasing system ram is the best solution though.
If I remember my Comp Sci lectures correctly, your page file should be on the most-used partition of the least-used disk. Beyond that, Windows likes to have a 2 MB page file on the boot drive for debugging and crash recovery.
It’s not a server, it’s my home PC. I have three physical drives (all on one controller). Weirdly I think my comp does have two controllers. I’ll do some investigating.
Yesterday I moved the swapfile to my newest and likely least used drive - 2gb barracuda. Windows lets you have multiple swap files on multiple drives. Which one would it use?
I’ll give dzero’s suggestion of readyboost a try. I’ve always known about the feature but for some reason never really thought to try it. I have an 8gb lacie I never seem to use for anything.
It uses all of them. Internally it’s treated as one big swap store the size of the sum of each individual physical disk file. Windows makes some effort to spread the work across all the files, but that can be stymied pretty easily depending on the RAM usage patterns of the running apps.
Could that mean a potential performance boost if I have a swap file on all three drives?
In general I forgot to mention: After I moved my swapfile to another drive I ran the windows performance test thingy - my windows aero and graphics performance points increased by 0.1 but everything else remained the same. Having said that I am sure that’s a coincidence, and I would not be surprised if windows’ performance benchmark thingy is not very reliable.
One other option I have (if I’m willing to do this with two equally sized drives that are NOT identical in other ways) is to create a raid-0 array for the os. But this is a big job - far beyond what my current laziness will allow. I don’t actually need any performance boosting - I’m just trying to squeeze some extra life out of three year old kit.
oh and thanks for the advice so far guys.
Not a good idea. If one drive fails, you’ve lost the lot. You’ll get a performance boost from RAID 1 - mirroring - as Windows reads the OS drive a lot more. If you indeed have two controllers and they are identical you could try duplexing the OS drive.
My drive isn’t raided at all so I’m still in the same boat as it were - If I lose the drive I lose the data. So raid-0ing it won’t put me in a worse position than I’m in now. And I keep all important stuff on other drives and duplicated across drives anyway, so losing stuff isn’t the end of the world.
I think one of my two controllers is for external sata drives (there are ports on the back of the case).
ETA: When I say not identical in reference to the drives - I have two 500gb drives with roughly identical specs (read/write/access speeds) but one is a seagate and the other is a western digital drive.
Also, if I choose to mirror two of the drives - I instantly lose 500gb of space right? I’d rather run the risk of data loss for the benefit of space and speed.