5

This may be related to other threads I've seen, but I need a solution to this specific situation. The SQL instance continuously consumes more and more RAM until after about a week it's grabbed over 3.5 GB of RAM (remember it's a 32-bit instance, and no I can't use a 64-bit instance) and the functionality of the instance basically comes to a grinding halt, forcing a server reboot to get it freed up. There must be a more elegant method of recovering the RAM, or configuration change to prevent it in the first place. I'm obviously not an expert in SQL Server and the instance was basically a "default" installation so it certainly isn't optimized.

BenMorel
  • 4,507
  • 10
  • 57
  • 85
scubabeme
  • 51
  • 1

1 Answers1

5

This configuration setting should be a good start:

enter image description here

Edit: Also, keep in mind that limiting the amount of RAM that SQL is allowed to use will save memory for other applications, other instances, and the OS itself... but by limiting the amount of RAM SQL is allowed to use, you may just hit the performance wall more quickly. SQL will start paging data out to disk when it runs out of RAM, regardless of if you are putting a hard limit on the amount of RAM SQL is allowed to use or not. If you want performance, you want to avoid having to use the computer's disks. This means adding more RAM, using 64-bit instances so they can take advantage of the extra RAM, and having more efficient indices and queries. You already said you can't do the first two - the next thing would be to find a DBA to try to optimize your data and queries so that they don't use as much memory.

Ryan Ries
  • 55,481
  • 10
  • 142
  • 199
  • 1
    Microsoft SQL Server attempts to cache as much of your databases in memory as it can. RAM is orders of magnitude faster than disk. SQL Server comes out of the box set to use all available RAM, as Ryan showed. The guidance is to run nothing but SQL Server on a machine intended for SQL Server use. Left to its own devices, over time SQL Server can grow as large as the sum of all your databases and then some. This is by design. – Larry Silverman Feb 26 '13 at 21:03