Website Running Slow Please Help.

T

Tageldinho

Greetings all, I am the Web maintenance guy for a non-profit org, and
have been getting a lot of complaints that our website is running slow
(and I agree at times), we run asp.net but outsource our programming.
I was wondering if maybe you could help out and give me any clues as
to why our website could be running so slow. I've spoken about it with
our programmers and they said they have changed some of the code so
that it doesn't hit the database as often which makes sense but I saw
little to no change really. The website especially runs slow if it's
not cached in your browser and from google analytics most of our daily
visitors are new.

I am not sure if it is a hosting problem or a programming problem,
that is why I posted in this group any tips/hints/ideas and help is
welcome.

the site is www.orbis.org

Thank you all very much in advance.
 
S

Samuel R. Neff

This is something your outsourced programmers should be able to take
care of. If they can't make it faster or prove that it is running
within acceptable parameters (which depends on whatever contract you
have with them), then you might want to look into finding a different
company to outsource to.

That said, there are lots of places to look. Start with the database
and SQL Profiler. That will show you what queries are running and how
long they take. That is usually where bottlenecks exist.

Then you can use can HTTP monitor like Fiddler or Charles to browse
through your site and see how long individual requests take.

http://www.fiddlertool.com/fiddler/

http://www.xk72.com/charles/

If the requests take significantly longer than the queries, then you
need to dig deeper either by using ASP.NET's trace functionality or a
profiler or performance monitor. I think a profiler would get you the
fastest results, but you really need to be a programmer to be able to
use one and understand it's output. I like redgate's ANTS Profiler
myself.

http://www.red-gate.com/products/ants_profiler/index.htm

If you can find a bottleneck, then the best thing is to feed this info
back to your programmers and have them fix it and also document how
you found it and express that you're doing their job for them blah
blah blah.

HTH,

Sam
 
T

Tageldinho

Hey Sam,

Thanks for the help. I will look into all the resources you gave me.
Is it any guarantee that it is a programming problem that is slowing
it down? Is there any possibility that it may be a hosting problem?
I've tried to go through them and have gotten nothing, but the
programmers we outsource to sort of point the blame elsewhere.

Thanks again for the help.

Adam
 
J

Jeff Dillon

Of course look at other websites hosted on your ISP, and see if their
websites are slow also. It could be a slow server. Use basic troubleshooting
techniques

Jeff

Hey Sam,

Thanks for the help. I will look into all the resources you gave me.
Is it any guarantee that it is a programming problem that is slowing
it down? Is there any possibility that it may be a hosting problem?
I've tried to go through them and have gotten nothing, but the
programmers we outsource to sort of point the blame elsewhere.

Thanks again for the help.

Adam
 
D

Diffident

Best place to start would be event logs. Scan through them and see if you are
noticing any errors. Make sure that you open your event logs and
simultaneously browse through the website.

Being a programmer, I would also like to see how many times the worker
process which w3wp.exe is being recycled. Search MSDN to see how to log the
worker processes recycle events in the logs. If you notice that there are too
many recycles then it is definitely the application code that is causing the
problem. You can ask your programmers and let them know that there is a
memory leak somewhere or they might be allocating too many objects and
garbage collector might be running too often which is very expensive and can
slow your website.

You can use MMC to examine the "ASP.NET Memory" performance.

Please let me know how the things progress. I would appreciate your feedback.

How much RAM does the machine have?
 
S

Samuel R. Neff

Passing the buck without proof is a bad practice, but unfortunately
common. If your programmers want to blame the host, they should only
do so after providing proof that it runs at a certain speed on their
servers and runs slower on the host (at a similar load).

It is possible the host is putting too high a load on the servers or
has done something else to degrade performance, but it sounds like the
programmers are just assuming that's the case without actual
investigation.

HTH,

Sam
 
T

Tageldinho

Sorry for the response in delay, hectic work + Jury Duty = late
response.

My sentiments exactly Sam, it seems as if they are assuming it without
actually investigating.

Diff: I have been looking at several different articles on msdn and
I'll let you know how everything progresses and I'm sure I will have
tons of questions for all of you once I get a chance to run some more
performance tests with all the tools provided (although with this jury
duty and vacation coming up I might be late in responding).

Also, they have recently implemented a new caching system on the
website so that everytime a user visits a page instead of the site
hitting the database everytime and storing the info in an object it
will load and place the object into the cash so that if someone else
visits that page it will look in the cache first and prevent it from
hitting the database (given the page has been loaded previously within
the last 20 minutes as this is the time the caching is set to expire).
After the 20 minutes is up it is automatically deleted from the
memory.

Looking at the site this morning I have seen some significant speed
increases (for most pages at least) some still give slow reponses but
obviously that is because they probably weren't viewed therefore
weren't cached.

Is this method common practice for web developers? Or is this a sort
of quick fix? In my opnion it seems this is only a temporary solution
but the underlying issues still remain.

Any thoughts and opinions would be much appreciated.

Thanks again,

Adam
 
D

Diffident

20 minutes timeout...huh. That is the default timeout. How frequently does
the data change? If not that frequently why not increase the timeout to 60
min instead?

Invalidating the cached objects can trigger the garbage collection. Of
course it also depends on how big the cached data is.

Ask us any questions you may have during this process, I would be happy to
assist you.
 
T

Tageldinho

Oh, I was unaware that 20 minutes was the default, the content doesn't
change enough for an increase to 60 minutes to make a difference
really... If it's really urgent I could always just clear the cache so
that it posts immediately.

As far as triggering garbage collection, I assume you mean that by not
validating the objects that have been cached it could possibly pull up
the wrong or distorted objects?

Thanks again, more questions will follow!

_Adam
 
D

Diffident

Yes, 20 minutes is the default timeout. And, remember you cannot kill
specific cache objects that have been created programmatically. You have to
use iisreset!

If the content is not changing that often then you can safely bump the
timeout to say 60 min. Setting it to more than 60 min might not be optimal
since it can overkill the server's memory sometimes.

If the objects are not invalidated even if the data has been changed then
you end up serving stale information which may not be real-time or up-to-date.
 
S

Samuel R. Neff

Caching is a very common way to improve performance, but it sounds
like you still have some underlying performance problems that really
should be fixed. Caching is great when the content you're generating
requires a ton of processing or is extremely database intensive, or in
extremely high volume sites where there are a number of concurrent
requests for the same data (think of situations where caching times in
seconds would be appropriate). Does that situation apply to your
application?

Also, generally it's better to expire items from the cache manually
when the underlying data changes. That's not always possible if the
cache is based on external data, but if the cache is data that your
application itself has control over, then the admin portions of the
application that write data to the database should know what items are
cached and can cause immediate expiration.

Another thing to look into is SQL Server 2005 Query Notifications.
These are a type of cache, but they automatically expire when the
underlying data changes without as much work from the developer. It's
still caching so is not a true solution, but it sounds like this would
be better than the time based caching you're doing now.

HTH,

Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top