Windows Firewall degrades IIS performance

firewalliisperformancewindows

(Note: I went through the related questions list and couldn't find one that answers this situation.)

I'm running into an issue whose cause is difficult to spot but is easy to describe: if Windows Firewall and some related services (Windows Firewall, IKE, IPSec Policyagent, Base Filtering Engine) are stopped, then IIS performance doubles (from aprox. 650 to 1300 RPS).

Needless to say, stopping Windows Firewall is not an option.

Repro scenario is plain simple: just create an IIS web site and serve a single image i.e. http://server:9876/image.png. While CPU stays low with and without firewall enabled, CPU Privileged Time % increases in comparison with User Time %.

Has someone seen this before? Are we missing a configuration setting or else?

Environment is Windows Server Enterprise 2008 SP2, II7. Thanks.

Best Answer

Of course the Windows Firewall will degrade performance.

It has to inspect all packets in and out of the server.

That takes CPU.

If you need to increase performance on the server, then you will have to turn off the Windows Firewall and install a hardware firewall instead.