SQL SERVER 2008 - Memory Leak while storing Millions of records

后端 未结 3 525
天命终不由人
天命终不由人 2020-12-22 09:06

I need some help very badly. I\'m working on a project where a bulk of data is entered all the time. It\'s a reporting software.

10 Million records in an average is

相关标签:
3条回答
  • 2020-12-22 09:28

    SQL Server typically uses as much memory as it can get it's hands on, as it then stores the more frequently accessed data in memory to be more efficient, as disk access is slower then memory access.

    So nothing is wrong with it using 5gb of memory.
    To be honest, it's leaving 3gb of memory for other applications and the operating system, so there might not be anything wrong with this. (If this is all that server is designed to do.).

    To configure the memory limit, do the following:

    • In SQL Server Enterprise manager, right click on the server name, and go to properties.
    • Click on the Memory option
    • Reduce the maximum server memory to what you think is appropriate.
    • Click ok.
    0 讨论(0)
  • 2020-12-22 09:32

    SQL Server uses memory efficiently and takes as much as it can. It's also usually clever enough to release memory when needed.

    Using 5GB means:

    • SQL Server is configured to 5GB or SQL Server has simply reserved this memory during normal usage
    • It's left 3GB because it doesn't need to use it

    Nothing is wrong... and I'd probably configure the SQL Server max mem to 6.5GB...

    Late addition: Jonathan Kehayias blog entry

    0 讨论(0)
  • 2020-12-22 09:33

    I highly doubt that this is in fact a memory leak. The increase of SQL Server's memory usage is by design, simply because it caches a lot of stuff (queries, procedures). What you will most likely see is that if the available memory that is still left runs low, SQL server will 'flush' its memory, and you would see in fact that memory will be freed in the end.

    0 讨论(0)
提交回复
热议问题