pmouawad opened a new pull request #602:
URL: https://github.com/apache/jmeter/pull/602


   Hello Team,
   
   As reported in PR 601, we have noticed a major contention in JMeter that 
becomes a major problem at high scale.
   The issue is related to the PrintWriter in ResultCollector.
   In tests with high throughput (> 100 req/s), the lock taken by 
PrintWriter#println() will lead many threads to block waiting for the lock to 
be released (even with the underlying buffering).
   
   Following review done by JMeter team (Thanks Felix and Vladimir), we noticed 
important performance enhancement and more stable results using 
ArrayBlockingQueue on different computers (compared to using LMAX-Disruptor). 
   The tests done with JCTools were not conclusive on our side. 
   
   The problem with RB and JCTools is always in our tests when the storage 
becomes full.
   Results with ArrayBlockingQueue show more stability.
   
   We notice an increase by 69% of the throughput of this:
   
   `
   jmeter -n -t test_bug_64558.jmx -Jjmeter.save.queue.size=524288 
-Jthreads=2000 -Jduration=120 -Jrampup=10 -Jsummariser.name= -l 
results_buffer_256k_q524288.csv
   `
   
   vs this one JMeter 5.3:
   
   `
   jmeter -n -t test_bug_64558.jmx -Jthreads=2000 -Jduration=120 -Jrampup=10 
-Jsummariser.name= -l results.csv
   `
   
   Please note it is critical to disable the Summariser during the test as it 
degrades throughput (we'll provide a future patch for this), using:
   
       -Jsummariser.name=
   
[test_bug_64558.jmx.txt](https://github.com/apache/jmeter/files/4840938/test_bug_64558.jmx.txt)
   
   
   Implementation does the following:
   
   - Introduce a configurable buffer for output CSV/XML file  
(property:jmeter.save.saveservice.buffer) => This alone improves slightly 
performance
   - Cache properties that are highly requested : Thread Group name, isSuccess, 
IsError , filename
   - Introduce an ArrayBlockingQueue and make Sampler use it when saving 
SampleEvent and a thread that will read the queue and write
   
   Contributed by UbikLoadPack Team:
   
       Florent
       Benoit
       Philippe
   
   Website: https://ubikloadpack.com
   Twitter: @ubikloadpack
   
   Files:
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to