I am running a stability test (60hrs) in Jmeter. I have several graphs in the test plan to capture system resources like cpu, threads, heap.
The size of View_Results_Tree.xml file is 9GB after 24hrs. I am afraid if jmeter will sustain for 60hrs.
Is there size limit for View_Results_Tree.xml or results folder size in Jmeter?
What are the best practices to be followed in Jmeter before running such long tests? I am looking for recommended config/properties for such long tests.
Thanks
Veera.
There is no results file limit as long as it fits into your hard drive for storing or in your RAM to open and analyze.
The general recommendations are:
Use CSV format instead of XML
Store only those metrics which you need to store, saving unnecessary stuff causes massive memory and disk IO overheads.
If you look into jmeter.properties file (located in JMeter's "bin" folder) for properties which names start with jmeter.save.saveservice i.e.
#jmeter.save.saveservice.output_format=csv
#jmeter.save.saveservice.assertion_results_failure_message=true
#etc.
Copy them all to user.properties file, set "interesting" properties to true and others to false - that will allow to save a lot of disk space and release valuable resources for the load testing itself.
See 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure for more detailed explanation of the above recommendations and few more JMeter performance tuning tweaks.
There are not limits on file size in JMeter, the limit is your your disk space.
From the file name, I guess you chose XML output, it is better to choose CSV output (see below another reason for that).
Besides, ensure you're not using GUI for load testing in JMeter which is a bad practice, this will certainly break your test if you do it.
Switch to Non GUI mode and ensure you follow those recommendations.
/bin/jmeter -t -n -l /results.csv
Since JMeter 3.0, you can even generate report at end of load test of from an existing CSV (JTL, not from XML format) file, see:
http://jmeter.apache.org/usermanual/generating-dashboard.html
As you need GUI for monitoring, run Jmeter in GUI mode only for the monitoring part.
I agree with the answer provided by UBIK LOAD PACK. But in case if you need to have the results stored somewhere you don't need to worry about the size of the file. The best solution is using Grafana and Graphite (InfluxDB) for realtime reports and efficient storage.
Related
Apache Jmeter has the -l option for logging the results. However, it creates a single file. If the test is run for quite some time, this log file becomes huge and it takes time to process this file. Is there a way where we can rotate the log file based on file size?
As of current JMeter version 5.2.1 it is not possible, the options are in:
Use i.e. split program to break up large .jtl file into smaller pieces. More information:
How to Split Large Text File into Smaller Files in Linux
Don't use .jtl results file and switch to Backend Listener so the results would go to external database and you can interactively choose smaller chunks, perform filtering, etc. More information:
Real-time results
How to Use Grafana to Monitor JMeter Non-GUI Results
I am working on load testing Video streaming, I have observed that when we execute Jmeter to download any video files it gets downloaded in the Heap memory and many times it does not releases the heap memory, this causes JVM out of memory issues.
I have also observed that when we select option “Save as MD5 Hash option”, proper GC cycle kicks in and Jmeter does through JVM out of memory error.
Could you please help me in knowing:
How does Jmeter handles the object?
When does it releases the object? and
When Save as MD5 option is selected what difference it makes during execution and releasing the option?
The difference is that if you tick Save as MD5 JMeter stores only MD5 hash of the response which is a relatively short string while in the opposite case JMeter stores the whole response in memory so the options are in:
Use MD5 hashes in combination with MD5Hex Assertion if you need to check content integrity
Go for distributed testing, by default JMeter remote engines do not store response data so it will be discarded (
Increase JVM Heap space allocated to JMeter so the responses will fit
Manually discard response data using JSR223 Listener and code like
prev.setResponseData('dummy','UTF-8')
I try to remove result files from a listener but it won't work. It seems JMeter lock the result files in runtime.
The screenshot below shows that I save the result to a csv file 'raw-result-table.csv'.
In Setup Thread, I add an OS Sampler to remove the result files. See screenshot below.
It cannot remove the files. I think it is because JMeter lock the file in runtime.
Please note that the OS Sampler is correct. It can remove the files when I disable the thread 'AD'. I've tried BeanShell script and result is the same.
Actually you won't be able to delete the file which is being used for storing results of the current session. Also there are some issues with your test design:
You should not be using any Listeners, especially View Results in Table / Tree, they consume a lot of resources and may ruin your test.
You should be running your test in command-line non-GUI mode. You can combine it with deleting the previous results file like:
del *result*.csv && jmeter -n -t test.jmx -l result.csv
Upon test completion you can open result.csv file in JMeter GUI and perform the analysis.
You should be using JSR223 Test Elements and Groovy language instead of Beanshell (same applies to the functions, you should substitute __Beanshell() function with __groovy() function) as Groovy has much better performance
Can any one please let me know will jmeter support performance testing for file uploads more than 10gb files. The way the files are uploading is through chunking in JAVA. I cannot do the file upload for more than 10 GB because int allows max size of 2^31. In the http sampler i am declaring the file size as one one chunk
for eg: file size is 444,641,856 bytes, I am declaring the whole in one chunk instead of dividing it into chunks of 5mb each.
The developers are not willing to change the code and also if I give the result using one chunk size its not a valid performance test.
Can anyone suggest will jmeter allowing chunking mechanism ..... and also is there a solution for file uploading for more than 10Gb Files
Theoretically JMeter doesn't have 2GB limitation (especially HTTPClient implementations) so given you configured it properly you shouldn't face errors.
However if you don't have as much RAM as 10GB x number of virtual users you might want to try HTTP Raw Request sampler available via JMeter Plugins.
References:
https://groups.google.com/forum/#!topic/jmeter-plugins/VDqXDNDCr6w%5B1-25%5D
http://jmeter.512774.n5.nabble.com/fileupload-test-with-JMeter-td4267154.html
I have a test plan with five thread groups, each of them has 10 thread users, i wanna run this test plan for 1 hour with 50 concurrent users, for my understanding the number of thread users should keep at 50, but somehow thread users keep reducing after several mins, and ends with 0 thread user, below is my configurations, can someone help take a look, thanks in advance.
Also in jemter command, i got the below error:
Above error shows you got OOM i.e. Out Of Memory error.
You ran out of JMeter allocated heap space.
To resolve this issue you can try below things,
Use tips provided here (use non-gui mode, avoid heavy reporters etc.)
http://blazemeter.com/blog/jmeter-performance-and-tuning-tips
Try to increase heap space of JMeter if your load test really requires large amount of heap space.
I would suggest follow suggestions sequentially.
you can try using distributed setup for load testing , this way you can distribute the load in several machine
The quick fixes
1 Use JMeter in non-GUI mode
Find where you installed JMeter through command line or the terminal
Set the ‘bin’ directory as your current directory
Run ‘jmeter –n –t .jmx
That’s it, when your test is complete you can do your analysis. You may be interested in seeing how your test is performing during execution in command line/terminal (rather than seeing a black window), to do this just uncomment the following within the JMeter properties file (remove the ‘#’):
summariser.name=summary
summariser.interval=180
summariser.out=true
2 Remove or at least disable listeners you don’t need. Typically listeners such as the ‘View Results Tree’ consume large amounts of memory purely down to how much information it gathers.
Simply take a second look at your script and remove the listeners you don’t need.
3Increase the JMeter heap memory
Within your explorer find where you installed JMeter
Open up the bin directory.
Find the ‘JMeter.bat’ file and open it with a text editor
Find the following ‘set HEAP’
You can set this HEAP value to whatever you like, in this example I’ve said allocate 2 GB of memory from the start and throughout the test run: ‘set HEAP=-Xms2048m -Xmx2048m’