Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SqlMemory: Allow setting of dynamic value for min server memory. #1397

Closed
johnmart82 opened this issue Jul 15, 2019 · 4 comments · Fixed by #1695
Closed

SqlMemory: Allow setting of dynamic value for min server memory. #1397

johnmart82 opened this issue Jul 15, 2019 · 4 comments · Fixed by #1695
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub

Comments

@johnmart82
Copy link

Details of the scenario you tried and the problem that is occurring

Setting a discrete value for min server memory rather than dynamically calculating it adds overhead when managing generic configurations that are applied to many servers. I have a baseline configuration that goes out with all servers. Currently I leave Min Server Memoryh to the default rathe than set a value in the configuration.

Verbose logs showing the problem

N/A

Suggested solution to the issue

Allow for a dynamic calcualtion of min server memory based on a specific percentage of the max server memory value (discrete or dynamically calculated).

If I have a server with 128 GB of RAM and have a max server memory value of 105GB, I then want to say that I want a min server memory value that is 35% of the max server memory value so it should be calculated and set to ~36GB.

The DSC configuration that is used to reproduce the issue (as detailed as possible)

N/A

SQL Server edition and version the target node is running

SQL 2016 & 2017

SQL Server PowerShell modules present on the target node

N/A

The operating system the target node is running

Windows server 2016 & 2019

Version and build of PowerShell the target node is running

5.1

Version of the DSC module that was used ('dev' if using current dev branch)

13.0.0.0

@johlju johlju added enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub help wanted The issue is up for grabs for anyone in the community. labels Jul 16, 2019
@johlju johlju changed the title SqlServerMemory: Allow setting of dynamic value for min server memory. SqlMemory: Allow setting of dynamic value for min server memory. Jul 10, 2020
@SQLCanuck
Copy link

It would also be useful to add the ability to use a percentage based allocation of total server memory, for the max server memory setting as well. It would be useful in situations where multiple services (RS, AS, DB) or multiple instances are running on the same server.

@TrisBits
Copy link
Contributor

@johlju I can take a look into this issue, as a first time contributor.

@johlju
Copy link
Member

johlju commented Feb 21, 2021

Absolutely, go for it. Happy to review a PR for this, tag me when you are done. 😃

TrisBits added a commit to TrisBits/SqlServerDsc that referenced this issue Feb 28, 2021
TrisBits added a commit to TrisBits/SqlServerDsc that referenced this issue Mar 6, 2021
TrisBits added a commit to TrisBits/SqlServerDsc that referenced this issue Mar 6, 2021
@TrisBits
Copy link
Contributor

TrisBits commented Mar 6, 2021

@johlju PR submitted. I expanded a little beyond the primary issue to include the comment by @SQLCanuck. The PR therefore includes the ability to dynamically set min memory and/or max memory based on a specified percentage of total server memory.

@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Apr 17, 2021
johlju pushed a commit that referenced this issue Apr 17, 2021
…#1695)

- SqlMemory
  - Added two new optional parameters MinMemoryPercent and MaxMemoryPercent.
    Provides the ability to set the minimum and/or maximum buffer pool used by
    the SQL Server instance as a percentage of total server memory (issue #1397).
@johlju johlju removed the in progress The issue is being actively worked on by someone. label Apr 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement The issue is an enhancement request. good first issue The issue should be easier to fix and can be taken up by a beginner to learn to contribute on GitHub
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants