What steps would you do to be sure that STANDARD edition with its 128GB RAM limit is enough for your production?
My subjective feeling is that we are somehow on the edge and I am looking for strong arguments to do the right decision to the future.
We are now running EVALUATION edition (so in fact ENTERPRISE). That gave me the space for testing the influence of having RAM limit (Max Server Memory) set to 128 GB and more (in fact set to 169 GB). Let's call the states before (Max Server Memory = 128 GB) and after (Max Server Memory = 169 GB). While testing I was collecting wait stats and several Memory based counters.
In general, wait statistics didn't change much while monitoring before and after the RAM increase. Not even in buffer latch and memory category of wait types.
Memory counters provides more interesting values but are they strong enough indicators of lack of memory?
Memory Grant Pending: value stays = 0 before and after
Total & Target server memory: keeps close to each other before and after – no spikes
System memory state:
before – it's mostly in "Physical memory state us steady" state
after – it goes to "Available physical memory is hight" state, not suprisingly
Page life expectancy: varies much over time (before and after)
before: sometime goes under 300 but in average it is more
after: sometimes goes under 300 (but less time)
Batch Reguests/sec & SQL Compilations / sec: the ratio between those two counters didn't change (before / after) – so there seems to be enought space for plans in the buffer, unfortunately the ratio is still higher than 10%.
Best Answer
Memory Utilization
I would also run the following statement to see how SQL Server memory is being used:
At some point when you keep on increasing memory, the
sql_memory_utilization_percentage
column will start moving away from 100%. This is because SQL Server may not require more memory.SQL Server Edition Features
Depending on your SQL Server Edition there are some features that are available or not. Two being the Read-Ahead and Advanced Scanning capabilities which are described in the article Reading Pages (Microsoft | SQL Docs).
SQL Server 2016 Scalability and Performamnce
SQL Server 2017 Scalability and Performamnce
SQL Server 2019 Scalability and Performamnce
Read Ahead
Correction Apparently the Read Ahead feature is available in all editions of SQL Server. I found the article When are read ahead reads issued (Microsoft Social MSDN - Paul White) which answers this question. However, there can still be internal limitations depending on the edition that would affect the amount of read-aheads performed in the Standard Edition.
Advanced Scanning
(Taken from the linked Microsoft article Reading Pages)
Because you are testing on "Enterprise Edition" you may be observing a performance boost just because of these additional features.
Please ensure you are comparing Apples (Standard) with Apples (Standard) and not Apples (Standard) with Pears (Enterprise).
Rare Cases & Trace Flags
In some rare cases having too much memory can be counter-productive. This situation is described in the Knowledge Base article regarding the Trace Flag 2335.
Answering Your Question