2

I'm running out of space on one of my servers and the only space that I can free in the immediate is re-sizing the enormous pagefile. The server has 128GB of memory and is currnetly set to "automatically manage" the pagefile, with a recommended size of 196599 MB. That seems ridiculously high to me.

It's a 2008 R2 Enterprise server running as a SQL Server 2008 R2 server and according to perfmon it looks like the page file utilization is between 2% and 3%.

Should I be worried about any negative repercussions of dropping the max down to like 20GB ro so?

1
  • FYI... set the initial size to 1GB and a max of 20GB 4 days ago based on all of your comments. Since then the page file has maintained a size of 1GB with apparently no reason to auto-grow. Thank you all for your help.
    – Nick Nau
    May 29, 2012 at 18:21

4 Answers 4

4

You really shouldn't need a pagefile more than 4-6GB except in certain circumstances.

The only major drawback to having a pagefile smaller than your system memory is that in the event of a BSOD, you won't get a full crash dump. I'd test your system with 6GB, 8GB and 10GB pagefiles and see how performance is. If it's not a machine that swaps a lot, you might find that 6GB is fine assuming you have sane MaxMem settings in SQL Server.

2
  • And you won't want to have your SQL Server down waiting for it to write a 128 GB memory dump. And analyzing a 128 GB memory will take a long time and even more space and memory.
    – ercpe
    May 25, 2012 at 8:38
  • Good point Johann
    – Nick Nau
    May 29, 2012 at 18:17
3

It would depend on how much RAM you have and what applications you're running.

If you're only running SQL Server and nothing else, then yes, it's safe crank the Page File down, or even off (though I wouldn't recommend off).

If you're running other applications, take a look at their memory requirements and set the page file to a few gigs more than what they use/need. Check the page file usage periodically to ensure you're at an appropriate usage and page hit/miss ratio.

1
  • Only thing running on this box is SQL Server. It collects prod server tran logs during the day and commits them at midnight.
    – Nick Nau
    May 24, 2012 at 18:52
1

That should be just fine.

You only need as much swap / pagefile space as could be used. If you use 128GB of it, something is probably wrong. I'd go ahead and kick that down to 20GB without hesitation. See also Server refuses to use swap partition

Now, keep this in mind: filesystems start to have degraded performance above 80% utilization. Depending on whether you have your system and data on the same partition, you may do very well to get a larger disk and separate them soon.

It's a "back in the day" artifact when the recipe was "make your swap twice your RAM". That was something meaningful in the days of 8MB systems. The "rule" hasn't fully gone away yet, and a lot of folks find that when they're trying to figure out how much swap to partition.

If you actually did use that much swap, you system would probably be slowing to a crawl.

0

Page space recommendations have gotten silly in the market place we're in today, with servers that have masses of real memory. Worst case if you drop the size of the page file is the server will one day run out of memory and crash. When it does that, you can increase the page size again, until then, I would say it's pretty safe to reduce it.

Why not half it, and monitor it over a long period to see what % utilisation you get, and if it's still safe, half it again, etc.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .