Load testing with JMeter?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Load testing with JMeter?

Postby BonyYousuf » 02 Feb 2015, 10:43

Hi,
I want to do load/stress testing with JMeter. I could not find any document for this. Can you please help me out?

Thanks
User avatar
Lapo
Site Admin
Posts: 21678
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Load testing with JMeter?

Postby Lapo » 02 Feb 2015, 10:49

Hi,
I don't know if JMeter could be used for testing SmartFox. The tool is typically used for HTTP server testing. Maybe there are ways to hook up other types of server that use persistent sockets, honestly I have no idea.

Problem is you will need the Java client API anyways otherwise you don't have all of the infrastructure to support the SFS2X protocol. But the API manage the connection on their own... not via an external tool such as JMeter... that's why I don't think it's possible. But again, not a JMeter expert.

What we usually recommend is to use the API to build the logic of your test client and then simply replicate it as many times as you possibly can on several client machines, making sure you don't max out the CPU. This is to avoid bottlenecks in the test itself, leading to unwanted performance artifacts.
Lapo
--
gotoAndPlay()
...addicted to flash games
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: Load testing with JMeter?

Postby BonyYousuf » 02 Feb 2015, 10:59

Thanks Lepo. You just saved me a lot of time :)
grhwood
Posts: 116
Joined: 15 Mar 2011, 04:43

Re: Load testing with JMeter?

Postby grhwood » 05 Feb 2015, 10:17

Im interested in load testing SFS2x, could you share the client code for testing it in the Running 100K concurrent users white paper ?

Thanks,
User avatar
Lapo
Site Admin
Posts: 21678
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Load testing with JMeter?

Postby Lapo » 05 Feb 2015, 11:44

For the test we used a specific tool, called BitSmasher, that we have perfected in the course of the last 5-6 years.
At the moment this tool is not available for public use but we might be able to release it in the future, once we have made it a bit more user friendly and we provide the necessary documentation.

The tool in itself is just a sophisticated client-code replicator. What it does is taking your client logic, written with regular Java API and wrapped in a specific class, and generate gazillions of copies, each with its own connection etc...

The difference between BitSmasher and doing the same job manually is that BitSmasher uses an optimized threading system which allows to run, for example, 100K CCU with ~ 60 threads, instead of 1-2 per connection. In other words it replaces the threading inside the Java API with a specialized thread pool, than can service 1000s of client instances at once.

If you did the same manually, launching 100K Java clients in the same JVM, you would end up with 2 x CCU number of threads, in this case == 200K threads! :shock: Which is clearly too much for any server machine.

Another advantage is that BitSmasher supports master-slave clustering, so you can use any number of client machines to build a massive test and control them as if they were one.

For smaller tests, up to 10-15K CCU you can probably do it manually by replicating as many clients as your stress-test machine can handle, and also use multiple machines to reach a higher load.

Hope it helps.
Lapo

--

gotoAndPlay()

...addicted to flash games
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: Load testing with JMeter?

Postby BonyYousuf » 05 Feb 2015, 11:50

I am using a macbook pro retina. And my machine can handle only 400 CCU max. any more than that I start getting error msgs. I think it is mainly due to my internet speed not my cpu performance.
User avatar
Lapo
Site Admin
Posts: 21678
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Load testing with JMeter?

Postby Lapo » 05 Feb 2015, 17:37

Ouch... stress tests should be run locally, not over the internet!
The first resource that is going to run out is certainly the bandwidth :)

If you have a production server elsewhere you should add a few more machines side by side to it, and run the stress tests in the same local network.

These days a good way to do this is via the cloud. There are several providers who don't charge the internal bandwidth so you can hammer the server very hard and pay only for RAM/CPU. We have been using Rackspace for quite some time. The 100K test, for instance, was run there. They can also set up fully dedicated physical servers, not just VMs.

cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
BonyYousuf
Posts: 120
Joined: 20 Feb 2011, 12:54

Re: Load testing with JMeter?

Postby BonyYousuf » 05 Feb 2015, 17:45

Thanks for the heads up. I was planning to run my test on AWS locally with another EC2 instance :)
User avatar
Lapo
Site Admin
Posts: 21678
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Load testing with JMeter?

Postby Lapo » 05 Feb 2015, 21:52

BonyYousuf wrote:Thanks for the heads up. I was planning to run my test on AWS locally with another EC2 instance :)

Definitely a good idea.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 25 guests