Alibaba Cloud PHP and AB Benchmarking

Posted on 2 January 2018 by Alberto Roura.
alibaba cloudalicloudaliyunawsbenchmarkdevopsdigitaloceanphp

As some of you may know, I recently moved all my services and infrastructure to Alibaba Cloud (阿里云), being this one of the best decisions I made in 2017 in terms of Cloud Computing. I used several services in the past, from DreamHost to 1&1 and from AWS to DigitalOcean. So far, Alibaba Cloud (阿里云) is the only one that suits my needs.

AWS is a giant, and certainly gives you the power to servify everything you can imagine, but is so huge is hard to grasp all of it, document-wise. DigitalOcean is a good option for the ones that only need some basic compute instances, and is very transparent in terms of pricing and documentation.

Alibaba Cloud (阿里云) brings the best of both giving you the scalability and services of AWS but with the transparency of DigitalOcean. Its documentation is improving every day and the blog has hundreds of entries every month. They also give you a $300 New User Free Credit for those who register.

Let’s get to the details

I know most users will care only about compute instances anyway. So I ran PHP and AB benchmarks in AWS, DigitalOcean and Alibaba Cloud (阿里云), all using equivalent basic instances, the 1GB/1CPU.

Below are the results. Both AWS & Alibaba Cloud (阿里云) performed 400% better than its counterpart in PHP Benchmarking. In the AB testing they both took a third of the time to complete compared, again, to DigitalOcean.

Here is where I demonstrate the real-world capabilities of Alibaba Cloud (阿里云), performing as good as AWS. Having a location in Sydney, Alibaba Cloud (阿里云) is the perfect Cloud solution for any Australian, as not only the application will perform better in-server, it will also load faster to the final user, beating all others in price and is fully PCI compliant. Win-win!

DigitalOcean 1GB/1CPU Instance

--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2017-12-18 03:32:26
Server : [email protected]
PHP version : 7.1.12
Platform : Linux
--------------------------------------
test_ifelse               : 1.977 sec.
test_loops                : 0.780 sec.
test_stringmanipulation   : 0.557 sec.
test_math                 : 0.593 sec.
--------------------------------------
Total time:               : 3.907 sec.
--------------------------------------
|          APACHEBENCH SCRIPT        |
--------------------------------------
Concurrency Level:      5
Time taken for tests:   90.094 seconds
Complete requests:      1000
Failed requests:        0

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      122  129  11.6    128     268
Processing:   295  320  28.2    313     685
Waiting:      168  187  19.5    181     351
Total:        419  450  35.8    441     811

AWS 1GB/1CPU Instance

--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2017-12-18 07:58:08
Server : [email protected]
PHP version : 7.1.12
Platform : Linux
--------------------------------------
test_math                 : 0.299 sec.
test_stringmanipulation   : 0.383 sec.
test_loops                : 0.215 sec.
test_ifelse               : 0.177 sec.
--------------------------------------
Total time:               : 1.074 sec.
--------------------------------------
|          APACHEBENCH SCRIPT        |
--------------------------------------
Concurrency Level:      5
Time taken for tests:   29.197 seconds
Complete requests:      1000
Failed requests:        0

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       89  110  41.1    106     690
Processing:    24   36  10.0     31     128
Waiting:       24   35   8.9     31     128
Total:        116  146  42.0    140     724

Alibaba Cloud (阿里云) 1GB/1CPU Instance

--------------------------------------
|        PHP BENCHMARK SCRIPT        |
--------------------------------------
Start : 2017-12-18 11:25:59
Server : [email protected]
PHP version : 7.0.22-0ubuntu0.16.04.1
Platform : Linux
--------------------------------------
test_ifelse               : 0.197 sec.
test_loops                : 0.219 sec.
test_stringmanipulation   : 0.336 sec.
test_math                 : 0.232 sec.
--------------------------------------
Total time:               : 0.984 sec.
--------------------------------------
|          APACHEBENCH SCRIPT        |
--------------------------------------
Concurrency Level:      5
Time taken for tests:   29.632 seconds
Complete requests:      1000
Failed requests:        0

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       93  114   9.2    114     170
Processing:    26   34   5.3     33      72
Waiting:       25   32   4.4     32      55
Total:        123  147  10.7    147     204

PHP Benchmark Script Used

For the PHP tests, I used PHP benchmark Script, a great and simple php file that easily runs un anywhere. Gives you a really good picture about how the server is performing.



Original article: Alibaba Cloud PHP and AB Benchmarking.

✉️ Contact

Ready to take the next step? Don't wait any longer! If you're interested in learning more about Guztia products and services, or if you have any questions or concerns, book a meeting today.

Book a Meeting

Our team of experts is standing by, ready to assist you with anything you need. Book a Meeting, and Guztia will take care of the rest.