MVC Performance in IIS – Part I

Recent, I am focusing on MVC/.NET/IIS performance because of my job duty. I have to try and running load test in order to get the number of max thoughput, so that I could figure out a baseline for the web projects in my working company. I then setup a computer to host IIS with MVC projects. Here is what I get,


Hardware:


Web Server
CPU: Core 2 Due E8400
Ram: 4Gb DDR2-800
OS: 64-bit Windows 2008 R2 Enterprise Edition
Data: SQL 2008 Express Edition (for training kit data) + XML files (for my project data)


Client Computer
CPU: Dual-Core E5300
Ram: 4Gb DDR2-800
OS: 32-bit Windows 2008 Enterprise Edition SP2


Test tool
Apache JMeter v2.3.4 with Java Runtime v6.0.200.2


Scenario One


  • Hosting MVC 1.0 Training Kit
  • Hosting as Application in Virtual Directory in Default Website
  • Separate Application Pool from default website
  • Testing with 100 threads, 500 threads, 1000 threads and 1500 threads
  • Max thoughput
    • Default Page: ~200/sec
    • About Page: ~190/sec
    • Customers Page: ~73/sec

Scenario Two


  • Hosting MVC 1.0 Training Kit
  • Hosting in New Website
  • Separate Application Pool
  • Max thoughput
    • Default Page: ~2980/sec
    • Customers Page: ~388/sec

Scenario Three


  • Hosting MVC 2.0 project in my working company
  • Hosting in New Website
  • Separate Application Pool
  • Max thoughput
    • Static data from class: ~410/sec
    • Opening XML data file: ~274/sec

Interesting, this is the first time I try to do some benchmark. And I found out the performance betweenVirtual Directory under Default Website and New Website is hugh. It is 15 times difference. I tried to look around and still cannot figure out the reason. I will come back  here later when I have some updates.

P.S., the above number of the max thoughput are just for reference. They might be up or down with difference hardware and applications installed. In my testing, Server CPU is running up to 100% already. So the bottleneck may be SQL service in same machine, network loading, Machine is not a “REAL” server hardware….etc.

Where is AdminPak in Windows 2008 and R2 ?

If you have been administering your Windows 2003 environment from XP or Vista, you have probably installed Adminpak.msi. Well, with the launch of Windows 2008, adminpak has disappeared.

That is now known as RSAT. (Remote Server Administration Tools). (there is another blog from me about RSAT in Windows Server 2012)
RSAT contains the following tools:

Role Administration Tools:

•Active Directory Certificate Services Tools
•Active Directory Domain Services (AD DS) Tools
•Active Directory Lightweight Directory Services (AD LDS) Tools
•DHCP Server Tools
•DNS Server Tools
•File Services Tools
•Network Policy and Access Services Tools
•Terminal Services Tools
•Universal Description, Discovery, and Integration (UDDI) Services Tools

Feature Administration Tools:

•BitLocker Drive Encryption Tools
•Failover Clustering Tools
•Group Policy Management Tools
•Network Load Balancing Tools
•SMTP Server Tools
•Storage Manager for SANs Tools
•Windows System Resource Manager Tools

The following tools are fully supported for managing computers running Windows Server 2003:

•Active Directory Domain Services (AD DS) Tools
•Active Directory Lightweight Directory Services (AD LDS) Tools
•Active Directory Certification Authority Tools
•DHCP Server Tools
•DNS Server Tools
•Terminal Services Tools
•Universal Description, Discovery, and Integration (UDDI) Services Tools
•Group Policy Management Tools
•Network Load Balancing Tools

Installing Active Directory Domain Services Tools on a member server that is running Windows Server 2008 or Windows Server 2008 R2 You can use the following procedure to add the Active Directory Domain Services Tools component of RSAT to a member server.

Membership in Administrators, or equivalent, is the minimum required to complete this procedure. Review details about default group memberships at http://go.microsoft.com/fwlink/?LinkID=150761.

