programming4us
programming4us
WEBSITE

IIS 7.0 : Striking a Balance Between Security and Performance - How to Measure Overhead

2/9/2011 8:59:34 AM
Why do you measure overhead on your server? Let’s compare it with measuring overhead in any business. Each business has monthly rent, utilities, and labor costs. These types of fixed costs are overhead. This analogy helps illustrate the fact that every server has some base resources that are overhead to the system.

Security can add overhead to any application and server. Depending on your requirements, it could add a delay and affect overall application performance. Security also costs some performance gains. For example, depending on your architecture, you can expect Secure Sockets Layer (SSL) processing to affect overall performance, both at the server and application level.

Following is an example of how you can establish the baseline for your server and worker process size (w3wp.exe) before you put any applications, modules, and load on the system. The example uses a server with Windows Server 2008 Enterprise edition with the Default IIS 7.0 install workload:

1.
Install the Default IIS workload, which serves static content with anonymous access.


2.
Open Internet Explorer and type http://localhost.

3.
After you browse http://localhost, a w3wp.exe process should show up in Windows Task Manager. Click the Processes tab and locate the memory footprint (for this example, it’s about 3.1 megabytes [MB]).

4.
If you want to see which dynamic-link libraries (DLLs) are loaded into the w3wp.exe worker process, open a command prompt and type tasklist /M /FI “Imagename eq w3wp.exe”. Here is an example of the output you will see.

Image Name                     PID Modules
===================== ======== ============================================
w3wp.exe 3572 ntdll.dll, kernel32.dll, ADVAPI32.dll,
RPCRT4.dll, msvcrt.dll, USER32.dll,
GDI32.dll, ole32.dll, IISUTIL.dll,
CRYPT32.dll, MSASN1.dll, USERENV.dll,
Secur32.dll, WS2_32.dll, NSI.dll,
IMM32.DLL, MSCTF.dll, LPK.DLL,USP10.dll,
NTMARTA.DLL, WLDAP32.dll, PSAPI.DLL,
SAMLIB.dll, w3wphost.dll, OLEAUT32.dll,
nativerd.dll, XmlLite.dll, IISRES.DLL,
rsaenh.dll, mscoree.dll, SHLWAPI.dll,
comctl32.dll, mscorwks.dll, MSVCR80.dll,
CLBCatQ.DLL, mlang.dll, iiscore.dll,
W3TP.dll, w3dt.dll, HTTPAPI.dll,slc.dll,
faultrep.dll, VERSION.dll, NLAapi.dll,
IPHLPAPI.DLL, dhcpcsvc.DLL, DNSAPI.dll,
WINNSI.DLL, dhcpcsvc6.DLL, mswsock.dll,
winrnr.dll, napinsp.dll, wshtcpip.dll,
wship6.dll, rasadhlp.dll, cachuri.dll,
cachfile.dll, cachtokn.dll,cachhttp.dll,
compstat.dll, defdoc.dll, dirlist.dll,
protsup.dll, static.dll, authanon.dll,
modrqflt.dll, custerr.dll, loghttp.dll,
iisreqs.dll, WSOCK32.dll, authbas.dll,
authsspi.dll, NETAPI32.dll


Note

Although this list of DLLs appears to include a lot of entries, most of the DLLs are required by the core IIS engine. Some modules such as Default Documents (defdoc.dll) are optional and could be removed. This example uses the Default install of IIS. If necessary, you could reduce the number of optional role services, which would reduce the number of DLLs loaded. The only way to really know whether or not you can reduce the number of optional role services is to bring up a server in an isolated environment and test your configuration.


Here is an example from a server running Windows Server 2008 Server Core. The w3wp.exe process is approximately 2.5 MB in this example.

Image Name                     PID Modules
===================== ======== ============================================
w3wp.exe 804 ntdll.dll, kernel32.dll, ADVAPI32.dll,
RPCRT4.dll, msvcrt.dll, USER32.dll,
GDI32.dll, ole32.dll, IISUTIL.dll,
CRYPT32.dll, MSASN1.dll, USERENV.dll,
Secur32.dll, WS2_32.dll, NSI.dll,
IMM32.DLL, MSCTF.dll, LPK.DLL,USP10.dll,
NTMARTA.DLL, WLDAP32.dll, PSAPI.DLL,
SAMLIB.dll, w3wphost.dll, OLEAUT32.dll,
nativerd.dll, XmlLite.dll, IISRES.DLL,
rsaenh.dll, CLBCatQ.DLL, mlang.dll,
comctl32.dll, SHLWAPI.dll, iiscore.dll,
W3TP.dll, w3dt.dll, HTTPAPI.dll,slc.dll,
faultrep.dll, VERSION.dll, mswsock.dll,
DNSAPI.dll, NLAapi.dll, IPHLPAPI.DLL,
dhcpcsvc.DLL, WINNSI.DLL, dhcpcsvc6.DLL,
wshtcpip.dll, wship6.dll, cachuri.dll,
cachfile.dll, cachtokn.dll,cachhttp.dll,
compstat.dll, defdoc.dll, dirlist.dll,
protsup.dll, static.dll, authanon.dll,
modrqflt.dll, custerr.dll, loghttp.dll,
iisreqs.dll, WSOCK32.dll, gzip.dll


This worker process baseline exercise shows you how to determine how big your w3wp process will be and which DLLs are loaded. If you add modules, you can run through the exercise again and see how your memory footprint has changed.

Table 1 lists the new WAS_W3WP Reliability And Performance Counter (perfmon) counters in IIS 7.0.

