Test Stress Distributed Cache
By monitoring NCache performance under stress in a given environment, heavy transactional load on a specific cache can be generated.
NCache provides a PowerShell cmdlet Test-Stress
that generates heavy transactional load on a specific cache. This allows the user to monitor NCache performance under stress in a given environment.
To get acquainted with how to monitor NCache performance counters, refer to Windows PerfMon.
Test-Stress [-Server] [-CacheName] [-DataSize] [-GetsPerIteration] [-ItemsCount] [-NoLogo] [-ReportingInterval] [-SlidingExpiration] [-TestCaseIterationDelay] [-TestCaseIterations] [-ThreadCount] [-UpdatesPerIteration]
The parameters that Test-Stress
takes along with their descriptions are explained below.
Examples
- The following example executes
Test-Stress
on demoClusteredCache with default settings.
Test-Stress -CacheName demoClusteredCache
- This command executes Test-stress on cache named demoClusteredCache on Server 20.200.20.38 with default settings.
Test-Stress -CacheName demoClusteredCache -Server 20.200.20.38
- The following example executes
Test-Stress
on demoClusteredCache by adding cache items of the size 2 KB while the rest of the settings are kept as default.
Test-Stress -CacheName demoClusteredCache -DataSize 2048
- This example runs
Test-Stress
on demoClusteredCache and sets the reporting interval equals 2000, thread count equals 3 (thread count should not exceed 3), gets per iteration equals 3, iterations within a test case equals 18, sliding expiration interval equals 10 seconds and updates performed per iterations equals 2; while keeping the rest of the settings as default.
Test-Stress demoClusteredCache -ReportingInterval 2000 -ThreadCount 3 -GetsPerIteration 3 -TestcaseIterations 18 -SlidingExpiration 10 –UpdatesPerIteration 2
Note: The parameters with an asterisk (*) with their names are the required parameters and the rest are optional.
Parameters | Data Types | Description | Default Value |
---|---|---|---|
-CacheName* |
<String> |
Specifies the name of the cache. | - |
-Server |
<String> |
Specifies one or more ip-address(es) for one or more cache-server(s). This option can be used to customize the list of ip-address(es) to be displayed. Note: Comma separated ip-addresses are to be specified in case of multiple servers inside double quotes. | - |
-ItemsCount |
<Integer> |
Specifies the total number of items you want to add. | Infinite |
-TestCaseIterations |
<Integer> |
Specifies the total number of iterations within a test-case. | 20 |
-TestCaseIterationDelay |
<Integer> |
Specifies the delay (in seconds) which can be held in between each iteration. | 0 (Zero) |
-GetsPerIteration |
<Integer> |
Specifies the number of ‘gets’ within one iteration of a test-case. | 1 |
-UpdatesPerIteration |
<Integer> |
Specifies the number of updates performed within a single iteration of a test-case. | 1 |
-DataSize |
<Integer> |
Specifies the size of each cache item in bytes. | 1024 |
-SlidingExpiration |
<Integer> |
Specifies the time interval for Sliding Expiration in seconds. Its minimum value is 15 seconds. | 300 |
-ThreadCount |
<Integer> |
Specifies the total number of Client threads. Its maximum value is 3. | 1 |
-ReportingInterval |
<Integer> |
Specifies the interval after which the cache count gets displayed. | 5000 |
-NoLogo |
<SwitchParameter> |
Suppresses display of the logo banner. | False |
See Also
Set up PowerShell Environment
Start-Cache
Get-NCacheVersion
TroubleShooting