Posts Tagged ‘IIS’

Decrease CPU utilization with Wincache on IIS 7.5/8 for php sites

August 4, 2013 4 comments


I worked a month ago on a php Web Platform that is massively consulted by about 200000 users.

We have applied a good tuning job using these tips and tricks without the wincache module bacause it caused some troubles on IIS 7.5.

We have decided to try the same application on IIS 8 and the results in terms of performances were so good.

To optimize the processor time utilization , we had to use the kernel Output caching in IIS. The selected parameter was “Using file change notification”.

To test the performances, we used the Fastream Web Stress Testster to stress our web site on a server.

1rst case : Kernel cache activated with “Using file change notification” parameter:


However, we have noticed that the dynamic php pages updates take effects after a TTL of 30 sec. For this reason, the wonderful Hamid has suggested to change the parameter of Kernel caching and fix it to “At time intervals” with 1 sec as value.

After applying this configuration, the php updates are resolved with almost the same rates in terms of hits/sec.

But we have forgotten to check the CPU utilization which increases incredibly up to 60% using the same benchmark.

2nd case : Kernel cache activated with “At time intervals” with 1 sec as value:


The question now: how to reduce the CPU utilization? Wincache is the right response. This extension aims to accelerate the php scripts with low CPU utilization. In my case I have applied exactly the steps described in this excellent post which explains the right way to configure Wincache for IIS 7.5 and 8.

Let us now apply the same benchmark and see the results :

3rd case : Kernel cache activated with “At time intervals” with 1 sec as value and wincache:


As you can see the CPU utilization is reduced to approximatively 20%.

That is not all. The hits increase also beacause the waincache is an accelerator and the worker process with its fast cgi threads are able to treat more requests at the same time :

Registered hits without wincache :


Registered hits with wincache :


Hope it is helpful!

Categories: IIS, MS Technologies Tags: , , ,

IIS Web Garden is finally explained!

July 22, 2012 1 comment


I have read some awesome things about the Web Garden feature in IIS (since the 6.0 version). The principle is so simple; executing your Site using multiple worker processes. Logically, this feature aimed to boost your site performances.

My test environnement is a php Web Site running in FastCGI mode on IIS 7.5. This site interacts with a backend SQL Server database. I have used many stress tools and profilers like the Zend performance tool.

Obviously, The first thing to test was the time response of my site. Incredible result: my site is slower!!!!!!!!!!!!

But I have noticed that the number of worker processes increases with the big number of concurrent requests. However, my site is still slower!

I have searched for the reason. Finally, I got the response from this wonderful video;

First of all, I forgot to verify an other important point: the site bandwidth. I noticed that with 2 worker processes, My site could treat more requests. I have obtained these statistics using SCOM.

If my site is slower, the cause is the consumed synchronization time, the cache synchronization and other parameters explained in the video.

My next post will explain, inchaEllah, better my own experience with the Web garden.

Categories: MS Technologies Tags: ,