I have a site deployed to both Windows server 2012 and ubuntu 14.04 and there is a significant performance difference. The code base and DB data is exactly the same.
Windows environment
- Windows Server 2012 in AWS EC2 t2.medium (dual core 4GB ram)
- PHP 5.5 64 bit ts
- Apache 2.4.23
Linux
- Ubuntu 14.04 in AWS EC2 t2.medium (dual core 4GB ram)
- PHP 5.5 64 bit ts
- Apache 2.4
Both site have OpCache enabled.
The execution time (sole PHP execution time, excluding all network traffic)
- Windows: 2.6-2.8s
- Linux: 200-400ms
In windows, what we notice is there is a almost 100% CPU load peak and a 3-4MB IO read peak on single page load.
I have already came across various post in Stackoverflow regarding php performance in windows but we have already applied/tested suggestion from those post to no avil
Any advice would be appreciated!