Thursday, July 24, 2014

Why all load testing tools are the same

Over the last few years I've noticed more and more new load testing services and tools, but especially cloud-based SaaS solutions, as part of the movement towards "everything as a service".

There are so many to chose from: Load Impact, BLITZ.IO, BlazeMeterloader.io, Load Storm, Load Focus, SOASTA, LoadUI, Locust and much more, each has its pros and cons, but I'm getting really mad with the fact that they are just more of the same.

Why do I say that they are all more of the same? You need to go back to early 90's where an Israeli company was one of the first to come with commercial load testing tool for WEB and few other protocols, this tool was (Win/) Load Runner and the company named Mercury (later purchased by HP).
Since early 90's the technology of load testing was not changed at all, it was and still is about simply sending HTTP requests and measure responses (I'm being focused on WEB/HTTP load testing for simplicity).

Now, over time, Mercury created good stuff to make things easier for getting the work done, mostly with auto-correlation of parameters and predefined macros for known applications and platforms where it was complicated to develop the load testing scripts due to application complexity with massive usage of http parameters being send back and forth between the browser and the server.
(and I ignore for the scope of the post, all of the other good stuff they've done with systems monitoring, application insight monitoring aka diagnostics, and bringing several perspectives into single powerful analysis tool which was, in my opinion, technological break-through)

At some point, somewhere around 2010, where AJAX was getting popular, generating load testing scripts got more complex and one of the ways to deal with it was to try and change the way load testing was done until that point. If up until now it was all about sending HTTP requests and measure responses (with some parsing), the change was to try and run kinda of real browsers, in memory, without UI, so the load testing tool is now starting to run UI-less browsers and manage them (you could imagine Selenium headless browser running multiple times). This makes it easy to deal with frequent changes in the application UI, API and any changes with AJAX calls will simply require no change with the load testing scripts, as the scripts now interacting on the UI level. Sounds great, right? Well..

Basically the main down side of this technology is that while it works great for functional testing where a single user, or maybe few, running from a host to test the application, the problem is that it is extremely Memory and CPU intensive to run a real browser with MANY windows. So in practice when it comes to really load you web application with more than tens or few hundreds of users, such approach is simply too expensive. Indeed memory and CPU in general are getting cheaper, and maybe in few short years we will get there, but you still need about 100MB (gross) of memory for every virtual user, depending on the complexity of the client side (css/js). So for intranet / internal web systems - it might work, you can create few load generator hosts which with 8-16GB RAM can create a load for about 80-160 virtual users, where it might be enough to load test such internal systems.

When it comes to load testing big, Internet facing applications, you would probably want to load test with thousands of users, which based on the gross numbers above, will require 1000GB of RAM for 10,000 concurrent users. Based on Amazon pricing this will cost about 32$ USD per hour (based on c3.8xlarge 60GB instance which is about 1.7$ per hour - I'm rounding up to 2$ as there are other expenses like network and disk usage).

Now, given the fact that you never run one load test and then wrap things up and never do that again.If you are serious, you will run load tests regularly and at least, once before every production release. We are talking about hours of load tests every month.
With one of my clients, we run 8 hours of load tests every day and 24 hours load test every weekend, with a similar scale to the example above - it would cost more than 9000$ per month to run load tests with real / headless browsers (and that's assuming that we use Amazon On-Demand instances and shut them down between load tests).

If you can have such budget spent on load testing infrastructure alone, you should also consider the fact that, such approach with driving a headless browser, is still considered inaccurate and inconsistent. The timing mechanism is still considered immature, virtual browsers may affect each other due to spikes with CPU consumption and thus running same tests may get you with pretty different results from my experience.

So now, I come back again to why I say all load testing solutions are more of the same.
All of those services and tools I've mentioned above, focus on running load tests with the very first technology that Mercury came with in early 90's, not with running real browsers, which is still immature and expensive but with scripts that define what kind of HTTP requests to hit the system with and measure the response, that's all. So they all provide with different scripting languages or ways to control the test. Some allow you to work with UI and modules to create the required script, some with XML, some with coding style in either proprietary scripting engine or wide spread scripting engine, but the very bottom line is that they all ask you to provide with same data to get your load test running.

Go and try few of them, you will see and understand that each solution wraps the same idea with different UI. They all work the same and if they work the same, I urge you to use those who are based on JMeter. Why? Because it is the most popular load testing tool in the world, it is free and open source and most importantly - it has the biggest set of features and it continue to grow with regular releases backed by an awesome core team of commiters which push it forward. If you go with other proprietary scripting engine, you will soon find show stoppers, blocking you from executing a script which should interact with your application due to missing functionality, as all other engines are trying to keep up with JMeter.

So why I mad about all those tools and competitors? They all try to re-invent the same wheel. Not a smarter one, not a better shape nor better material. Just re-creating same old stuff which was invented about quarter of a century ago!!

Last point is that 5 years ago - the idea of driving real/headless browsers was really promising, but so far no real solution is doing that successfully.
I'll create a technical post on this topic in the future to show timing issues with such approach, currently I have in mind to show results from Selenium browser running from by JMeter with the JMeter Plugins, but any other ideas or pointers are welcome here.

Saturday, October 12, 2013

Is JMeter the most popular performance testing tool?

About a year and a half ago, at mid of 2012, I gave a talk in the Israeli QA Conference and part of the session was about the increasing popularity of JMeter (and the decrease of popularity of the old leader - HP Load Runner). Back then I said that I expect that by the end of 2012 the most popular performance testing tool will be JMeter (JMeter introduction presentation for Israeli audience).

Well, it seems I was right. It happened even faster!
Looking at the job posts popularity by keywords, the are more job opening now with JMeter, than with Load Runner, actually since mid of 2012.


(looking back at the presentation from that time, at mid 2012, I only had figures from January 2012 which showed this about to happen, while in fact - it already did)

As I am trying to be active on the JMeter users list, as well as monitoring the developers list I see this is not out of the blue - the maintainers are doing excellent work with new important features, bug fixes, new technologies adoption and so on... Also taking seriously community comments and change requests.

One of the best things about the JMeter users list is not only that it is being used for discussion about the tool but it also a place to discuss about methodologies, best practices and how-to's, regarding proper load testing, integration with continuous delivery and other conceptual topics.

Aside of the properly maintained project in Apache, there are other projects, both free open source and commercial, which complement the tool, including the most popular free open source and must have JMeter Plugins project (fka JP@GC, which went crazy bigger over the last 6 months with merging of other smaller jmeter plugins projects) and the commercial Ubik Load Pack (Which I must admit, I have never used).

There are also JMeter cloud services like Blazemeter.com, flood.io (fka gridinit.com) and beatsoo.org.

Two important notes I have with the trending of popularity:

  1. The popularity growth of JMeter seems to be on hold over the last couple of years.
    I am unsure if that's because there's another 3rd major player I am not familiar with or it is that the human kind found another solution where performance testing is not required. It might also be related with the overall job openings in the USA (where this graph is based upon) which feels to me like the most likely. It is also known that over bad financial times, the "fats" are cut off, so quality is something easier to cut, than developers who actually develop software. Time will tell.
  2. The second important note is that the comparison between load runner and jmeter is incorrect, as the comparison should have been with the term "loadrunner" and not "load runner". Seems like the right term (or the more popular term) is non-spaced "loadrunner":
    So overall loadrunner is still more popular (especially if you sum it with "load runner" job openings), but the shrinking trend with the popularity of Load Runner cannot be ignored.
Let's see how it looks like in few months.

Tuesday, April 23, 2013

Gmail - free Giga e-mail account!!

Long time ago I decided that lot of stuff is being stored on my Gmail account, stuff which I need so backup is required here...

The recent announcement of shutting down the Google reader account got to push me to take an action now and backup my Gmail account.

Lots of guides on how to backup Gmail accounts, but the interesting thing is that I've looked what's the oldest email I got there on my account and found that the first email on my account is the invitation I've sent to my friend.. Yeah what a crazy days... Back then you couldn't simply sign-up to Gmail, you had to get invited by someone you know and then you would get 20 invitations to invite your friends...




Shmuel Krakower has invited you to open a free Gmail account. The invitation will expire in three weeks and can only be used to set up one account. To accept this invitation and register for your account, visithttp://gmail.google.com/gmail/a-6872ae05d5-df976c5f73-1f73df1ad0 Once you create your account, Shmuel Krakower will be notified with your new @gmail.com address so you can stay in touch with Gmail! If you haven't already heard about Gmail, it's a new search-based webmail service that offers: - 1,000 megabytes (one gigabyte) of free storage- Built-in Google search that instantly finds any message you want- Automatic arrangement of messages and related replies into  "conversations"- Text ads and related pages that are relevant to the content of your  messages Gmail is still in an early stage of development. But If you set up an account, you'll be able to keep it even after we make Gmail more widely available. We might also ask for your comments and suggestions periodically and we appreciate your help in making Gmail even better. Thanks, The Gmail Team To learn more about Gmail before registering, visit:http://gmail.google.com/gmail/help/benefits.html

Sunday, April 14, 2013

Chrome dev tools missing data on network tab

While analyzing page loading times I noticed the following strange timing:

No matter how you sum this up, it ain't gonna get to 47.84 seconds!
What's wrong here? I don't know, not the first time I see this strange timings... any ideas?

Tuesday, December 25, 2012

HTTP protocol and URI fragments (#)

I've been working to create JMeter scripts for load testing an intranet web application and usually I tend to use the JMeter recording proxy, but as I was already familiar with the application and how it works and this was just another small addition to existing scripts, I just duplicated an existing HTTP Sampler and changed the path and some parameters/headers as needed. So I used Google Chrome developer tools to see what's the path I need to send the HTTP Request to and got:

So I copied the path part of the URI: "/message/1002#1003" and put it into my JMeter script, to generate the same HTTP request:

The thing is that when running this request from JMeter, I got a HTTP 500 error. I was going mad, this made no sense, running the same request with all needed headers/cookies from Chrome worked. I looked into the server's Apache access log and noted that when sending the request from JMeter for the path "/message/1002#1003", indeed there was a record for this path with a result of 500. The surprise was when I generated the same request from Google Chrome, I saw in the Apache logs that there is a request with a 200 result, but the path is "/message/1002", without the trailing "#1003"!!

That got me starting to think, why would a browser send the trailing part after the '#', it made no sense, as the application/web server don't care which part of the results we are looking for, the result will be the same with any given values after the '#' sign. It should be with the scope of the browser/client only and never sent to the HTTP server as part of the URI.

Looking at the Spec, (http://tools.ietf.org/html/rfc3986#section-3.5 - fifth paragraph) I found the approval to what I was looking for:
Fragment identifiers have a special role in information retrieval systems as the primary form of client-side indirect referencing, allowing an author to specifically identify aspects of an existing resource that are only indirectly provided by the resource owner. As such, the fragment identifier is not used in the scheme-specific processing of a URI; instead, the fragment identifier is separated from the rest of the URI prior to a dereference, and thus the identifying information within the fragment itself is dereferenced solely by the user agent, regardless of the URI scheme. Although this separate handling is often perceived to be a loss of information, particularly for accurate redirection of references as resources move over time, it also serves to prevent information providers from denying reference authors the right to refer to information within a resource selectively. Indirect referencing also provides additional flexibility and extensibility to systems that use URIs, as new media types are easier to define and deploy than new schemes of identification.
For conclusion - now I know that:

  1. Google Chrome Dev tools doesn't show the real Request URL (while others like HTTP Watch do).
  2. Apache JMeter will sometimes send the values after the '#' sign in the path (HC3.1 and Java implementations will skip it, but HC4 will send it).
  3. The name for this '#' sign when speaking about the HTTP Protocol is "URI fragment".
  4. In any way - during future testing, it will make no sense to include URI fragments as part of the path, as they are only handled by the client / browser and in JMeter it make no sense.

Friday, October 26, 2012

Load and Performance Testing - JMeter based services

Hi,
After I wrote about why JMeter is better than HP LoadRunner (or Performance Center) earlier this year, I want to share few services which only exists for who choose to use JMeter.

Aside of running load tests from your own servers either inside your Data Center or on Cloud hosting, which you can do with any load testing tool, by installing and manage these servers yourself, here is a list of services which allow you to get more, for less.

These (paid/free) services are waiting for you, if you are using JMeter:

  1. BlazeMeter - don't mess around with building and managing your load testing servers. You can use this service to upload your existing JMeter scripts and resources (csv dataset files, etc) and run them from as many servers as you want, you pay for amount of servers/users you run over time and you can choose from which AWS locations to run the load test from. This service also provides nice central reporting capabilities.
  2. Gridinit - a new open source cloud load testing platform, which let you once again, utilize JMeter to run load tests from the cloud. The nice thing about this service is that you don't have to pay for anything, you can get the platform and install it on your own servers, either in the cloud or locally, and start load testing with nice web UI and some online reporting capabilities. You may also use this as a paid service and have them start needed servers in the cloud for you. Another nice feature is that you can do mixed mode load testing and utilize at once both their cloud service with combination of your own servers.
  3. Beatsoo! - a new free JMeter based application performance monitoring service. You can drop your existing JMeter scripts over there and start getting response times monitoring for your website (or any other thing your JMeter script interacts with) from world wide locations. Think how useful this is - you spend some time for load testing and improving system performance but why throwing away those scripts? Here you could re-use them for so-called "Synthetic User Monitoring" or End User Monitoring. This service will run your JMeter scripts from few world wide locations in very short intervals (around a minute or so) and allow you to compare your system performance over time and between different locations.
So here are more reasons for choosing JMeter over other load testing tools. Can you easily get you LoadRunner load tests run from several worldwide locations? Can you re-use your scripts for performance monitoring from worldwide locations?
Well, the truth about HP is that they have kinda LoadRunner SaaS but  it seems like they don't really want people to use it, as it is very expensive and it is basically a hosted Performance Center, rather than Load Testing Saas.
For re-using of the scripts for monitoring, HP have the EUM BPM but it is not available as a service neither.

Perform better, use JMeter!

Monday, October 22, 2012

Amazon EC2 N. Virginia is down

Tonight is the first time I see the AWS Management console not available after more than two years of using it. The Instances page result with an error: "Request limit exceeded" instead of a list of my instances for the N. Virginia region.


I was thinking something is broken with my connection so I cleared all my the browser caches and re-opened AWS, but it is really down.

On the AWS health dashboard only says there are performance issues with the EC2 and Elastic Beanstalk but only a note for some elevated error rate for the AWS management console... I would call it service disruption.

Let's hope the service will get back on track soon...



Friday, October 19, 2012

Internet Explorer 10 - broken link

I've developed an app which uses HTML5 capabilities and wanted to checkout which browsers are actually supporting it. I have Chrome 22 which runs it just fine and wanted to see how Firefox 16 and Internet Explorer 10 will do.

FF 16 download and installation went as expected and it actually runs my HTML5 stuff allright, the download of IE 10 is broken and I cannot even get to test it.


It seems like I will have easier life now and just skip supporting IE (anyway according to my blog statistics it seems like only 13% of my readers are using IE).

Friday, June 01, 2012

JMeter introduction presentation for Israeli audience

Last week I was one of the speakers in the Israeli Agile QA conference 2012, in front of more than 200 people from the Israeli QA industry.
Most of the speakers were very self-advertising about the products or services they offer.

On the other hand - I have nothing to sell but to spread the word about the changes coming to the load testing area, as I have the feeling that the Israeli market is really under-estimating JMeter as a product for load testing. This market controlled by HP load runner, completely.

This is changing worldwide - but in Israel we are living in some delay.



I started my presentation with the need for load testing, shared some key reasons to drive us into load testing as well as sharing some of the last couple of weeks crash stories for Israeli and world wide web sites and services, mentioning Golan Telecom, Le'an Israeli online ticketing service and Blizzard's Diablo 3 online service.

I talked about how load testing can be done:
  1. Manual load testing - which is self explaining, and while asking how many people did this in the past - I saw more than 30 hands raised, while asking how many of them did this during the last year about half of the hands remained in the air.
  2. Then I talked about HP Load Runner, asking who heard about it and got almost all hands of the crowed (very good job for HP's sales department!). Mentioning the fact the on early 90's they came with their game-changing product to allow load testing for many popular protocols. Since then the two most popular protocols which are really being used among the huge list of protocols are HTTP and Citrix. Cons: You need $$$ before you can even start thinking of load testing with this product and the fact that you will almost always end up needing to write scripts in C language + special functions they came up with in the early 90's.
  3. Now I've started to talk about JMeter, which is free, open source, you can sell it as it is to anyone and so on... and one of the important points was that the "J" in JMeter doesn't mean that this is a product for Java load testing, as usually J prefixed products do, but it only means that JMeter is written in Java and it suitable for load testing any of the supported protocols, no matter what the underlying platform is.
Later I exposed some interesting numbers from Indeed.com about jobs offering in the USA in the last years, showing a huge trend in JMeter's popularity - if about 7 years ago there was 1 JMeter job post, today there is 140 job posts! While on the same time, Load Runner popularity remained about the same, with a growth of about 20%.

The interesting fact is that JMeter is not taking over Load Runner jobs market, but it is actually making the load testing market (or the total number of jobs posted) bigger.

I then talked about the very near future with anticipating that until the end of this year (2012) there will be more JMeter job posting than Load Runner, in the USA.

As the last motivator - I talked about the doom of Load Runner, showing numbers about the popularity of Borland C, saying that if nothing big will happen with Load Runner, its popularity will look like Borland C in the next very few years.

Later I gave a ten minutes demo about how easy is to start with JMeter, making an example recording of few actions in the new web site of Golan Telecom, allowing people to join this new Israeli Cellular Network, online.


I also talked shortly about BlazeMeter, an Israeli start up utilizing JMeter to allow easily load testing with JMeter from several locations using Amazon AWS.

At last, I spoke about how to start using JMeter - referring to google for JMeter :)

Saturday, March 31, 2012

Download Java JRE/JDK 7 from shell

A bit off-topic from this blog prespective but still wanted to share this as I couldn't find an answer to this.

I've been trying to install JRE 7 on my amazon ec2 server.
The first step to do so, is to wget (download) the rpm / bin install file, right?

Well it seems like since Java7, you must accept license agreement on the download page, before you can download java, which make sense. The problem with that is that you cannot accept this license agreement if you are on shell, doing wget.

[root@X opt]# wget http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jre-7u3-linux-x64.rpm
--2012-03-31 10:13:47--  http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jre-7u3-linux-x64.rpm
Resolving download.oracle.com... 67.148.147.41, 67.148.147.57
Connecting to download.oracle.com|67.148.147.41|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jre-7u3-linux-x64.rpm [following]
--2012-03-31 10:13:47--  https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jre-7u3-linux-x64.rpm
Resolving edelivery.oracle.com... 23.1.46.174
Connecting to edelivery.oracle.com|23.1.46.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-03-31 10:13:47--  http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com|67.148.147.41|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: גdownload-fail-1505220.html.1ג
100%[==============================================================================================================================>] 5,307       --.-K/s   in 0.001s
2012-03-31 10:13:47 (3.40 MB/s) - גdownload-fail-1505220.html.1ג


So one way to work-around this is to download the file from a browser and copy over to the linux box, which for me, uploading 20MB file to amazon will take about half an hour or so..

The option I find to work around better for me is to run any network sniffer / IE developer tools / Chrome dev tools / etc and look for the final link which has the AuthParam=*.

So all you have to do now, is copy and paste this URL into your shell window like this:

[root@X opt]# wget http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jre-7u3-linux-x64.rpm?AuthParam=1333189254_3bd4c119fa6d0056c3661e50ebc8c521
--2012-03-31 10:19:17--  http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jre-7u3-linux-x64.rpm?AuthParam=1333189254_3bd4c119fa6d0056c3661e50ebc8c521
Resolving download.oracle.com... 67.148.147.57, 67.148.147.41
Connecting to download.oracle.com|67.148.147.57|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 21283819 (20M) [application/x-redhat-package-manager]
Saving to: גjre-7u3-linux-x64.rpm?AuthParam=1333189254_3bd4c119fa6d0056c3661e50ebc8c521ג
100%[==============================================================================================================================>] 21,283,819  16.9M/s   in 1.2s
2012-03-31 10:19:18 (16.9 MB/s) - גjre-7u3-linux-x64.rpm?AuthParam=1333189254_3bd4c119fa6d0056c3661e50ebc8c521ג

Good luck!

As I see many people still coming for this topic, please use the better solution described here: http://ivan-site.com/2012/05/download-oracle-java-jre-jdk-using-a-script/