Rép : some AB testing ...

Pierre Sahores sc at sahores-conseil.com
Mon Feb 15 16:43:33 EST 2016


Dear Livecoders,

I promise to be back with some final tests and related thoughts and here they are. All tests went carefully done in using both ApacheBench 2.3 Revision 1528965 and Siege 3.0.5 with same average results. Only the Siege ones are reported there to maintain this report as readable as possible.

--

root at pierre-X200CA:/home/pierre# siege -b -c 100 -r 50 -q http://192.168.1.15/index.lc
      done.

Transactions:		        		5000 hits
Availability:		      			100.00 %
Elapsed time:		       			85.00 secs
Data transferred:	        		0.65 MB
Response time:		        	1.68 secs
Transaction rate:	       			58.82 trans/sec
Throughput:		        		0.01 MB/sec
Concurrency:		       			99.03
Successful transactions:        		5000
Failed transactions:	           		0
Longest transaction:	        	1.84
Shortest transaction:	        	0.11

code :

put "<br /><p align='center'>Hello World from LiveCode CGI Server" && the version & \
	"</p><p align='center'>on" && the internet date & "</p>"

configuration :

eeePC Asus X200CA Ubuntu 14.04, Openresty 1.9.7.2 + FCGIWrap + .LC script + LC CGI Server 7.1.1

— 

root at pierre-X200CA:/home/pierre# siege -b -c 100 -r 50 -q http://192.168.1.15/index.php
      done.

Transactions:		        		5000 hits
Availability:		      			100.00 %
Elapsed time:		        		2.26 secs
Data transferred:	        		0.48 MB
Response time:		        	0.04 secs
Transaction rate:	     			2212.39 trans/sec
Throughput:		        		0.21 MB/sec
Concurrency:		       			97.85
Successful transactions:        		5000
Failed transactions:	           		0
Longest transaction:	        	0.08
Shortest transaction:	        	0.00

code :

put "<br /><p align='center'>Hello World from LiveCode Application's Server" && the version & \
	"</p><p align='center'>on" && the internet date & "</p>"

configuration :

eeePC Asus X200CA Ubuntu 14.04, Openresty 1.9.7.2 +FMP/FastCGI + .PHP 5.5.9 sockets proxy script --> localhost:9578 --> LC 6.1.3 Application’s Server launched in -ui mode

— 

root at pierre-X200CA:/home/pierre# siege -b -c 100 -r 50 -q http://192.168.1.15/lc
      done.

Transactions:		        		5000 hits
Availability:		      			100.00 %
Elapsed time:		        		1.29 secs
Data transferred:	        		0.35 MB
Response time:		        	0.02 secs
Transaction rate:	     			3875.97 trans/sec
Throughput:		        		0.27 MB/sec
Concurrency:		       			95.12
Successful transactions:        		5000
Failed transactions:	           		0
Longest transaction:	        	0.08
Shortest transaction:	        	0.00

code :

put "<br /><p align='center'>Hello World from LiveCode Application's Server" && the version & \
	"</p><p align='center'>on" && the internet date & "</p> »

configuration :

eeePC Asus X200CA Ubuntu 14.04, Openresty 1.9.7.2 (Lua 5.1.a, LuaJIT 2.1) + ngx.lua sockets proxy --> localhost:9578 --> LC 6.1.3 Application’s Server launched in -ui mode

— 
 
root at pierre-X200CA:/home/pierre# siege -b -c 100 -r 50 -q http://192.168.1.15/lua
      done.

Transactions:		        		5000 hits
Availability:		      			100.00 %
Elapsed time:		        		0.69 secs
Data transferred:	        		0.65 MB
Response time:		        	0.01 secs
Transaction rate:	     			7246.38 trans/sec
Throughput:		        		0.94 MB/sec
Concurrency:		       			52.52
Successful transactions:        		5000
Failed transactions:	           		0
Longest transaction:	        	0.37
Shortest transaction:	        	0.00

code :

ngx.say("<br /><p align='center'>Hello World from Openresty "..ngx.config.nginx_version.." / Ngx.Lua "..ngx.config.ngx_lua_version.." !</p><p align='center'>on "..ngx.localtime().." +0100 ("..ngx.var.server_port..")</p> ")

configuration :

eeePC Asus X200CA Ubuntu 14.04, Openresty 1.9.7.2 (Lua 5.1.a, LuaJIT 2.1) + ngx.lua script

— 

As the tests reports, an Openresty/Lua powered application’s server could be twice as fast as a Nginx/Livecode application’s server one but, at this point, this assertion still needs to be verified as long as the final performances will be directly impacted by the way both solutions handles memory management against heavy loads.

At this point, i can confirm that LC application’s server (and before it, MC and Rev ones) i had to setup over the 15 last years went always perfectly reliables in about this. 

On the other hand, the clear and functional programming oriented Nginx and Lua platforms lets us expect that n-tier apps developed and running over the Openresty platform have reasonable chances to stay twice as fast than the ones developed on top of Nginx + Livecode application’s server.

Note : more there unreported tests went done against the Apache 2, OpenLiteSpeed and Lighttpd HTTPd servers on both the Ubuntu 14.04 and Mac OS X El Capitan platforms. None of those HTTPd servers could really compete with Nginx in a case or an other (some times yes, some time not !). 

In about the El Capitan case, my surprise went high to discover how slow went my MacBooks Pro i5 (2.4 Ghz, 2.5 Ghz, 8 Go RAM and SSD 512 Go drives on both). In having them sets up to handle the Apache+PHP+Livecode application’s server stack’s work in slave round-robin mode where the eeePC powered Nginx went configured to proxy the requests to the Macs, an average of 3000 connections/second went out of the tests (PHP proxied). Should i have replaced the MacBooks by two new eeePC and 4400 (php proxy) to 7200 (lua proxy) connections/second would probably have being there.

In all cases, anyone, out there, deploying LC CGI server applications, those embedded on top of RevIgniter ones included, should really choose to switch them to the Nginx + Lua proxy + Livecode application’s server [ + RevIgniter ] way to go. Anyone interested in such a migration process is welcome to contact me off-list for a free cotation.

--

The next step ? Because most of the well known and used Cart scripts are still mostly very slow (PHP) and less reliable (JVM heap memory redundant outrages on the Java side) than their should be (Java : SAP Hybris, Oracle ATG, Websphere Commerce,…; PHP : Magento, Prestashop, Drupal Commerce,...), i expect that it should be a good initiative to build and market (out of a well engineered existing GPL3 PHP Cart script; there are some ones available around…) a GPL3 licensed Cart script port to :

1.- Openresty / Livecode application’s server / MySQL / PostgreSQL platform, if adequate marketing/sponsoring resources can be involved in the project;

2.- Openresty / LuaJIT / ngx.Lua / MySQL / PostgreSQL platform, if adequate marketing/sponsoring resources can be involved in the project;

Anyone interested in supporting such an initiative will be welcome to joint me off-list.

--

Thanks for reading.

Warm Regards,

Pierre
--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.com





More information about the use-livecode mailing list