Rép : some AB testing ...
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@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 "Hello World from LiveCode CGI Server" && the version & \ "on" && the internet date & "" configuration : eeePC Asus X200CA Ubuntu 14.04, Openresty 1.9.7.2 + FCGIWrap + .LC script + LC CGI Server 7.1.1 — root@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 "Hello World from LiveCode Application's Server" && the version & \ "on" && the internet date & "" 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@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 "Hello World from LiveCode Application's Server" && the version & \ "on" && the internet date & " » 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@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("Hello World from Openresty "..ngx.config.nginx_version.." / Ngx.Lua "..ngx.config.ngx_lua_version.." !on "..ngx.localtime().." +0100 ("..ngx.var.server_port..") ") 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.
re: some AB testing ...
Hi Livecoders, Question 1 : is Livecode application’s server really faster than Livecode CGI server running on Nginx, OpenLiteSpeed or Apache2 and how to get this proven (in counting successfully TCP connexions only) ? Just se below : #http://localhost:80/index.lc; # eeePCU : Nginx + FCGIWrap + LC CGI Server 7.1.1 --> 60 conn/sec #http://localhost:81/index.lc; # eeePCU : OpenLiteSpeed CGI + LC CGI Server 7.1.1 --> 60 conn/sec #http://localhost:82/index.lc; # eeePCU : Apache 2.4.7 CGI + LC CGI Server 7.1.1 --> 60 conn/sec In the three cases, it’s the same LC CGI server witch execute the following code on a little 350 euros eeePC (ubuntu 14.04, indeed 150% faster than both of my MacBooks i5 costing 1800 euros each !) : put "Hello World from LiveCode CGI Server" && the version & \ "on" && the internet date & "" Question 2 : is Livecode applications server really faster than PHP running on OpenResty in FMP/FastCGI mode and how to get this proven (in counting successfully TCP connexions only) ? Just se below : #http://localhost/index.php;# eeePCU : Nginx + FMP/FastCGI + PHP 5.5.9 # + PHP sockets proxy --> localhost:9578 # --> LC 6.1.3 APP Server -ui (eeePCU) --> 2200 conn/sec #http://localhost/lc; # eeePCU : Openresty 1.9.7.2 (LuaJIT 5.1.a) # + ngx.lua sockets proxy --> localhost:9578 # --> LC 6.1.3 APP Server -ui (eeePCU) --> 3600 conn/sec In both cases, it’s the same LC application’s server witch execute the following code on a little 350 euros eeePC (ubuntu 14.04, still 150% faster than both my MacBooks i5 costing 1800 euros each !) : put "Hello World from OpenLiteSpeed's LiveCode CGI Server" && the version & \ "on" && the internet date & "" Note: all tests done at twice in using both ApacheBench 2.3 Revision 1528965 and Siege 3.0.5 Stay tuned. More to come soon! Thanks for reading, Pierre -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
re: some AB testing ...
> Hi Livecoders, > > Question 1 : is Livecode application’s server really faster than Livecode CGI > server running on Nginx, OpenLiteSpeed or Apache2 and how to get this proven > (in counting successfully TCP connexions only) ? Just se below : > > #http://localhost:80/index.lc; # eeePCU : Nginx + FCGIWrap + > LC CGI Server 7.1.1 --> 60 conn/sec > #http://localhost:81/index.lc; # eeePCU : OpenLiteSpeed CGI + > LC CGI Server 7.1.1 --> 60 conn/sec > #http://localhost:82/index.lc; # eeePCU : Apache 2.4.7 CGI + > LC CGI Server 7.1.1 --> 60 conn/sec > > In the three cases, it’s the same LC CGI server witch execute the following > code on a little 350 euros eeePC (ubuntu 14.04, indeed 150% faster than both > of my MacBooks i5 costing 1800 euros each !) : > > put "Hello World from LiveCode CGI Server" && the > version & \ > "on" && the internet date & "" > > > Question 2 : is Livecode applications server really faster than PHP running > on OpenResty in FMP/FastCGI mode and how to get this proven (in counting > successfully TCP connexions only) ? Just se below : > > #http://localhost/index.php;# eeePCU : Nginx + FMP/FastCGI > + PHP 5.5.9 > # + PHP sockets > proxy --> localhost:9578 > # --> LC 6.1.3 > APP Server -ui (eeePCU) --> 2200 conn/sec > > #http://localhost/lc; # eeePCU : Openresty > 1.9.7.2 (LuaJIT 5.1.a) > # + ngx.lua > sockets proxy --> localhost:9578 > # --> LC 6.1.3 > APP Server -ui (eeePCU) --> 3600 conn/sec > > > In both cases, it’s the same LC application’s server witch execute the > following code on a little 350 euros eeePC (ubuntu 14.04, still 150% faster > than both my MacBooks i5 costing 1800 euros each !) : the mistake : > > put "Hello World from OpenLiteSpeed LiveCode CGI > Server" && the version & \ > "on" && the internet date & " » seems that copying via the adequate edit menu item only works under LC 6.1.3 / ubuntu 14.04 (nope via mouse right) the correction : put "Hello World from LiveCode Application's Server" && the version & \ "on" && the internet date & " » ... > Note: all tests done at twice in using both ApacheBench 2.3 Revision 1528965 > and Siege 3.0.5 > > Stay tuned. More to come soon! > > Thanks for reading, > > Pierre > -- > Pierre Sahores > mobile : 06 03 95 77 70 > www.sahores-conseil.com -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: some AB testing ...
Pierre Sahores wrote: Le 9 févr. 2016 à 01:27, Richard Gaskin a écrit : Pierre Sahores wrote: > Story made short : Appart the amazing Lua platform (preferably set > as an Openresty one), well configured LC application’s servers > still outperforms anything available around (Websphere, Tomcat, > PHP5/7, Perl5, NodeJS, Go, Python, RoR,…). In-between, LC > application’s server is 60 times faster than the stock’s Livecode > CGI Server. ... Can we have the story made long? :) Only related to the test config set-up using voluntarily a very minimalistic cluster of 3 low-powered boxes. Nginx does perfectly the load-balancer job (very low top average) but OpenLiteSpeed should have being a good proposal too in the same rôle (untested), where lighttpd or apache2 seemed less productive, at least, at first glance. What do you mean by "LC application’s servers"? A socket server? Precisely. Can you share some code? Not at this time. I look forward to when you can. I use standalones as CGIs exclusively, using LC Server only for testing to help others. I've not considered a possible performance gain in doing so; I do it mostly to have things that are testable in the IDE. It would be helpful to be able to pin down where the performance difference lie so Server can be made at least as efficient as using a standalone for CGI work - speed is so much more critical in a CGI context than on the desktop. As for socket servers, last night I ran a test pitting a slim HTTPd made in LC (inspired by Raney's mchttpd.mc, but using new code), and I found good news and bad news: The bad news is that even a slender HTTPd in LC was only slightly more than half as fast as Apache2. The good news was that a slender HTTPd thrown together in a couple hours in LC scripts was more than half as fast as the highly-optimized C written by a team of specialists in Apache2! :) HTTP isn't the heaviest protocol in the world, but it's also not the lightest. It may be a bit much to expect that a LiveCode script could outperform Apache, and far more realistic to compare it to PHP and Python, where it's not surprising it performs very favorably. But if time and circumstances permit, it would be helpful to learn whatever details you can share on your experiments. Your work has always been among the most inspiring in our community with regard to using LC on servers, and we can learn much from your good efforts. -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: some AB testing ...
Is that the maximum theoretical value? The actual connections per second would depend on the size of the data and how much processing it needs, right? Also, what is Livecode Application Server? On Mon, Feb 8, 2016 at 4:04 PM, Pierre Sahoreswrote: > Hi Livecoders, > > Story made short : Appart the amazing Lua platform (preferably set as an > Openresty one), well configured LC application’s servers still outperforms > anything available around (Websphere, Tomcat, PHP5/7, Perl5, NodeJS, Go, > Python, RoR,…). In-between, LC application’s server is 60 times faster than > the stock’s Livecode CGI Server. Using Nginx as the load balancer of the > same LC app running on clustered front-end servers can make a very reliable > scalable configuration : 1500 connections for each server added to the > cluster. In taking care to scale the ACID-SQL backend cluster as attendee, > the platform can handle very high-end solutions at a fraction of the cost > of more known main stream proposals. > > What the story don’t tell is that the still mono-theaded LC engine don’t > crashes nor slowdown against heavy loads where Java powered ones does > (mostly because Java’s heap space shared memory unreliability and the cache > misconfiguration surprises) and PHP too, because too many unreliable > frameworks used in front of it (Symphony 2, etc…). > > ... > > upstream proxy_cluster { > > # Test protocol : ab -c 100 -n 5000 http://192.168.1.15/ > #(ApacheBench 2.3 Revision 1528965) > # LC CGI Server = Livecode Server (community and > commercial editions) MacOSX version 7.1.1 > # LC App Server = Livecode commercial standalone MacOSX > 6.6.5 (note : 7.1.1 35% slower) > # PHP sockets proxy = TCP sockets client proxying REST > GET/POST requests to LC App Server > # eeePCU = Asus X200CA 1.5 Ghz Ubuntu 14.04 + multi web > configs on ports 80 to 84 (see below) > # MBPi24 = MacBook Pro i5 2.4 Ghz running Apache 2.4.16 + > Apache 2.0 Handler + PHP 5.6.17 > # MBPi25 = MacBook Pro i5 2.5 Ghz running Apache 2.4.16 + > Apache 2.0 Handler + PHP 5.6.17 > > #server localhost:80; # eeePCU : Nginx + > FCGIWrap + LC CGI Server --> 25 conn/sec > #server localhost:81; # eeePCU : OpenLiteSpeed > CGI + LC CGI Server--> 25 conn/sec > #server localhost:82; # eeePCU : Apache 2.4.7 > CGI + LC CGI Server --> 25 conn/sec > > #server 192.168.1.21:80;# MBPi24 : Apache 2.4.16 > CGI + LC CGI Server--> 25 conn/sec > #server 192.168.1.25:80;# MBPi25 : Apache 2.4.16 > CGI + LC CGI Server--> 25 conn/sec > > #server localhost:80; # eeePCU : Nginx + > FCGIWrap + Perl 5.18.2 > # + Perl > sockets proxy --> 192.168.1.25:9578 > # --> LC > 6.6.5 APP Server (MBPi525) --> 40 conn/sec > > #server 192.168.1.21:80;# MBPi24 : PHP sockets > proxy + LC APP Server--> 125 conn/sec > #server 192.168.1.25:80;# MBPi25 : PHP sockets > proxy + LC APP Server--> 125 conn/sec > #server 192.168.1.25:80;# MBPi25 : FastCGI > EAppClass + LC APP Server--> 125 conn/sec > > #server localhost:84; # eeePCU : Nginx + > FMP/FastCGI + PHP 5.5.9 --> 700 conn/sec > #server localhost:82; # eeePCU : Apache 2.4.7 + > A 2.0 + PHP 5.5.9 --> 800 conn/sec > #server localhost:81; # eeePCU : OpenLiteSpeed + > V6.8 + PHP 5.6.14--> 1000 conn/sec > > #server localhost:80; # eeePCU : Nginx + > FMP/FastCGI + PHP 5.5.9 > # + PHP > sockets proxy --> 192.168.1.25:9578 > # --> LC > 6.6.5 APP Server (MBPi525) --> 1500 conn/sec > > server localhost:81;# eeePCU : > OpenLiteSpeed + V6.8 + PHP 5.6.14 > # + PHP > sockets proxy --> 192.168.1.21:9578 > # --> LC > 6.6.5 APP Server (MBPi524) --> 1500 conn/sec > > server localhost:82;# eeePCU : Apache > 2.4.7 + A 2.0 + PHP 5.5.9 > # + PHP > sockets proxy --> 192.168.1.25:9578 > # --> LC > 6.6.5 APP Server
Re: some AB testing ...
> Le 9 févr. 2016 à 01:27, Richard Gaskina écrit : > > Pierre Sahores wrote: > > > Story made short : Appart the amazing Lua platform (preferably set as > > an Openresty one), well configured LC application’s servers still > > outperforms anything available around (Websphere, Tomcat, PHP5/7, > > Perl5, NodeJS, Go, Python, RoR,…). In-between, LC application’s > > server is 60 times faster than the stock’s Livecode CGI Server. > > Using Nginx as the load balancer of the same LC app running on > > clustered front-end servers can make a very reliable scalable > > configuration : 1500 connections for each server added to the > > cluster. In taking care to scale the ACID-SQL backend cluster as > > attendee, the platform can handle very high-end solutions at a > > fraction of the cost of more known main stream proposals. > > Can we have the story made long? :) Only related to the test config set-up using voluntarily a very minimalistic cluster of 3 low-powered boxes. Nginx does perfectly the load-balancer job (very low top average) but OpenLiteSpeed should have being a good proposal too in the same rôle (untested), where lighttpd or apache2 seemed less productive, at least, at first glance. > > What do you mean by "LC application’s servers"? A socket server? Precisely. > Can you share some code? Not at this time. The final release will probably not rely on a PHP sockets proxy script anymore but on a direct FastCGI set-up with the advantage to provide a way to relaunch automatically the app’s sever instances in case of need; an ExternalAppClass directive will replace the PHP sockets proxy script in the new set-up. Each app node will rely on its own localhost web server instead of on the currents ones, for yet, running on the box witch hosts the Nginx proxy server. The ACID-SQL back-end cluster will, in a first time, runs only a PostgreSQL 9 instance and, if needed, (but i’m reserved on this point, as long as PostgreSQL should be able to handle 10 of thousands of connections at once without stress), a master instance dedicated to write operations and two slave nodes dedicated to read operations and master writes replications (one box peer PostgreSQL instance). To avoid unwanted side-effects, this configuration will not rely on UDP sockets « à la Oracle VLAN’s » at all to synchronize data flows in-between db nodes. Cheers, Pierre > > Exciting stuff - eager to learn more > > -- > Richard Gaskin > Fourth World Systems > Software Design and Development for the Desktop, Mobile, and the Web > > ambassa...@fourthworld.comhttp://www.FourthWorld.com > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode -- Pierre Sahores mobile : 06 03 95 77 70 www.sahores-conseil.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
some AB testing ...
Hi Livecoders, Story made short : Appart the amazing Lua platform (preferably set as an Openresty one), well configured LC application’s servers still outperforms anything available around (Websphere, Tomcat, PHP5/7, Perl5, NodeJS, Go, Python, RoR,…). In-between, LC application’s server is 60 times faster than the stock’s Livecode CGI Server. Using Nginx as the load balancer of the same LC app running on clustered front-end servers can make a very reliable scalable configuration : 1500 connections for each server added to the cluster. In taking care to scale the ACID-SQL backend cluster as attendee, the platform can handle very high-end solutions at a fraction of the cost of more known main stream proposals. What the story don’t tell is that the still mono-theaded LC engine don’t crashes nor slowdown against heavy loads where Java powered ones does (mostly because Java’s heap space shared memory unreliability and the cache misconfiguration surprises) and PHP too, because too many unreliable frameworks used in front of it (Symphony 2, etc…). ... upstream proxy_cluster { # Test protocol : ab -c 100 -n 5000 http://192.168.1.15/ #(ApacheBench 2.3 Revision 1528965) # LC CGI Server = Livecode Server (community and commercial editions) MacOSX version 7.1.1 # LC App Server = Livecode commercial standalone MacOSX 6.6.5 (note : 7.1.1 35% slower) # PHP sockets proxy = TCP sockets client proxying REST GET/POST requests to LC App Server # eeePCU = Asus X200CA 1.5 Ghz Ubuntu 14.04 + multi web configs on ports 80 to 84 (see below) # MBPi24 = MacBook Pro i5 2.4 Ghz running Apache 2.4.16 + Apache 2.0 Handler + PHP 5.6.17 # MBPi25 = MacBook Pro i5 2.5 Ghz running Apache 2.4.16 + Apache 2.0 Handler + PHP 5.6.17 #server localhost:80; # eeePCU : Nginx + FCGIWrap + LC CGI Server --> 25 conn/sec #server localhost:81; # eeePCU : OpenLiteSpeed CGI + LC CGI Server--> 25 conn/sec #server localhost:82; # eeePCU : Apache 2.4.7 CGI + LC CGI Server --> 25 conn/sec #server 192.168.1.21:80;# MBPi24 : Apache 2.4.16 CGI + LC CGI Server--> 25 conn/sec #server 192.168.1.25:80;# MBPi25 : Apache 2.4.16 CGI + LC CGI Server--> 25 conn/sec #server localhost:80; # eeePCU : Nginx + FCGIWrap + Perl 5.18.2 # + Perl sockets proxy --> 192.168.1.25:9578 # --> LC 6.6.5 APP Server (MBPi525) --> 40 conn/sec #server 192.168.1.21:80;# MBPi24 : PHP sockets proxy + LC APP Server--> 125 conn/sec #server 192.168.1.25:80;# MBPi25 : PHP sockets proxy + LC APP Server--> 125 conn/sec #server 192.168.1.25:80;# MBPi25 : FastCGI EAppClass + LC APP Server--> 125 conn/sec #server localhost:84; # eeePCU : Nginx + FMP/FastCGI + PHP 5.5.9 --> 700 conn/sec #server localhost:82; # eeePCU : Apache 2.4.7 + A 2.0 + PHP 5.5.9 --> 800 conn/sec #server localhost:81; # eeePCU : OpenLiteSpeed + V6.8 + PHP 5.6.14--> 1000 conn/sec #server localhost:80; # eeePCU : Nginx + FMP/FastCGI + PHP 5.5.9 # + PHP sockets proxy --> 192.168.1.25:9578 # --> LC 6.6.5 APP Server (MBPi525) --> 1500 conn/sec server localhost:81;# eeePCU : OpenLiteSpeed + V6.8 + PHP 5.6.14 # + PHP sockets proxy --> 192.168.1.21:9578 # --> LC 6.6.5 APP Server (MBPi524) --> 1500 conn/sec server localhost:82;# eeePCU : Apache 2.4.7 + A 2.0 + PHP 5.5.9 # + PHP sockets proxy --> 192.168.1.25:9578 # --> LC 6.6.5 APP Server (MBPi525) --> 1500 conn/sec #server localhost:82; # eeePCU : Apache 2.4.7 + mod_lua
Re: some AB testing ...
Pierre Sahores wrote: > Story made short : Appart the amazing Lua platform (preferably set as > an Openresty one), well configured LC application’s servers still > outperforms anything available around (Websphere, Tomcat, PHP5/7, > Perl5, NodeJS, Go, Python, RoR,…). In-between, LC application’s > server is 60 times faster than the stock’s Livecode CGI Server. > Using Nginx as the load balancer of the same LC app running on > clustered front-end servers can make a very reliable scalable > configuration : 1500 connections for each server added to the > cluster. In taking care to scale the ACID-SQL backend cluster as > attendee, the platform can handle very high-end solutions at a > fraction of the cost of more known main stream proposals. Can we have the story made long? :) What do you mean by "LC application’s servers"? A socket server? Can you share some code? Exciting stuff - eager to learn more -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, and the Web ambassa...@fourthworld.comhttp://www.FourthWorld.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode