Windows Performance

Hi,

I am on the PHP Project's Windows Team.

We build, optimize and extensively test the PHP builds for Windows (see: windows.php.net/downloads).

We now include Phalcon in our performance testing.

For the most recent 5.6, 7.0, 7.1 and 7.2 releases, see:

This is measured in Transactions Per Second(TPS); more is better. Servers are reset for each test run. Each test run has a warmup period(not counted) and then runs for 30 minutes at ~100% utilization. For Phalcon, I took the INVO app and modified it to list the companies in a table on the index page which our test then loads (so its a realistic test of MySQLi, ORM and Volt).

Phalcon far exceeds the performance of any application or framework we test (for internal benchmarks we do test PHP on Linux vs PHP on Windows - and all apps run with at least the same performance and reliability on Windows).

With PHP 7.2 and Phalcon 3.3.2, I'm usally getting 750-770 TPS on 4 CPU Cores running on Windows 2016/IIS 10 and MySQL 5.7.

Welcome to PhalconPHP forums, PHP Project team member!

Nice to hear this, but IMHO Windows shall not be used as core stack for PhalconPHP. Not to mention license costs for a server Windows OS etc.

Are those benchmarks published somewhere on php.net?

Yes, those reports are all published on windows.php.net (part of php.net).

Actually, hosting and cloud services (like Azure), the cost is the same.

Its also important for web development: so people can develop their Phalcon apps on a Windows Desktop, run them, test them, and then upload to any server and they'll run the same.

I personally develop everything on WIndows and then transfer to linux server, no problems with compatibility so far.

One of the nasty ones: https://github.com/phalcon/cphalcon/issues/12056

Unsolvable for many devs who only rely on WAMP/XAMPP etc.

I personally develop everything on WIndows and then transfer to linux server, no problems with compatibility so far.

Well then im lucky, I've never had this problem. Good to know thou

Try bencharking your app with above mentioned setup. You'll observe many of those errors in your logs (unless you're using PHP-FPM).

edited May '18

On Windows I'm using nginx + php-cgi.exe -b 127.0.0.1:9123, I don't have any problems, I'm using this code in my bootstrap file:

new \Phalcon\Di\FactoryDefault();
$di = \Phalcon\di::getDefault();

The seemingly useless "new \Phalcon\Di\FactoryDefault();" is doing the trick with initialising session etc.

nginx + php-cgi.exe -b 127.0.0.1:9123

That's why you don't have a problem. People are using apache and have a problem.