Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do load testing for a website?

Tags:

testing

load

I want to do performance testing. But we do not have any requirements. I want to do load testing for a website. How do I perform these tests?

My website is like youtube (social application). In this I want to check how many users can upload video at a specific time, how many videos can we able to store, 10000 videos possible are not? How to test these.

I am currently using JMeter for load testing.

Can you send some suggestions and what are the timings we want to check? How many concurrent users are needed?

Thank you

like image 903
user1912736 Avatar asked Aug 07 '26 10:08

user1912736


2 Answers

There are two different questions here:

  1. Requirements: what are the statistics you are looking for?
  2. Technological: how do you test to see if you meet the goals you set for yourself?

Regarding (1): In a perfect world, you would be able to analyze your target customer scope and understand how many people would be using your system concurrently. You would then understand how many of them would actually trigger a response in your web site (concurrently), and from that understand how many requests you need to handle concurrently.

Another question you would probably want to know, is the size of data you can expect to have. If you have 1,000,000 users, and 1 out of 100 users uploads a video, that would lead to 10,000 videos in your database. So the answer to that one is again dependent on the number of users and their behavior.

It is probably possible to do some kind of a market research and come up with numbers, but lean startup methodology states that you usually don't know the answer to these questions, you only guess, and usually you guess wrong.

So, assuming you can't really know ANYTHING, you should understand how to make your system scalable in a way that would let you support ANY number of concurrent users, and ANY size of data.

But, you probably want to know statistics regarding the current infrastructure you are using. This leads us to (2).

JMeter is a good tool for testing concurrent load, you didn't state what your server is written in, but JMeter suggests Java, in which case on top of everything else you should understand memory limitations and Garbage Collection times.

Assuming a stateless (or at least session-sticky) distributed system, you would want to test a single "typical" server for response time and failure for a given number of concurrent requests. Start small, and go higher as high as the results are still acceptable (i.e., for 100 concurrent requests, 50ms response time and 0 failed responses is acceptable, 1000 concurrent gives you 300ms delay and 5 failed responses, and at 5000 you get to 500ms and 15 failed responses which is as high a delay as you deem acceptable, and as high a number of failures as you can accept)

You would probably want to change "typical" from above and see how different infrastructure gives you different results, the great thing about today's cloud services is that you can easily go to EC2 and get any type of infrastructure for very little investment and test your results so you know what you need to buy (assuming you don't want to stay hosted on EC2). You can also use EC2 to host JMeter instances (I read an article about that once, can't remember where but google it), and you can have many many concurrent requests issued for under 200$/test.

like image 51
TheZuck Avatar answered Aug 10 '26 01:08

TheZuck


http://www.loadstorm.com

Is a nice website to get started for load testing.

If you're looking for something more advance try hp loadrunner-

http://www8.hp.com/us/en/software-solutions/software.html?compURI=1175451#.UmbpLZRgY08

like image 34
user2907639 Avatar answered Aug 09 '26 23:08

user2907639



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!