Home » Architecture

Improving Performance: How to Speed Up Slow Apps

12 November 2012 No Comment

turtlesq

Application running slow?  The biggest challenge with improving application performance is finding the problems.  There are often more than one.  Narrow down the problem by tier, by machine, by application, then by functionality.   Using this approach, one of our client’s primary product performance improved by over 300%:

1. Monitor Performance on each tier to determine the length and percentage of delay.   Most enterprise applications are running on a client browser, a web server, and a database server.  On the broswer, that means monitoring download times.  What are the slowest and most high-profile  application pages?  How long are those pages taking at peak times?  Longer than 2-3 seconds?  Flag them.  Monitor the CPU, memory, and disk usage on the web server and database server.  Are they running hotter than 50% CPU utilization?  Are they consuming more than 50% memory?  If so, they’re a suspect.  Oftentimes it’s impossible to tease out which is the problem tier through performance stats alone.  Slow machines point the way but what’s really needed is timing data on application requests in problem pages.  You need to…

2. Benchmark the Code.  Once you know which pages are a problem, dissect them.  Write code that logs to the database the start and end times of every code grouping on a page.  Use milliseconds.  This will give you a clear cross-section of functionality on the page with durations of each step.  Run some tests.  Get it to run real slow.  Then dig into the numbers and look for the longest delays.  In general, you’ll find the problem either in the application or the database.(or both)  Work from there.

3. Look for Greedy Neighbors.  Applications, web services, SQL requests, and processes that have nothing to do with your main application can tie up your resources.  Be aware of what else is running on the machine.

4.  Keep Windows Up to Date.  Web and database servers can run slow simply due to Windows Updates falling behind.  Keep them up to date.

5. Know Your Hardware.   Are your hard drives full?  Are they fragmented?  Is antivirus software slowing you down?  Clearly understand your hardware and it’s configuration, and who’s responsible for the upkeep.

6. Check the Ceilings. Web servers such as IIS, database products such as SQL Server, and Virtual Machines can all have memory and CPU usage ceilings.  They’re capped by product, by license, and by configuration.  Check them all to be sure you’re not cheating yourself out of resources you’ve paid for and installed on the machine.

7. Consider All the Resources.  Websites often access many machines on the network to provide content to their users.  Map all the media servers, network shares, and web services used by your application so you don’t miss a culprit hiding on a different machine.

Your thoughts?

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.