Trouble Shooting IIS 8.5 Classic ASP Loading Time - iis-7

So I am migrating a server and can't find out why the new machine / environment is slower than the old one. Here are the facts.
Old Machine
2008 R2 - 3.1ghz quad core Xeon w/ 12gb
SQL2k \ SQL 2008
IIS 7
New Machine
2012 R2 - 2.5ghz 8 core Opteron w/ 16gb
SQL2k \ SQL 2008 \ SQL 2016
IIS 8.5
So here is what I have done. I migrated the codebase onto the new machine. I loaded up SQL2k which I know is not supported and I plan to upgrade. The same page on both machines loads fine. Old machine loads in 10 seconds new machine takes 124 seconds.
Next step was to convert database from 2k to 2016 via 2008. Done with that same load speed 124 seconds. Next changed connections strings from OLEDB to Native 11. That dropped the load time from 124 down to 30 seconds.
Next I went into query manager and ran the SP on both machines. Old machine takes 4 seconds to complete the query. New machine takes less than 2 seconds to run the same query on sql2k but on sql2016 the same query runs in under a second. I then wrote a much more intensive query and ran it on both machines. The old machine took 120 seconds to execute the new machine took 12 seconds in 2016 and about 25 seconds in SQL2k.
So at this point I am assuming it is IIS settings. Next I went to the old machine installed SQL 2016 and loaded it up to test speeds with the new database running on the old server with IIS 7. Zero difference.
I have tried connection string changes with IP vs NAME no difference.
Is there some change in IIS 8.5 that affects classic ASP performance or a setting in 2012R2 that I am missing somewhere? All app pools and sites are exactly the same on both machines.
Any help would be great, thanks
** Added all sql settings are the same also for both sql2k and sql2016 along with IIS settings. Firewall settings also the same. .NET environments all the same too.
** Changed New Machine is 8 Core not 4

Too many cores man.
Some questions - it's this all one site? All one app pool?
Classic asp wasn't written for 8 core machines. In IIS 8.5 there are settings you can set for processor affinity and numa node (memory) affinity. But really only useful if you have separate sites or app pools to run. But before looking at any of that I'd ask you to try an experiment. Make a vm version of your site, set to use 4 cores and 8 gb ram. Deploy two copies to your machine. Test hitting the page in one of them. You may get better performance. You could also try this without vms by setting the site to run in two worker processes (web garden configuration) and bind each process to half the cores.

Just try adding a host file entry IP pointing to the machine name. I understand you are running SQL server in the same machine but still it will make a big difference from my experience.
As #Brain suggested, Web gardens will help a little on high load but I think your issue is just related to the connection speed.

Related

Asp.net web application hosted on IIS7 is responding slow

