Search code examples
jmeterblazemetertaurus

Auto tune jvm in taurus container


You can set a jvm memory settings and Taurus but does it support Dynamic tuning at all? Is there a setting to tune the jvm relative to the number of CPUs and memory available on the system? It would be nice not to have to script this myself.

Especially if I'm running the Taurus container and I want it to be portable.


Solution

    1. You can get the amount of free RAM (in gigabytes) like:

      grep MemTotal /proc/meminfo | awk '{print $2}' | xargs -I {} echo "scale=4; {}/1024^2" | bc
      
    2. You can set JMeter JVM memory limit in Taurus config file like:

      modules:
        jmeter:
          memory-xmx: 4G
      
    3. You can combine points 1 and 2 via Taurus Dockerfile to write the aforementioned lines somewhere to /etc/bzt.d/ folder where default Taurus configuration lives.

    See How to Execute a Load Test Using the Taurus Docker Image guide for more information