Solved

ASP.NET Web Application Performance

Posted on 2013-06-11
17
53 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
Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

759 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

22 Experts available now in Live!

Get 1:1 Help Now