Should you disable the page file with SSD?
But assuming you have more than enough RAM, I think page file should be disabled on SSD to extend the life time. I know you would lose the core dump on crash, but not many people need that information
This sounds rather like premature optimisation. You haven't discussed which SSDs you plan on using, and without actually looking at your server workload and your planned SSD datasheet, you cannot have any idea about what effect a page file will have on the lifespan of your SSD.
There is also a large volume of misinformation, both on the greater Internet and here on Server Fault, about SSDs suffering from poor lifespans. Early model SSDs may well have had issues, and USB flash drives definitely start to degrade, but enterprise-class SSDs have much better wear leveling algorithms and some make use of spare flash to improve performance and wear.
Intel X25-E drives, for example, claim a write duration of 1 petabyte of random writes for the 32 GB drive. If you're saturating the write interface (200 MB/sec) nonstop, with overwrite, my estimate is that will last you about 58 days. But that's writing something like 17 TB of data per day to that drive.
Typical server workload on the OS drive is going to be far, far less, even if you have a page file. Call it 50 GB per day. If the 1 PB figure is accurate (and I know it may be considered an average figure, more discussion later), that's still somewhere north of 50 years.
Those figures seem preposterously high, of course, so let's look at actual figures cited by Intel for expected longevity of drives. Intel were happy to qualify the MLC (non-enterprise) drives to write 100 GB of data, every day, for five years. Standard understanding of SLC vs. MLC flash says that SLC flash lasts about 10x longer than MLC (the above link shows this on a graph as well).
The truth will be borne out by time, of course - we'll either start seeing drives fail early or we won't. But the numbers behind the drives add up to drive longevity not being a problem with decent quality SSDs at all.
If you're using an MLC SSD, then you're perhaps right to be worried. But bear in mind that if Intel is happy to rate the drive at 100 GB/day for five years, that's still fundamentally the same as 50 GB/day for 10 years. And, back to my original point, you still need to know what kind of actual workload you're going to do on the drive.
Personally, I'd strongly say not to use an MLC SSD in a production server environment. If a decent SLC SSD is too expensive, stick to spinning disks for now.
(As an aside, if you do the numbers on, say 100 GB per day for 50 years, which is the "SLC lasts 10x longer than MLC" rating, it looks like Intel is saying their 32 GB drive actually has a total write lifetime of closer to 2 PB of data, not the 1 PB cited on the product specification. Even if I only trust the smaller of those two values to be happy that my X25-E drives should last well north of 10 years.)
In addition to the longevity probably not being an issue, as Daniel Lawson mentions, and feedback from the MS team itself (below), consider
- The pagefile will only be used when necessary anyway
- If the pagefile is being used, having it on the SSD vs a spinning hard drive will make an enormous difference
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.
Support and Q&A for Solid-State Drives (MSDN)
Rather than disable the pagefile altogether, it may be useful to tell the OS not to use it (for instance, sysctl vm.swappiness=0
).
The OS will avoid using it unless necessary, saving the SSD unnecessary writes.