Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to test php scalability

I am rumning centOS on a VPS with good performance. I have a PHP file that calculates some combinations for a game for each user that plays this game. It calculates the logic of a game that is built with FLASH.

I want to test this file to see how the response time is doing with 1000 users simultaneously I have no idea where to start from or what to look for.

If anybody can give me some tips, let me know.

And I have another question. how do I know if my application is scalable ?

like image 793
NVG Avatar asked Jan 09 '13 11:01

NVG


People also ask

Is PHP more scalable?

PHP is quite scalable and works well with various frameworks like Symfony, Codeigniter, Zend, CakePHP and many more. Scalability is not a matter of only a programming language.

Is Jmeter scalable?

Jmeter is a tool for testing performance and scalability. It replicates the act of many users hitting a system and it tracks statistics about the activity.

What is scalable PHP architecture?

It is the capability of a system either for automatically raise up or lower down the use of its resources (CPU, memory, etc.) depending on the level of demand required from it.


2 Answers

There are few tools out there you can use.

ApacheBench

Httperf

HP LoadRunner

http://www.opensourcetesting.org/performance.php

xDebug has a profiler built in. will allow you to see the all the function calls, average and cumulative call times and the total script execution time

like image 188
Techie Avatar answered Sep 28 '22 09:09

Techie


You can use ab for this.

To test end-user performance, do not run it at the server. The testing tool will use the same resources as the script, and localhost network communication is not a real-life scenario. There are also some cloud based stress-test services (like http://loadimpact.com or http://www.neustar.biz/enterprise/web-performance/load-testing-packages , but they are not free)

Also, take a look at memory/CPU consumption of the overall system, not only of the script itself. Usually, you should gain quite some improvements in resource usage using Nginx and FastCGI.

Scalability highly depends on what your script is doing, what resources it consumes and how. At the end it might be as easy as just adding another server and a loadbalancer.

like image 40
nico gawenda Avatar answered Sep 28 '22 09:09

nico gawenda