difference between jmeter.bat/jmeter.sh And jmeter.file
You should update one file based on your OS Windows/ Unix
To run JMeter, run the jmeter.bat (for Windows) or jmeter (for Unix) file.
Both execute internally ApacheJMeter.jar
In windows execute jmeter -n -t is actually calls jmeter.bat
In Unix you can call either jmeter or jmeter.sh
We can open JMeter through jmeter.bat and ApacheJMeter.jar. What's the difference?
jmeter.bat
is batch file for windows only which open command line
promptIt execute
ApacheJMeter.jar
internally but add more logic as checking minimum java version (1.8 for version 3.2) or adding parameters as set-XX:+HeapDumpOnOutOfMemoryError
ApacheJMeter.jar
is a jar that can be executed also in linux
without command line prompt
See also other options to run.
Jmeter Heap Size increment
Looking into this line of jmeter
startup script:
## HEAP (Optional) Java runtime options for memory management
## used when JMeter is started.
## Defaults to "-Xms1g -Xmx1g -XX:MaxMetaspaceSize=256m"
you should be able to manipulate the HEAP environment variable value like:
HEAP="-Xms1g -Xmx2g -XX:MaxMetaspaceSize=256m" && ./jmeter -n -t /home/chamindu/Desktop/PerformanceTesting_colud/Jmeter/100tenants_with_refresh.jmx
or
export HEAP="-Xms1g -Xmx2g -XX:MaxMetaspaceSize=256m"
or add the next line to your shell profile so it would be applied on startup:
HEAP="-Xms1g -Xmx2g -XX:MaxMetaspaceSize=256m"
More information: 9 Easy Solutions for a JMeter Load Test “Out of Memory” Failure
Executing jmeter.sh in Windows
The benefits is that Git Bash is not provided OOTB on Windows while regular bat is.
Except for this, since git bash is a shell emulator which looks rather serious, I guess it should work fine.
Did you try it at high load to see if you face any limits ?
Also you can see some comparison of Windows shells:
- https://macyves.wordpress.com/2014/09/18/hipsterising-windows-cygwin-vs-babun-vs-git-bash-vs-powershell-the-onion-scale/
Jmeter Out of memory _ File upload test
50 threads * 1.5 GB == 75 GB
while you have from 3 to 5 GB allocated to JMeter so it is definitely not enough.
You need either to use something like m4.10xlarge with 160 GB RAM or m5d.12xlarge with 192 GB RAM in order to be able to upload that big files with that many threads.
Another option is considering switching to Distributed Testing but you will need to kick off more m4.xlarge
instances
You can also try switching to HTTP Raw Request sampler which has nice feature of streaming file directly to the server without pre-loading it into memory so theoretically you should be able to simulate file uploads even on that limited instance, however it might not fully reflect real life scenario. You can install HTTP Raw Request sampler using JMeter Plugins Manager
To disable heap dump creation remove DUMP="-XX:+HeapDumpOnOutOfMemoryError"
line from JMeter startup script.
Performance testing using jmeter on linux
Apropos question number 2:
It depends what you are testing. In most web applications, serving static assets (images, stylesheets, javascript files etc.) is not the bottleneck; most web applications set those assets to be cacheable, and often employ a CDN to serve them.
In most web applications, the performance bottleneck is serving dynamic pages (.aspx, .php, .jsp). Typically, these file types consume many times more server power than the static pages; it's not uncommon for a single machine to be able to serve thousands of static assets per second, but only tens or hundreds of dynamic assets.
From a business point of view, the question is usually "how many concurrent users can my site serve, and what do I need to do to increase that number". For most web applications, that translates to "what's the bottleneck resource, and how can I scale that".
So, if the goal of your performance test is to find the bottleneck resource (so you can optimize it!), leave out the static assets. If you can only serve 20 concurrent users requesting home.jsp, it doesn't matter that you can serve thousands requesting logo.png...
There is another question the business asks: "so, you reckon we can support x concurrent users - prove it!". In that case, you need to simulate x concurrent users hitting your site - that means including static assets (because your bottleneck resource may just be bandwidth, or the servers may be misconfigured, or your caching strategy may be broken). However, in this case, you are effectively load testing the internet - your CDN provider (if you have one), the performance of your web server (which has been optimized for serving static files), and your hosting provider's bandwidth management. It's a "belt and braces" approach - you really are excluding fairly marginal risks - and it usually means throwing significant resources at testing - your test rig needs at least as much bandwidth as your hosting provider, and your test machines need to be able to emulate (tens of) thousands of internet users.
Related Topics
How to Get Wget Only Save File If Its Complete
Linux Mail Adding Content Type Headers Not Working
How to Quickly Check If Linux 'Unzip' Is Installed Using Perl
How to Avoid Sigchld Error in Bash Script That Uses Gnu Parallel
Get The Name of The Directory Where a Script Is Executed
How to Display Nc Return Value in Linux Shell Script
When Is The System Call Set_Tid_Address Used
How to Use Qemu for Learning Arm Linux Kernel Development
How to Install Pysqlite for Python3.4.2
Where Are Core Files Stored in a Lxc Container
Prevent Git Checkout from Overwriting a File
Linux Module to Hook Process Functions
How My Custom Module on Linux 3.2.28 Can Make a Call to Print_Cpu_Info
Udp Server Giving Segmentation Fault
Modemmanager: Mmcli Get Signal Strength
Sysfs Interface. I Can't Export Gpio Pins in a Xilinx's Board (Zybo and Other)