Understanding JMeter Distributed Modes and Optimization Strategies
This article explains how JMeter implements its various distributed testing modes, examines the SampleSender interface and its overloads for standard, batch, and asynchronous modes, and presents optimization techniques that reduce network overhead and improve overall load‑testing performance.
In the previous article we observed that different JMeter distributed modes can produce vastly different performance results for the same test scenario. This article explains how JMeter implements those modes and shares optimization ideas.
All distributed modes implement the SampleSender interface; the sampleOccurred method processes each sample during test execution. The article focuses on how each mode overloads this method.
1. Standard mode : The sender forwards each sample directly to the appropriate listener without any additional processing, relying on listeners for result aggregation.
2. Batch mode : Samples are stored in a clonedStore and sent only when either a time‑based or count‑based threshold is reached, greatly reducing the number of transmissions from server to controller.
3. Asynchronous mode : Results are queued and a dedicated worker thread periodically sends batches; the queue size threshold ( queue.size ) determines when a batch is dispatched.
4. Optimization (referred to as “大白的优化”) : To minimize bottlenecks, both the controller and server are tuned. In batch mode the server aggregates samples and computes performance metrics before sending; only the aggregated sampleResultStore (which contains statistics, not raw samples) is transmitted, reducing both network traffic and controller processing frequency.
These changes lower transmission frequency and controller load, allowing the system to maintain optimal pressure during large‑scale load tests.
360 Quality & Efficiency
360 Quality & Efficiency focuses on seamlessly integrating quality and efficiency in R&D, sharing 360’s internal best practices with industry peers to foster collaboration among Chinese enterprises and drive greater efficiency value.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.