dsccommunity / dsccommunity/SharePointDsc
SPDistributedCacheService: Add support for backgroundGC
@ChristophHannappel is already working on this.
Since Mar 9, 2022.
- Dominant language
- C#
- Stars
- 246
- Forks
- 106
- PR merge metrics
- No merged PRs in 30d
Description
Resource proposal
The Article Installing Windows Server AppFabric updates SharePoint 2013 Servers recommends enabling the backgroundGC for the DistributedCacheService.exe via the DistributedCacheService.exe.config file.
Details Cumulative update package 3 for Microsoft AppFabric 1.1 for Windows Server.
SharePoint Subscription Edition enables this by default. All previous versions need to enable it manually.
Since the SPDistributedCacheService has to run on every Node it would be a good fit, to add this to the ressource.
I can create a pull request, if this is the right ressource
Proposed properties
| Property | Type qualifier | Data type | Description | Default value | Allowed values |
|---|---|---|---|---|---|
| backgroundGC | write | boolean | Should the DistributedCacheService use the nonblocking garbage collection (background server garbage collection) | None | $true, $false |
Special considerations or limitations
Code Example
[system.reflection.assembly]::LoadWithPartialName("System.Configuration") | Out-Null
# intentionally leave off the trailing ".config" as OpenExeConfiguration will auto-append that
$configFilePath = "$env:ProgramFiles\AppFabric 1.1 for Windows Server\DistributedCacheService.exe"
$appFabricConfig = [System.Configuration.ConfigurationManager]::OpenExeConfiguration($configFilePath)
# if backgroundGC setting does not exist add it, else check if value is "false" and change to "true"
if($appFabricConfig.AppSettings.Settings.AllKeys -notcontains "backgroundGC")
{
$appFabricConfig.AppSettings.Settings.Add("backgroundGC", "true")
}
elseif ($appFabricConfig.AppSettings.Settings["backgroundGC"].Value -eq "false")
{
$appFabricConfig.AppSettings.Settings["backgroundGC"].Value = "true"
}
# save changes to config file
$appFabricConfig.Save()
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.