Need help with first byte time

Hi all,

So my test results, I would say, are “so so”. I’m trying to figure out ways to improve the load speed, in particular first byte time. Any help would be greatly appreciated. This is my result:

http://www.webpagetest.org/result/120106_AA_2RVGF/

Thank you in advance!

-Mark

The first byte time is going to be a function of your back-end application. Are you on shared hosting or do you have access to install software? If so, New Relic is great for helping to drill into it, otherwise you usually have to do a lot of instrumentation and logging. From the outside it’s a black box.

Thanks,

-Pat

I do have access to install software, and have installed New Relic and am starting to see some results trickle in. There is a LOT to this tool, and it’s tough to tell what exactly I’m looking at, and what I should be looking for. Tips?[hr]
Another question about New Relic - I do some back-end php processing that takes a long time - basically an import routine that updates periodically to give results. Because of this, the import routine seems to be throwing off all my stats because this one page (import.php) takes a long time to load. Is there a way to exclude it from the results? I really don’t care how long that page takes to load (although am concerned with how other pages load WHILE I am running the import routine).

Go to app server->web transactions and pick the entry point you are interested in (index.php?), click on it and then select “performance breakdown” on the right.

If you need visibility into specific functions in your PHP you can also tell New Relic to instrument those. Here is an example of what I did in my thumbnail generation code to track down the expensive areas:

if(extension_loaded('newrelic')) { 
    newrelic_add_custom_tracer('tbnDrawWaterfall');
    newrelic_add_custom_tracer('tbnDrawChecklist');
    newrelic_add_custom_tracer('GenerateThumbnail');
    newrelic_add_custom_tracer('SendImage');
    newrelic_add_custom_tracer('getRequests');
    newrelic_add_custom_tracer('loadPageRunData');
}

Thank you for that help - I was able to actually set up separate php.ini files so the main site and the development site show up as separate applications.

So now I have all this data - suggestions on how to use it?

Start drilling in to where the slow chunks of code are (actual code, database calls or external services) and optimize them one at a time until you feel comfortable that the really slow issues have all been cleaned up :slight_smile: