• 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 cmdlet 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. Please keep in mind that NCache Open Source has different parameters in some cmdlet instances.

Test-Stress -CacheName [-Server] `
            [-LoadBalancerEnabled] [-DataSize] `
            [-GetsPerIteration] [-ItemsCount] `
            [-ReportingInterval] [-SlidingExpiration] `
            [-TestCaseIterationDelay] [-TestCaseIterations] `
            [-ThreadCount] [-UpdatesPerIteration] `
            [-TlsCertPath] [-TlsCertPassword] `
            [-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.

  • 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 defaultCache with default settings.
Test-Stress -CacheName defaultCache
  • This command executes Test-Stress on defaultCache and then sets the size of each cache item as 2KB keeping the rest of the settings as default.
Test-Stress -CacheName defaultCache -DataSize 2048
  • This command executes the Test-Stress on the defaultCache and adds items of size 2 KB through the specified load-balanced server, 20.200.20.11.
Test-Stress -CacheName defaultCache -DataSize 2048 -LoadBalancerEnabled -Server 20.200.20.11
  • This command executes Test-Stress on defaultCache and will add items of size 2KB.
Test-Stress -CacheName defaultCache -DataSize 2048 -Server "20.200.20.11,20.200.20.10"
  • This command executes Test-Stress on defaultCache 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 defaultCache -ReportingInterval 2000 `
            -ThreadCount 3 -GetsPerIteration 3 `
            -TestcaseIterations 18 -TestCaseIterationDelay 0 `
            -SlidingExpiration 10 -UpdatesPerIteration 2
  • This command executes the Test-Stress on the demoCache and adds items of size 2 KB using the specified DNS, David Watson.
Test-Stress -CacheName demoCache -DataSize 2048 -Server David-Watson
  • This command executes the Test-Stress on the defaultCache and adds items of size 2 KB through the specified load-balanced server, 20.200.20.11.
Test-Stress -CacheName defaultCache -DataSize 2048 -LoadBalancerEnabled -Server 20.200.20.11
  • This command runs a stress test on defaultCache using items of size 2 KB and the specified servers with mutual TLS (mTLS) enabled. It runs from a machine where NCache is not installed and uses C:\certs\client.pem to authenticate the machine running the cmdlet. The -TlsCertPassword parameter decrypts the certificate’s password-protected private key. Omit this parameter if the private key is not encrypted.
Test-Stress -CacheName defaultCache -DataSize 2048 `
            -Server "20.200.20.11,20.200.20.12" -TlsCertPath "C:\certs\client.pem" `
            -TlsCertPassword "clientKeyPassword"
  • This command executes Test-Stress on a Cache named defaultCache with default settings, using security credentials.
Test-Stress -CacheName defaultCache -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 a server name where the NCache Service is running and a cache with the specified cache-name is registered.
NOTE:: Comma-separated IP addresses are to be specified in case of multiple servers inside double quotes.
-
-LoadBalancerEnabled <SwitchParameter> Specifies whether to use a load balancer when connecting to the cache. False
-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 Cache. 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 for each item or message. 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
-TlsCertPath <string> Path to the client PEM certificate used to authenticate the machine running the NCache PowerShell cmdlet when connecting to an NCache server with mutual TLS (mTLS) enabled. The PEM file must contain the private key, leaf certificate, and any intermediate certificates. You can generate a certificate using New-NCacheTlsCertificate. This parameter is required when running the PowerShell module from a machine where NCache is not installed and the server requires mTLS. On a machine with an NCache server installation, the node's own certificate is used automatically. Relative paths are resolved against the current PowerShell location, and the file must exist. To configure the certificate presented by the server, use -CustomCertificatePath. False
-TlsCertPassword <string> Password used to load the encrypted private key in the PEM file specified by -TlsCertPath. Required only when the private key is password-protected. Not needed for an unencrypted private key. The password is used only to load the client certificate for the current command's connections. It is not saved in the NCache server configuration. False
-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. -

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