简体   繁体   中英

Performance testing using jmeter on linux

I am working on performance on web-portals in my company using jmeter. I am stucked somewhere when we need to run jmeter on linux server.

What I am doing : I run jmeter on local machine and then transfer results.jmx file on server.
After that I open that results.jmx file in jmeter on server and saved all results in server-results.jtl file extension.

When jmeter complete its execution on the server I download server-results.jtl file on local and open that particular jtl extension file on local jmeter and then record the final result of jmeter.

My main question is no.1: Does Jmeter on local and Jmeter on server with same script and scenarios make any difference or not? I've found very minor difference.

Question 2: I removed *.png, *.jpg, *.CSS extension url calls from jmeter script. Because it may delay the main request time. But as we re removing these extension and concentrating on main URLS only, will it make good performance or I need to consider all extensions?

Note: Please anyone give me complete steps to run jmeter on server.

Thanks in advance.

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.

Q1: Does Jmeter on local and Jmeter on server with same script and scenarios make any difference or not? I've found very minor difference?

There is no difference in execution of jmx. In windows, you must be running the jmeter through jmeter.bat and in linux, you must be running with jmeter.sh. Given the conditions that you don't change your jmx file.

Q2. I removed *.png, *.jpg, *.CSS extension url calls from jmeter script. Because it may delay the main request time. But as we re removing these extension and concentrating on main URLS only, will it make good performance or I need to consider all extensions?

Try avoiding this extensions during recording itself. By excluding the .*.(bmp|css|js|gif|ico|jpg|png|swf|woff|php|jsp|html|htm|ashx)

There are no step instructions as such: 1. Goto Linux Server and find the jmeter bin folder (/opt/jmeter/apache-jmeter-2.13/bin/jmeter.sh) 2. use a shell script to open your jmx. 3. sh /opt/jmeter/apache-jmeter-2.13/bin/jmeter.sh -t sampletest.jmx -p user.properties -q os.properties

Method 2: 1.Navigate to bin folder by doing a cd command in linux. 1. use ./jmeter.sh and it will open a blank jmeter test plan in GUI mode. 2. If you want to run with distributed testing mode. Use ./jmeter-server in your slave linux machines. But you need to configure your slave machines IP addresses in the properties file.

Hope this helps..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM