I have a simple JMeter test plan that has a single HTTP sampler that posts a 2MB JSON payload. We have configured the test to achieve 50 transactions per second with 50 to 75 threads backed up by ultimate thread group and throughput shaping timer. JMeter is running with 8GB heap configuration and G1GC algorithm on a Mac with Oracle JDK/jre.
Structure
Ultimate Thread Group Throughput shaping timer HTTP Sampler with 2MB - JSON file in the body field JSON Assertion HTTP header manager
Options that were tested 1. 10 Threads / 10 TPS - still memory consumption is from 3GB to 8GB 2. Used __StringFromFile to read the payload from a file and then using it both as a variable using ${} and also as a property with $__P. The memory overhead remains the same in both the options 3. OS process sampler configured to use CURL which was better and consumed only 500 MB with 10 threads. But I want to know if there is a better option to achieve this within the hTTP sampler itself. i.e., achieve more throughput per JVM with an 8GB Configuration.

