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
Linux
Both site have OpCache enabled.
The execution time (sole PHP execution time, excluding all network traffic)
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!
Finally got myself an answer to this
The performance difference is due to php function is_dir() perform terrible in Window
Test1: run simple script to loop 1000 times to invoke is_dir()
Test2: profile the code with xdebug and is_dir() sit at top of the list for highest execution time
Some other reference also point out the same issue https://github.com/facebook/hhvm/issues/4431
Hope this post can help others facing the same problem
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.