Solved

ASP.NET Web Application Performance

Posted on 2013-06-11
17
54 Views
Last Modified: 2015-12-16
Background:
C# ASP.NET 3.5 application
SQL Server 2008 backend
IIS 7
Internet Explorer 10 and Chrome

We have a web application that is accessed by roughly 50-60 employees at the same time.  We have a variety of browsers that are used.  IE 8,9,10 and Chrome.  When you open up the web application the first time it seems to run great.  Over time it because slower and slower.  I look at the database server and everything looks ok there and no locks on queries or anything of that nature.  I look at the web server to see if the worker process is spiking and it seems to be at normal usage.  It only is taking up maybe 200 megs of ram.

Generally, they can close down whatever browser they are using, open it up again and its ok.  Others have claimed that they close down the browser, open it up and its exactly the same as it was before they closed it down.

When it's dragging to the point that it's taking 30 seconds from going to one page to the other, I restart the application pool and that seems to make it run normal again.

This leads me to believe its something with my code and a possible memory leak but then why would worker process only be taking up less than 200 megs on the server?  Maybe it's something in the .NET 3.5 framework and IIS?  A lot of the problems seemed to start when IE10 was installed on some machines by automatic updates.   We reverted some users to previous IE8 and that helps a little but still some drag.  We then let users use Chrome and it seems that when they initially start up chrome, it's extremely fast.  Other users have never really seen the application slow at all.

I've been trying to pin point where the problem is, but I can't seem to figure it out.  I just can seem to figure out where my focus should be set.  I've been combing through code and queries.  I've run Red Gate's performance profiler but that doesn't capture the problems we are having on our live server. It only captures what I do.  Event Viewer hasn't helped much.  

What could possibly be the issue?

Thanks
Kurt
0
Comment
Question by:reindeerauto
  • 9
  • 7
17 Comments
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39242211
could you configure a Trace? so you can view exactly the methods that are taking so much time to execute
0
 

Author Comment

by:reindeerauto
ID: 39244203
I could but if it was just about methods taking a long time then why would would it seem fine initially then progressively get worse?  Seems like a memory problem?
0
 

Author Comment

by:reindeerauto
ID: 39245661
Additional information:

There are reports of long delays when saving information into the database.  Then 5 minutes later, they would save the same information on a page and it would happen instantly.  When I hear that, I would think its a database problem of some sort.  So again, everything is completely random at this point with delays.
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39246304
Mmm... well, the thing could be database locks, do you have acces to run a profiler on the database server?
0
 

Author Comment

by:reindeerauto
ID: 39259340
Ran profiler looking for database locks and there were none that it detected over the last few days.
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39259878
Can you upload the results of the following DMVs?

sys.dm_os_wait_stats
sys.dm_os_latch_stats
sys.dm_os_spinlock_stats
0
 

Author Comment

by:reindeerauto
ID: 39260016
here it is.
db-stats.xlsx
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39260247
Well, I can tell you the following things and ask some questions by the info that you sent:

1.

You have problems with your disk subsystem, here you can have two problems, you are reading more information than really needed or the disk subsystem isn't fast enough to cover the R/W demand

2.

What is the configured degree of parallelism on your instance?

3.

How often are you executing backup tasks?, of any kind, data or log

4.

What is the configuration of your disk subsystem?, capacity, speed, RAID, etc.

5.

When was the last time that you restarted your instance?

6.

Are you using replication?

7.

How much RAM does SQL Server has available to work with?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:reindeerauto
ID: 39260553
I'm not a DBA so hopefully I answered correctly or as much as I can.

2.  Not sure.  How can I find out?

3.  Officially a backup is run every 30 mins.  They vary from Diff backups, to logs, to full.  Full back ups are done twice a day. We have other backups that happen once a day (in our "downtime")

4.  We are virtualized.  So they are virtual drives but if you want specific specs on our SAN drives then I can get that but don't know if its relevant.  Volume that the server and the databases sit on is 300GB.  100 GB Free at the moment.  

5.  May 1, 2013

6. Not that I know of.

7.  Maximum SQL Server memory is set to 7.5GB
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39261622
Well, we must start by changing your backup strategy, is not necessary to perform full backups twice a day, you are consuming the disk subsystem with unnecessary work.

I would recommend a weekly full backup, three differential backups (lets say monday, wednesday and friday) and log backups each half hour.

You can get the degree of parallelism with the following code:
sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
sp_configure 'max degree of parallelism'

Open in new window

0
 

Author Comment

by:reindeerauto
ID: 39262319
name      minimum      maximum      config_value      run_value
max degree of parallelism      0      1024      0      0


We had a consultant come in and setup all the maintenance plans we have.  I was wrong about twice a day on full backups.  We do that once a day when only 1 person is in the system.  We do a differential backup one a day in the middle of the day.  Then we do transaction log every 30 mins.  We also do index reorganization, database integrity and statistics jobs every work day.
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39262771
How many concurrent users does your application have?
0
 

Author Comment

by:reindeerauto
ID: 39262779
55~
0
 
LVL 15

Expert Comment

by:jorge_toriz
ID: 39263059
SQL Server has 7.5 GB of RAM assigned, how much does the operating system have?
0
 

Author Comment

by:reindeerauto
ID: 39263086
12GB
0
 

Author Comment

by:reindeerauto
ID: 39263270
I should correct by saying its more like 110 (double) because every user usually has 2 sessions open.
0
 
LVL 4

Accepted Solution

by:
Steven Kribbe earned 400 total points
ID: 40973453
"Over time it because slower and slower." This is the user's experience? Has anyone looked at the client side performance. Many web apps use a lot of memory clogging up the client pc performance. Firefox for instance is well known for grabbing more than 1.5 Gb when casually browsing the internet. Check out the browser footprint before and after starting your application. Maybe this helps.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now