Search code examples
jmeterperformance-testing

Issues when gathering SSH listener data/Jmeter delay to gather listener data


I have a performance test in Jmeter. I have some SSH listeners that should retrieve CPU and RAM usage. I want to get a clear explanation about the delay used by Jmeter to gather the listeners value while the test is running. Is it possible to set that delay value by the user ?, if yes what is the minimum value that Jmeter supports. The current data gathering by listener is a bit random I think which isn't good at all. Currently I don't have the similar number of entries in results although in both listeners I have the same number of commands. I tried to set the value of jmeter.sshmon.interval in jmeter.properties to 100 and 3000 ms but that didn't help. The measurement I did gave the following: Remark 1: * CPU CSV usage file has 1211 entries * RAM CSV usage file has 1201 entries * Number of used threads CSV file has 1276 entries Although in my test plan the three listeners have exactly the same of number of SSH commands (15) and they are set on same level in test plan. Remark 2: The duration to execute each set of SSH commands to retrieve values of CPU usage is variable. I used timestamp difference to measure it and it is not the same duration with remarkable difference. Remark 3: When I compare the duration to execute set of SSH commands to retrieve CPU usage and RAM usage I see big difference duration. I found this link: https://github.com/tilln/jmeter-sshmon by the plug-in owner but that didn't resolve my issue. Thanks


Solution

  • As per the link you provided:

    Samples are collected by a single thread, so if a command takes more than an insignificant amount of time to run, the frequency of sample collection will be limited. Even more so if more than one command is sampled. In this case, use a separate monitor for each sample command.

    So basically after each sampler JMeter has to execute 45 SSH commands and according to the above explanation some results might be discarded.

    So I would suggest the following workarounds:

    1. Use separate Thread Group with a single Sampler which does nothing and has fixed execution time, i.e. Dummy Sampler. In this case you can control the interval by adding a Constant Timer and define the desired monitoring poll interval

    2. Go for JMeter PerfMon Plugin which doesn't require establishing connection and executing the command, only plain metrics (numbers) are being passed via TCP or UDP channels. The approach from point 1 is still highly recommended.