3

Possible Duplicate:
SQL Server 2008 R2 “Ghost Memory”?

Context:

  • Windows Server 2008 R2;
  • 32GB RAM;
  • Application: SQL Server 2008 R2, several Connectors to Write Data into SQL Server(Write Frequency: 0.5HZ);
  • The Server has not been restart for more than half a year;
  • About 15G Data per month;
  • Support Several Applications hosted on other Server(Web Applicaion, Socket Application);

Edit:

  • Problem(From the Task Manager): In the Performance Tab, The Memory Display and the Physical Memory Usage History Chart both show that the memory usage is approaching 100%(96%); While in the Process Tab, in which the Memory(Private Working Set) Column is shown by default, and the Memory(Private Working Set) Usage of sqlservr.exe is realtively small(200-300M), the total Memory(Private Working Set) usage of all the Processes added up is normal as well(less than 10%).

  • Maybe the problem is that I just check the Memory(Private Working Set) Column, but I don't have access to the Server right now

3 Answers3

2

is there some kind of memory-leak problems here?

No, the problem is more someone who does not know how SQL Server works.

SQL Server uses as much memory as feasible as cache for the database. Why not use it? So, what happens basically is that SQ LServer has a lot of data in memory in case it needs it, to avoid accessing the disc.

If you need more free memory, set a memory limit in SQL Server properties.

If oot - be happy, your memroy is used.

TomTom
  • 4,636
  • 1
  • 19
  • 20
1

The real problem here is Task Manager - it is a dirty, filthy liar.

Chances are you have Lock Pages in Memory granted within SQL Server. Task Manager has no idea about this, so it shows you a smaller amount of memory usage. You probably have not set a max memory setting for SQL server, either.

You can use Glenn Berry's diagnostic queries to better determine what is using up your memory within SQL Server.

SQLRockstar
  • 6,355
  • 27
  • 48
0

Any decent OS will use all free memory for disk cache. It can take some time to fill up 32 GB but eventually it will. It is much better to look at swap space usage. As long as it is using only a little swap everything is fine (somethings will cause swap usage even if there is enough memory).

If you would increase the memory usage of sqlserver you probably will see that the total memory usage will still be around 96% as the OS will shrink it's cache to free memory for sqlserver.

Also beside the private working set there is also shared memory for things like binaries shared by multiple processes. So the private working set is not all that is used.

Eelke
  • 1,008
  • 8
  • 15