This is a quick script that I've slapped together to show 1) maximum allocated memory for the Distributed cache. 2) current usage for all AppFabric caches on the current server.
So, before bumping the Distributed cache, test the current consumption with the script below.
###### DETERMINE IF YOU HAVE ENOUGH MEMORY ALLOCATED TO DISTRIBUTED CACHE: Add-PSSnapin Microsoft.SharePoint.Powershell Use-CacheCluster $hostname = hostname $configuration = Get-AFCacheHostConfiguration -ComputerName $hostname -CachePort "22233" Write-host Maximum Size: $($configuration.size)MB HostName: $($configuration.HostName) -ForegroundColor Blue # Get-AFCache | % {Get-AFCacheConfiguration -CacheName $_.CacheName} $caches = Get-AFCache | % {Get-AFCacheConfiguration -CacheName $_.CacheName} foreach($cache in $caches){ $stats = Get-AFCacheStatistics $cache.CacheName Write-host $cache.CacheName -ForegroundColor Green Cache. Write-host Usage: $($stats.Size / 1MB) MB Write-host } ###### DETERMINE IF YOU HAVE ENOUGH MEMORY ALLOCATED TO DISTRIBUTED CACHE END
Here is the sample result:
No comments:
Post a Comment