• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
Show / Hide Table of Contents

Test-Stress - Monitor Cache Performance

This PowerShell Cmdlet simulates heavy transactional load on a specified cache, to monitor cache performance under stress in a given environment. Please monitor cache performance counters in NCache Management Center Statistics or regular PerfMon. A test case represents a user session with multiple get and update operations on the same cache key, simulating behaviors like ASP.NET or JSP sessions. Each iteration consists of one or more gets and updates, followed by a TestCaseIterationDelay(e.g., 15–30 seconds) to mimic user interactions. When all TestCaseIterations are completed, the session becomes idle and expires.

Important

NCache OSS has different parameters in some Cmdlet instances.

  • Windows PowerShell
  • Linux CLI
Test-Stress [-CacheName] [-Server] [-DataSize] [-GetsPerIteration] [-ItemsCount] [-ReportingInterval] [-SlidingExpiration] [-TestCaseIterationDelay] [-TestCaseIterations] [-ThreadCount] [-UpdatesPerIteration] [-Credentials] [-NoLogo]

Behavior for Different In-Memory Store Types

The execution of the Test-Stress cmdlet varies with your InMemoryStoreType.

  • Distributed Cache: Normal cache data will be inserted and fetched from the cache.

  • Distributed Cache with Persistence: Data will be inserted and fetched from the persistence store.

  • Pub/Sub Messaging Cache: Topics, Publishers, and Subscribers will be created. Message data will also be generated.

Examples of Test-Stress - Monitor Cache Performance

  • This command executes Test-stress on a Cache named demoCache with default settings to monitor cache performance.
Test-Stress -CacheName demoCache
  • This command executes Test-stress on cache named demoCache on Server 20.200.20.11 with default settings.
Test-Stress -CacheName demoCache -Server 20.200.20.11
  • This command executes Test-Stress on demoCache and then sets the size of each cache item as 2KB keeping the rest of the settings as default.
Test-Stress -CacheName demoCache -DataSize 2048
  • This command executes Test-Stress on demoCache and sets the,Reporting interval as 2000, the thread count as 3 (which is the maximum value for thread count), Gets to be performed per iteration as 3, iterations within a test-case as 18, interval for sliding expiration as 10 seconds and number of updates performed per iteration as 2; keeping the rest of the settings as default.
Test-Stress -CacheName demoCache -ReportingInterval 2000 -ThreadCount 3 -GetsPerIteration 3 -TestcaseIterations 18 -SlidingExpiration 10 –UpdatesPerIteration 2
  • This command executes Test-Stress on demoCache and will add items of size 2KB. This command ignores deployment details specified in client.ncconf.
Test-Stress -CacheName demoCache -DataSize 2048 -Server "20.200.20.11,20.200.20.10"

Properties

Note

The parameters with asterisk (*) on 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.
-
-DataSize <Integer> Specifies the size of each cache item in bytes. 1024
-GetsPerIteration <Integer> Specifies the number of ‘gets’ within one iteration of a test-case. This is only used in case of DistributedCache or DistributedCacheWthpersistence store type. 1
-ItemsCount <Integer> Specifies how many total items, docs or messages you want to add. Infinite for all store types.
-NoLogo <SwitchParameter> Suppresses display of the logo banner.
-ReportingInterval <Integer> Specifies the interval after which the item count gets displayed. 5000 for DistributedCache, 50000 for PubSubMessaging cache store types.
-SlidingExpiration <Integer> Specifies in seconds sliding expiration or each item or message. 300 for DistributedCacheWithPersistence, and 60 for DistributedCache and PubSubMessaging store types.
-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
-ThreadCount <Integer> Specifies the total number of Client threads. Its maximum value is 3. 1
-UpdatesPerIteration <Integer> Specifies the number of updates performed within a single iteration of a test-case. This is only used in case of DistributedCache. 1
-Credentials <pscredential> Specifies the user credentials required to authorize access for the specified operation. These credentials should belong to a user with the appropriate permissions at the node. -
test-stress [-cachename] [-server] [-dataSize] [-getsperiteration] [-itemscount] [-reportinginterval] [-slidingexpiration] [-testcaseiterationdelay] [-testcaseiterations] [-threadcount] [-updatesperiteration] [-userid] [-password] [-nologo]

Behavior for Different In-Memory Store Types

The execution of the test-stress cmdlet varies with your inmemorystoretype.

  • Distributed Cache: Normal cache data will be inserted and fetched from the cache.

  • Distributed Cache with Persistence: Data will be inserted and fetched from the persistence store.

  • Pub/Sub Messaging Cache: Topics, Publishers, and Subscribers will be created. Message data will also be generated.

Examples of Test-Stress

  • This command executes Test-stress on a Cache named demoCache with default settings to monitor cache performance.
test-stress -cachename demoCache
  • This command executes Test-stress on cache named demoCache on Server 20.200.20.11 with default settings.
test-stress -cachename demoCache -server 20.200.20.11
  • This command executes Test-Stress on demoCache and then sets the size of each cache item as 2KB keeping the rest of the settings as default.
test-stress -cachename demoCache -datasize 2048
  • This command executes Test-Stress on demoCache and sets the,Reporting interval as 2000, the thread count as 3 (which is the maximum value for thread count), Gets to be performed per iteration as 3, iterations within a test-case as 18, interval for sliding expiration as 10 seconds and number of updates performed per iteration as 2; keeping the rest of the settings as default.
test-stress -cachename demoCache -reportinginterval 2000 -threadcount 3 -getsperiteration 3 -testcaseiterations 18 -slidingexpiration 10 –updatesperiteration 2
  • This command executes Test-Stress on demoCache and will add items of size 2KB. This command ignores deployment details specified in client.ncconf.
test-stress -cachename demoCache -datasize 2048 -server "20.200.20.11,20.200.20.10"

Properties

Note

The parameters with asterisk (*) on 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.
-
-datasize <Integer> Specifies the size of each cache item in bytes. 1024
-getsperiteration <Integer> Specifies the number of ‘gets’ within one iteration of a test-case. This is only used in case of DistributedCache or DistributedCacheWthpersistence store type. 1
-itemscount <Integer> Specifies how many total items, docs or messages you want to add. Infinite for all store types.
-nologo <SwitchParameter> Suppresses display of the logo banner.
-reportinginterval <Integer> Specifies the interval after which the item count gets displayed. 5000 for DistributedCache, 50000 for PubSubMessaging cache store types.
-slidingexpiration <Integer> Specifies in seconds sliding expiration or each item or message. 300 for DistributedCacheWithPersistence, and 60 for DistributedCache and PubSubMessaging store types.
-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
-threadcount <Integer> Specifies the total number of Client threads. Its maximum value is 3. 1
-updatesperiteration <Integer> Specifies the number of updates performed within a single iteration of a test-case. This is only used in case of DistributedCache. 1
-userid <String> Specifies the user id used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This user id must be the active directory user id. -
-password <String> Specifies the password of the user that is used to authorize the user for this operation. It is required in case security is enabled on Cache Server. This password must be the same as the active directory user password. -
In This Article
  • Behavior for Different In-Memory Store Types
  • Examples of Test-Stress - Monitor Cache Performance
  • Properties
  • Behavior for Different In-Memory Store Types
  • Examples of Test-Stress
  • Properties

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top