Load Testing Yii Vs Micro Framework


I’m coming to you guys with a difficult question.

So, my company is about to start a big project, which needs to be fast, really fast, and handle a lot of users at the same time. We’re in research phase at the moment, looking for the php framework best fit for the job and so far Yii is one of the options. We also chose a smaller one (micro framework).

We started to develop a small project in the two chosen frameworks in order to compare them. The main goal wasn’t to develop something really optimized at this point, so the queries aren’t wrong or ‘dumb’ but aren’t perfect either.

Once the preliminary projects were done, we decided to test them. They were in the same server, worked with the same database and used the same queries. Before testing in a large scale, the micro framework performed a little better (as expected, since it didnt offer the same features), but the Yii project was also really fast.

The problem came when we started to increase the load - 2000 users in 10 minutes performing the same pattern of actions/requests. The actions had a timer linked, so they were separated over time (1-5 sec).

The project implemented in the micro framework performed pretty well - the average time spent per request was 555 ms. But the one implemented in Yii framework totally choked. The average time per request was really high at some point (32 sec), and the server was swamped.

The tests were made using JMeter. I should state that neither the Yii nor the micro framework were using caching mechanisms. Even though they are highly recommended whene one is using Yii framework, we wanted to test the overhead of the frameworks per se.

I was really disappointed with these results. I was working on the project using Yii and it seemed a really good option during development. But now I’m starting to think that something is wrong, and I don’t see where it might be. The code is clean and the projects were implemented in a very similiar way.

I enabled the debug config, I reviewed every query and they were all ok, lasting the expected time.

Any thoughts/help would be appreciated.

Thank you!