I have 17 simple data entry applications(.net version is 3.5, designed in asp.net, coding language is c# and database is Oracle 10g) hosted under one application pool which is configured on IIS7 as .Net Framework Version = v2.0, Manged pipeline mode = Classic. My server is Windows server 2008 r2 64 bit with 32 GB ram.
Problem is one of my application started responding slowly, it was working fine before but now even pressing the tab key takes 2 to 3 seconds.
To check the problem I debugged the application in visual studio 2008 and it was working fine, then I configured the IIS7 on my PC and hosted the application from it and it was working fine( surprisingly my pc only have 4GB of ram and 32 bit windows 7 as operating system.)
I also tried DebugDiag on server to check the performance of w3wp.exe but couldn't find anything.
I also compared both the hosted applications (one from my local PC and one from server) using Firebug and fond under the .net tab that application hosted from server is taking more time, but I don't know the reason.
I also know for sure that database is not responding slow.
If someone can advice me how to check the problem that would be great,any advice would be appreciated.
Many thanks.

Cannot instantiate delphi written application.exe using IIS, MVC4, C# and COM

My web application is a web interface for a desktop application called MyApplication.exe. My web application is written in C# (MVC4) that communicates with the MyApplication.exe (written in delphi) via COM-Objects.
When 16 clients invoke the web app via the browser, 16 MyApplication.exe instances will be created on the server:
My Problem: if client number 17 invokes the web application, I get the following exception in my eventlog:
"System Error. Code: 8. Not enough storage is available to process this command."
The process explorer indicates, that the worker process w3wp.exe consumes ~600 MB memory, but the machine has 4 GB RAM.
Note: The created instances will be saved in sessions (inProc).
Im am Using:
MVC4
ASP.NET CLR 4.0
IIS 8
Windows Server 2012 R2 (also occurs on Windows 8.1)
4GB RAM
I tried the following things:
Create instances locally via a VB-Script using COM-Objects. Result: I am able to create ~50 instances of MyApplication.exe with no problems.
Adapted the machine.config using the following entry:
processModel enable="true" memoryLimit="100"
Result: After restarting the worker process, the problem still occurs.
Depending on the user IIS is running under this could be a problem where the non-interactive desktop heap size is an issue. I've ran into this problem involving windows services.
When you run your test application most likely you are running under a different user. You can try adjusting the non-interactive desktop heap size in the registry to see if it resolves this issue:
Below is taken from KB 126962
To correct this problem, increase the size of the desktop heap: Run
Registry Editor (Regedt32.exe). From the HKEY_LOCAL_MACHINE subtree,
go to the following key: \System\CurrentControlSet\Control\Session
Manager\SubSystems Select the Windows value. From the Edit menu,
choose String. Increase the SharedSection parameter.
For Windows NT: SharedSection specifies the system and desktop heaps
using the following format: SharedSection=xxxx,yyyy Add ",256" or
",512" after the yyyy number.
For Windows 2000, Windows XP, and Windows Server 2003: SharedSection
uses the following format to specify the system and desktop heaps:
SharedSection=xxxx,yyyy,zzzz For 32-bit operating systems, increase
the yyyy value to "12288"; Increase the zzzz value to "1024". For
64-bit operating systems, increase the yyyy value to "20480"; Increase
the zzzz value to "1024".
Here is also a similar article for windows vista / 7 KB 947246

IIS 7 app pool optimization

I have several sites running on win 2008 64bit/ IIS 7 with each sites go with a separate application pool (default settings).
The problem is that many of them, very simple and low traffic site, consume lots of memory(100mb - over 1 gb). Most of them are written in c# asp.net 4.0 managed code (linq to sql and entity framework 4-5.0).
say one app pool is at 90000 kb, if i run the web on browser, it could go up to more than 200000 kb. Is it normal ?
So what would i do to keep them cool down without interrupting (much*) the performance ?
Should i lower the default recyling interval ?
Also, anyone know the best solution to monitor/trace memory leak that's easy to use.

Find memory leak in ASP.NET Web App

I'm hosting 7 websites on a single production server (virtual) at 2.53 Ghz (2 CPU) and 8GB of RAM on WIN SERVER 2008 R2 Enterprise 64 Bit.
Web server is IIS 7 and all of the websites are with .NET Framework 4.0 application pool.
My current memory usage is about 4.16 GB out of 8GB and w3wp.exe is the most process which consuming most of the memory usage (about 1.6 GB at this time) followed by sqlservr.exe with (1.5 GB) usage.
What I would like to do is to know which website out of 7 is consuming the most memory so that I could have a look.
I've tried Process Explorer and Resource monitor but it could only show how much rem taken by w3wp.exe but not individual website's usage.
Is there a way where I could pin point the memory hogger?
You could do a memory dump using Microsoft's Debug Diag tool.
Basic process is:
Launch DebugDiag
Cancel Wizard
Click "Processes" tab
Select w3wp
Right-click and select "Create full dump"
Snigger quietly to yourself because you said "dump"
Once dump is complete (snigger again), click "Advanced Analysis" tab
Use the 2 Memory Pressure Analyser scripts to see if you can see what objects are using a lot of memory.
I would advise doing this in combination with Uri May's answer, as otherwise you will likely waste a lot of time.
You can configure each web site to use different app pool, that way you'll have a w3wp.exe process for every web site of the 7 websites you host. After that you can use the tool in the following this link to find out which of the websites is causing the leak by tracing the PID of the w3wp.exe with biggest memory consumption.
In windows task manager you can see which app pool is running each w3wp.exe simply by showing the "user" column. This is because each app pool typically runs with its own user. They made it a bit harder to see this in Windows 2012 server - you need to click on "details" tab first.

Asp.net application bottleneck identification: any suggestion?

We are struggling to find out what could be the ASP.NET application performance decrease when we pass from our staging server to our production server and we would like to hear from you to help us find the bottleneck.
Our staging server is a Intel Core 2 Quad CPU Q8200 (2.33 GHz) with 4GB of RAM, Windows Server 2003 R2 SP2 x64 Edition. Databases are hosted on Sql Server 2008 Express Edition. Everything seems to work smoothly. Page change is almost immediate ad page load time (for example switching pages in a grid) is ok.
Our production server is a VIRTUAL double Intel Xeon 3.00 GHz with 2GB of RAM, Windows Server 2008 Web Edition SP2 x86 Edition. Database are hosted on Sql Server 2008 Web Edition.
Our application is a .NET 3.5 (migrating to .NET 4 in these days) using classical best practices (masterpages, CSS, AJAX, paging for data, client cache for static resources, gzip compression on IIS for static and dynamic resources, server side cache for data that doesn't change frequently...).
I really can't understand what can cause the application to run so differently between the two scenarios. What could that be? The missing RAM? The load on the production server? The network limit?
What can I do to narrow bottlenecks' research?
You could briefly enable tracing on your production server (don't forget to turn it back off) and see what stages of your page loading are taking so long).
If you can easily add 2 GB more of RAM to the virtual server, try that, it's easy and might matter. Check your RAM usage in task manager and see how much you're using.
Are these servers hosted at the same place or might there be network latency differences?
On the server, run perfmon.msc and watch the counters, what's maxing out?

Resources