• Facebook
  • Twitter
  • Youtube
  • LinedIn
  • RSS
  • Docs
  • Comparisons
  • Blogs
  • Download
  • Contact Us
Download
Show / Hide Table of Contents

Test-Stress

The Test-Stress PowerShell cmdlet is an essential utility for simulating high-transactional workloads to evaluate cache performance and cluster stability. By mimicking real-world user behaviors—such as ASP.NET session state management or JSP session handling—this tool allows administrators to validate horizontal scalability and latency benchmarks before production deployment. Users should monitor real-time metrics in the NCache Management Center Statistics or Windows PerfMon while the stress test is active.

Note

This feature is also available in the NCache Open Source edition, please keep in mind that NCache Open Source 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

  • This command executes Test-stress on a Cache named demoCache with default settings.
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), Get operations 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"
  • This command executes Test-stress on a Cache named demoCache with default settings, using security credentials.
Test-Stress -CacheName demoCache -Credentials(Get-Credential john_smith)

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.
Note: The cache must already exist on the source server.
-
-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.
IP of local machine
-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 Distributed Caches or Distributed Caches with persistence enabled. 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. False
-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 Distributed Caches with Persistence enabled, 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

  • This command executes Test-stress on a Cache named demoCache with default settings.
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), Get operations 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"
  • This command executes Test-stress on a Cache named demoCache with default settings, using security credentials.
test-stress -cachename demoCache -userid john_smith -password pass123

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.
Note: The cache must already exist on the source server.
-
-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.
IP of local machine
-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 Distributed Caches or Distributed Caches with persistence enabled. 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 Distributed Caches with Persistence enabled, 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. -

Contact Us

PHONE

+1 214-619-2601   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • 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 - . All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top