JMeter CPS Calculator

Free Tool

Compute the number of connections per second required for protocol-level tests (TCP, MQTT, etc.) using JMeter, ensuring proper configuration for high-concurrency scenarios.

JMeter

Network bandwidth value which needs to be achieved.

* Required fields. Results update automatically as you type.

Results

Enter your values to see the result.


What is the JMeter CPS Calculator?

The JMeter CPS Calculator converts a target network bandwidth into the CPS value JMeter needs. JMeter uses CPS to throttle how much data each connection sends and receives, through the httpclient.socket.http.cps and httpclient.socket.https.cps properties. This lets you simulate users on slower networks such as 3G, 4G or a limited broadband link instead of the fast network your load generators sit on.

How it works

You enter the network speed to simulate in kilobits per second. The calculator converts it to bits (× 1024), then to bytes (÷ 8), and rounds up. The result is the number of characters (bytes) per second JMeter should allow on each connection. Set it in user.properties and restart JMeter; every HTTP/HTTPS sampler is then throttled to that rate.

Formula to calculate CPS

CPS = ⌈(Target Bandwidth (kbps) × 1024) ÷ 8⌉

Where:

  • Target Bandwidth (kbps)Network speed to simulate, in kilobits per second.
  • 1024Converts kilobits to bits.
  • 8Converts bits to bytes (8 bits = 1 byte).
  • ⌈ ⌉Round up to the nearest whole number.

Example of CPS calculation

You want to simulate users on a 512 kbps connection.

Inputs

  • Target Bandwidth = 512 kbps

Step-by-step

  1. 512 × 1024 = 524,288 bits per second
  2. 524,288 ÷ 8 = 65,536

Result: Set CPS = 65536, e.g. httpclient.socket.http.cps=65536 and httpclient.socket.https.cps=65536 in user.properties.

Common mistakes to avoid

  • Confusing kilobits (kbps) with kilobytes (KBps) — this calculator expects kbps.

  • Applying the CPS value per thread instead of as the aggregate target across the whole thread group.

  • Not accounting for protocol overhead (handshakes, headers) on top of the raw payload bandwidth.


Need advanced performance testing?

Run this scenario at real scale with Baseline11's distributed load testing platform.

Explore Baseline11