Skip to main content
Planview Customer Success Center

How to limit the RAM used by App Fabric server? v2012

Please explain how to limit the memory used by App Fabric server, and what are the use of the 3 parameters that are found in AppFabric configuration files:

size="10239"
maxBufferPoolSize="2147483647"
maxBufferSize="2147483647"


Size
Cache size (MB)(total space allocated for storing data on the cache host)
Assigned at installation time. Reconfigure this setting with the CacheSize parameter of the Set-CacheHostConfig command. View this setting with the Get-CacheHostConfig command.

maxBufferPoolSize - Configured on both AppFabric client (web.config, global.asa) and AppFabric server(ClusterConfig.xml)
Maximum buffer pool size (bytes)
DataCacheTransportProperties.MaxBufferPoolSize
Gets or sets the maximum buffer pool size used by the WCF buffer manager.

maxBufferSize - Configured on both AppFabric client (web.config, global.asa) and AppFabric server(ClusterConfig.xml)
Maximum buffer size (bytes)
DataCacheTransportProperties.MaxBufferSize
Gets or sets the maximum buffer size.

Microsoft's supported mechanism to implement change to a AppFabric server is via powershell scripts. According to the information provided in the following links, Set-CacheHostConfig command can be used for specifing the cache size.

http://msdn.microsoft.com/en-us/libr...azure.10).aspx
http://blog.milrr.com/2012/05/code-h...ache-size.html

It is not recommended to change the default setting to use more than 50% of the memory on the server (the default host cache size is 50% of memory).

Additional notes:
A sample script to be run on the host, in order to limit the memory to 10GB:

$provider = "XML"
$host_name = $env:COMPUTERNAME
$share_location = "\\" + $host_name + "\cacheConfig"
$cache_size = 10000

Use-CacheCluster -Provider $provider -ConnectionString $share_location

Set-CacheHostConfig -HostName $host_name -CachePort 22233 -CacheSize $cache_size