To install Active Directory Domain Services Tools on a member server

1.Open Server Manager. To open Server Manager, on the Start menu, click Administrative Tools, and then click Server Manager. 2.In the console tree, right-click Features, and then click Add Features. 3.In Features, expand Remote Service Administration Tools and Role Administration Tools:


a.On a Windows Server 2008 member server, expand Active Directory Domain Services Tools, and then click Active Directory Domain Controllers Tools. b.On a Windows Server 2008 R2 member server, expand AD DS and AD LDS Tools, expand AD DS Tools, and then click AD DS Snap-Ins and Command-Line Tools.


4.Click Next, review the installation information, and then click Install. 5.If you are prompted to restart the computer, restart it before you continue with the next step. Click Yes to restart the server, or click No to restart the server later. 6.After the server restarts, on the Installation Results page of the Resume Configuration Wizard, click Close. The Active Directory Domain Services Administration Tools are available on the Administrative Tools menu.




Installing Active Directory Domain Services Tools on a computer that is running Windows Vista with SP1
Windows Vista with SP1 does not ship with the RSAT installation file. You must first download the appropriate RSAT installation file. For instructions and links to the download locations for the tools, see article 931314 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?LinkID=116179).

Installing Active Directory Domain Services Tools on a computer that is running Windows 7
Windows 7 does not ship with RSAT installation files. You must first download the RSAT installation file. For instructions and links to the download locations for the tools, see Remote Server Administration Tools for Windows 7 (http://go.microsoft.com/fwlink/?LinkId=167131).

Must read articles when get starting with Hyper-V

Recent I have to setup a Win2k8 R2 with Hyper-V role enabled, this is my first time to try Hyper-V. There is only one NIC in my machine. After enabled Hyper-V role, I found out that the Network Adapter now becomes 2 Network Adapter. A new Virtual Network Adapter has created. I then found out that the “physical NIC” only have “Microsoft Virtual Network Switch Protocol” is enabled. All my other service, settings are moved to the new Virtual Network Adapter. And you will found out that there are 3 connection types from the Virtual Network Manager, they are “External”, “Internal Only” and “Private virtual machine network”. And an option “Allow management operating System to share this network adapter”. This option is only applied to Win2k8 R2 Hyper-V. So you could not found this option in Win2k8 Hyper-V




I then browse to internet, search around and found out few very good articles that you must read before you get starting with Hyper-V. You should read them if you are first hand on Hyper-V and then you could get to know more about the change from VMware WorkStation / Virtual PC/ Virtual Server.


Understanding Networking with Hyper-V
http://blogs.msdn.com/virtual_pc_guy/archive/2008/01/08/understanding-networking-with-hyper-v.aspx 


How does basic networking work in Hyper-V?
http://blogs.technet.com/jhoward/archive/2008/06/16/how-does-basic-networking-work-in-hyper-v.aspx 


Configuring Virtual Networks
http://technet.microsoft.com/en-us/library/cc816585.aspx


Process Explorer v12.01 has released


For those who has attended my speaking session ( Windows 7 Performance Investments by MVP Ken Lin) on Day 2 morning in TechDays 2009 @ HK, you may have seen that I have installed and run this tools in order to show what processes are running in my machine. This tool is a very good tool to show all the processes than Windows Task Manager. The unique capabilities of Process Explorer make it useful for tracking down DLL-version problems or handle leaks, and provide insight into the way Windows and applications work. For IT Professionals, you may found out what processes and what files are running in your windows. For Developers, you may check if any of your dependcies dll is running properly with your developed applications.



Process Explorer does not require administrative privileges to run and works on clients running Windows XP and higher (Including IA64) and servers running Windows Server 2003 and higher (Including IA64).


On 1st, April 2010, a newer version, Process Explorer v12.01, has released. It fixed some bugs and added some new wishing features. You can obtain equivalent command-line tools, Handle, ListDLLs and other useful tools at the Sysinternals Web site.