Table 1. WAS_W3WP Counters
Counter NameDescription
Total Health pingsTotal number of health pings received by the process
Total Runtime Status QueriesTotal number of Runtime Status queries received by the process
Health Ping Reply LatencyTime, in 100-nanosecond intervals, taken by worker process to reply to last health ping
Active listener channelsNumber of currently active listener channels in the worker process
Active protocol handlersNumber of currently active protocol handlers in the worker process
Total WAS Messages ReceivedTotal number of messages received by the worker process from Web Admin Service
Messages Sent to WASTotal count of messages sent to WAS
Total Requests ServedTotal number of requests served by the worker process; this counter is meaningful only when request-based recycling is enabled for the application pool
Total Messages Sent to WASTotal number of messages sent to Web Admin Service by the worker process

The new W3SVC_W3WP Reliability and Performance Counter (perfmon) counters in IIS 7.0 are listed in Table 2.

Table 2. W3SVC_W3WP Counters in IIS 7.0
Counter NameDescription
Total HTTP Requests ServedTotal number of HTTP requests served by the worker process
Requests/SecHTTP requests/sec being processed by the worker process
Active RequestsCurrent number of requests being processed by the worker process
Total ThreadsTotal number of threads available to process requests in the worker process
Active Threads CountNumber of threads actively processing requests in the worker process
Maximum Threads CountMaximum number of threads to which the thread pool can grow as needed
Current File Cache Memory UsageCurrent number of bytes used by user-mode file cache.
Maximum File Cache Memory UsageMaximum number of bytes used by user-mode file cache.
Output Cache Current Memory UsageCurrent number of bytes used by output cache
Current Files CachedCurrent number of files whose contents are present in user-mode cache
Total Files CachedTotal number of files whose contents were ever added to the user-mode cache (since service startup)
File Cache HitsTotal number of successful lookups in the user-mode file cache (since service startup)
File Cache MissesTotal number of unsuccessful lookups in the user-mode file cache (since service startup)
File Cache FlushesTotal number of files removed from the user-mode cache (since service startup)
Active Flushed EntriesNumber of file handles cached in user-mode that will be closed when all current transfers complete
Total Flushed FilesTotal number of file handles that have been removed from the user-mode cache (since service startup)
Current URIs CachedURI information blocks currently in the user-mode cache
Total URIs CachedTotal number of URI information blocks added to the user-mode cache (since service startup)
URI Cache HitsTotal number of successful lookups in the user-mode URI cache (since service startup)
URI Cache MissesTotal number of unsuccessful lookups in the user-mode URI cache (since service startup)
URI Cache FlushesTotal number of URI cache flushes (since service startup)
Total Flushed URIsThe number of URI information blocks that have been removed from the user-mode cache (since service startup)
Current Metadata CachedThe number of metadata information blocks currently present in user-mode cache
Total Metadata CachedTotal number of metadata information blocks added to the user-mode cache (since service startup)
Metadata Cache HitsTotal number of successful lookups in the user-mode metadata cache (since service startup)
Metadata Cache MissesTotal number of unsuccessful lookups in the user-mode metadata cache (since service startup)
Metadata Cache FlushesTotal number of user-mode metadata cache flushes (since service startup)
Total Flushed MetadataTotal number of metadata information blocks removed from the user-mode cache (since service startup)
Output Cache Current ItemsNumber of items current present in output cache
Output Cache Total HitsTotal number of successful lookups in output cache (since service startup)
Output Cache Total MissesTotal number of unsuccessful lookups in output cache (since service startup)
Output Cache Total FlushesTotal number of flushes of output cache (since service startup)
Output Cache Total Flushed ItemsTotal number of items flushed from output cache (since service startup)
File Cache Hits / secRate of successful lookups in file cache during last sample interval
Metadata Cache Hits / secRate of successful lookups in metadata cache during last sample interval
Uri Cache Hits / secRate of successful lookups in URI cache during last sample interval
File Cache Misses / secRate of unsuccessful lookups in file cache during last sample interval
Metadata Cache Misses / secRate of unsuccessful lookups in metadata cache during last sample interval
Output Cache Misses / secRate of unsuccessful lookups in output cache during last sample interval
Uri Cache Misses / secRate of unsuccessful lookups in URI cache during last sample interval
Total HTTP Requests ServedTotal number of HTTP requests served by the worker process
Requests / SecHTTP requests / sec being processed by the worker process
Other  
 
Video
PS4 game trailer XBox One game trailer
WiiU game trailer 3ds game trailer
Top 10 Video Game
-   Minecraft Mods - MAD PACK #10 'NETHER DOOM!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #9 'KING SLIME!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #2 'LAVA LOBBERS!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Minecraft Mods - MAD PACK #3 'OBSIDIAN LONGSWORD!' with Vikkstar & Pete (Minecraft Mod - Mad Pack 2)
-   Total War: Warhammer [PC] Demigryph Trailer
-   Minecraft | MINIONS MOVIE MOD! (Despicable Me, Minions Movie)
-   Minecraft | Crazy Craft 3.0 - Ep 3! "TITANS ATTACK"
-   Minecraft | Crazy Craft 3.0 - Ep 2! "THIEVING FROM THE CRAZIES"
-   Minecraft | MORPH HIDE AND SEEK - Minions Despicable Me Mod
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 92 "IS JOE DEAD?!"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 93 "JEDI STRIKE BACK"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 94 "TATOOINE PLANET DESTRUCTION"
-   Minecraft | Dream Craft - Star Wars Modded Survival Ep 95 "TATOOINE CAPTIVES"
-   Hitman [PS4/XOne/PC] Alpha Gameplay Trailer
-   Satellite Reign [PC] Release Date Trailer
Game of War | Kate Upton Commercial
programming4us
 
 
programming4us