How can I lower my time to first byte?

JohnnyBCJ
JohnnyBCJ used Ask the Experts™
on
One of my websites is extremely slow loading up (10 to 20 seconds on first load). I've discovered that my time to first byte is 2 to 3 seconds. I have access to everything on the website but I'm not able to modify much (page wise), as most of the site is a 3rd party script.

What can I do to speed up my website? What are the general troubleshooting steps for someone who had similar problems?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Is your site precompiled, do you have a bin folder with dll files in the live site content?
Kamal KhaleefaInformation Security Specialist

Commented:
try to put the javascript files at the end of your page

also try to compress the images if u r using images

also this site may help you

http://www.webpagetest.org/

Author

Commented:
Madgino; I'll check as soon as I get a chance this morning.

king2002; Surprisingly enough, I already tested out the page using that site and with a different site as well (http://analyze.websiteoptimization.com/wso).

webpagetest.org is how I learned about my Time to First Byte problem.
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Author

Commented:
Madgino; There are no .dll files. There are a number of .asp, .xsl, .js, .gif and .css files

Commented:
OK, if you have chrome installed, in developer tab (F12) use network, timeline and audit tabs and try to see if there is anything not normal in there (any big image, css, javascript etc)

But most probably the site is slow because the asp code is slow and you'll to try to optimize the code to get any significant improvement.

You have to dig into code, measure the time of different procedures/operations and see how you can improve them. It might be a slow database connection if you have one?

Author

Commented:
madgino, thanks for the suggestions!

Google chrome confirms the time to first byte is bad.

So far I've done a number of things that http://www.webpagetest.org/ suggested and my speed has improved from about 40 seconds to around 3. My time for first byte is still horrid.

Commented:
As I told you, this is the time it takes to the server to process the page, it can mean that you have a complex page that does a lot of calculations/operations, that your sever is overloaded or that your page is using other resources that are slowly responding (like a database).

So check the serverl loading, check the database loading and if these are fine all you're left to do is to look to the source code and try to optimize it.

Commented:
Also compare time to first byte on a simple page (something with text only) vs a normal page, is there a big difference?

Author

Commented:
I'm going to give that a try right now. The basic page vs dynamic page speed difference.

I ended up getting it back to a somewhat expected time (3-4 seconds) but now it's back up to 30 seconds. Extremely annoying!

Commented:
Also run the pages from server and check the response time.

Author

Commented:
The extremely small text based only page displays quickly. The dynamic page displays more slowly. If I disable the antivirus program on the web server, it takes about 10 seconds to load. If I enable the antivirus program on the web server, it goes back to its normal 30 seconds.

Commented:
Maybe a server shortage? Memory, processor, slow hard-disk?

Author

Commented:
It's a dual core 3.4 ghz, 2 gigs of ram running windows XP pro. The only thing that is running on it is IIS and the 1 program that needs to be running in the background. It has a 40 gig hard drive and has 21+ gigs free.

Commented:
This is hard to tell, put some monitoring on the server and hit it with requests, see what the peaks are.
It also depends on the pages, maybe are you doing a lot of reads/writes and you need a faster harddisk or to increase the pagefile.

Author

Commented:
The page file is 4 gigs.

I just tested out the page and it connected without any problem. It takes about 3 seconds to load the page (which I'm OK with). The antivirus program is still running at this point.
My problem is that this could be a completely different story in another hour's time.

Commented:
Do you have setup any scheduled scans for the antivirus?

Author

Commented:
The time between this post and my last post, the page goes from 3 seconds to 30+. I know it's not working from cache as I have access to the web server itself and I'm able to see when I hit the web server.

The scheduled scans are for 1 AM every morning.
Commented:
Do some system monitoring:
http://support.microsoft.com/kb/305610

Author

Commented:
What performance counters would I be looking at specifically for system monitoring?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial