Multiple Drives and SSDs: Where to place swap file

1000

Limp Gawd
Joined
Oct 2, 2005
Messages
426
Hi there all.

I have added some drives to my machine recently. I have:

1. Boot/Windows7 drive: OCZ Vertex 3 SSD 120gb
2. Games drive: OCZ Vertex 2 SSD 120gb
3. Storage/Misc drive: Seagate 1TB 7200RPM

I have windows on the first SSD and all my games (MMOs etc) on the second SSD. The 1TB seagate is just used for storage.

Where should I put my swap file ? I have heard mixed things; that you shouldn't use an SSD as a swap drive, that you can if it's not the same drive as the windows drive etc.

I am looking for optimal performance.. where should I park it ?

Cheers
 
I am looking for optimal performance.. where should I park it ?

I would rule the hard disk out of the competition. It certainly will not give you good performance. For the SSDs you will probably want it on the OS partition because that will have the most free space.

that you shouldn't use an SSD as a swap drive

I would say this mainly the users who made the mistake and purchased a 64GB SSD or those who have way more ram then they will ever need.
 
MS themselves said an SSD is the absolute best place for the swap file, and it makes sense.

http://blogs.msdn.com/b/e7/archive/2009/05/05/support-and-q-a-for-solid-state-drives-and.aspx

Should the pagefile be placed on SSDs?

Yes. Most pagefile operations are small random reads or larger sequential writes, both of which are types of operations that SSDs handle well.

In looking at telemetry data from thousands of traces and focusing on pagefile reads and writes, we find that

•Pagefile.sys reads outnumber pagefile.sys writes by about 40 to 1,
•Pagefile.sys read sizes are typically quite small, with 67% less than or equal to 4 KB, and 88% less than 16 KB.
•Pagefile.sys writes are relatively large, with 62% greater than or equal to 128 KB and 45% being exactly 1 MB in size.

In fact, given typical pagefile reference patterns and the favorable performance characteristics SSDs have on those patterns, there are few files better than the pagefile to place on an SSD.
 
Yeah, best advice is just leave it alone. You can shrink the size of it if you have a lot of RAM though (so make a fixed 2 GB page file instead of the automatically sized one), otherwise it'll take up a lot of space.
 
do you need swap? Why not disable it? Unless you use hibernation I guess.
 
do you need swap? Why not disable it? Unless you use hibernation I guess.

Hibernation does not rely on swap (it uses its own file to store the contents of RAM). Some programs do rely on an active page file (usually if they're poorly coded or for some stupid reason to keep them from breaking). It's also a good idea to leave it enabled for memory dumps in case of a BSOD, even if set at the minimum allowable size.

Now for the hibernation file I would turn that off if you're using an SSD. No point in using it or hybrid sleep if you have a fast drive and live somewhere that has stable power.
 
Tell Windows to put the swap file on the second SSD... this way Windows won't be staggering pagefile read/writes while it's accessing Windows files, Applications, and anything else that would be on your primary OS drive.

Really with both drives being SSD you probably won't notice any difference, but you might as well set things up for the best performance possible.

DO NOT DISABLE YOUR PAGEFILE. I can't say that enough. Even if you have 16 or 32GB RAM you should never disable your pagefile. It's just how Windows was designed to work... and like was said above some programs just plain shit themselves. If you insist on not letting Windows manage the size of the pagefile and you have 16GB or more of memory, then just set it to the smallest size possible and leave it alone.

Also on disabling hibernation and the creation of the hibernation file (hiberfile.sys) - just disabling sleep/hibernation in the Windows GUI won't do it. To completely disable creation of the file open up an elevated command prompt and enter the following command:

powercfg -h off

You won't get any response, but this in fact completely disables hibernation in Windows 7 (and 2008, and Vista.... ugh).

The reasons for disabling hibernate on SSDs are purely for space reasons - like the pagefile any 'wear issues' are totally bogus. The reason you should disable hibernate is it will save you disk space and with startup times as fast as they are with an SSD, there isn't really any reason to use it.
 
Last edited:
I've been using computers without a pagefile for years, ever since Intel first released their SSDs. Never had a problem. If you're using memory-intensive graphics applications (video or 22 mb RAW files) you'll want a decent sized pagefile, but I'd put it on the platter drive and if you notice it actually being used install more RAM. A pagefile is no substitute for having enough RAM.
 
I cringe every time I see a computer hobbyist/enthusiast recommend disabling the Window page file. There's a reason why you'll never see an IT professional disable the pagefile of their servers in an enterprise production environment. Its not because they don't know how.

As a previous person said in this thread... There are applications which are hardcoded to use the windows swap files for dealing with large files. While this tweak would work for a part-time gaming PC, it would be a horrible idea for a 24/7 server or critical/professional workstation dealing with audio files, video encoding, picture editing, etc.
 
I crank it down to 2048mb and leave it on the SSD generally. The workstations I build for work usually have 16GB and lately 32gb, and it hasn't been a problem for any of our developers.
 
It really depends on the type of work they do. The swap file seems to be used mostly in creativity type apps such as image editing/audio/video programs copying and pasting large amounts of data (larger than available physical RAM). My older PC at home is maxed out at 8GBs or RAM. It's not that hard for my machine to dip into virtual memory when I have a lot of large applications open. I have a fixed 12288-12288MB swap file on a separate "temp" partition of my SSD. If I had a lot more RAM, I would feel comfortable at reducing my pagefile down to 2GBs or so... same as you.

I crank it down to 2048mb and leave it on the SSD generally. The workstations I build for work usually have 16GB and lately 32gb, and it hasn't been a problem for any of our developers.
 
As a previous person said in this thread... There are applications which are hardcoded to use the windows swap files for dealing with large files.
That is just a myth. You cannot hardcode your application to do that.
 
with how cheap ram is, I just turn swap off on linux. If I had to have it I'd put it on a spinner.
 
Back
Top