Why does our TTFB increase massively after the first X requests in a page?

46 views
Skip to first unread message

DWJames

unread,
Dec 11, 2010, 6:17:04 PM12/11/10
to Make the Web Faster
Hi All,
wondering if someone can help me out with a problem that's bugging me
about our web server.
We have some pages with a very high number of elements in them (I
know, this needs sorting as a separate excercise) about 170 objects
per page to be precise.

What we can see from page speed tools like www.pingdom.com is that
most requests in a page have a nice low TTFB (less than 0.1seconds),
but after a certain number of requests (usually between 50 and 100)
have been recieved on a page, this jumps up to something like 2-3
seconds per request for the next few requests (between 10 and 50
requests) then goes back down for the rest.

It's not always the same files and it's not always the same amount of
requests before this long TTFB starts, but it seems to follow the same
general pattern.

It's as though there's a server setting that says 'For the first X
requests, deliver the stuff quickly, then after that treat subsequent
requests as low priority' Possibly a flood control or something
similar?

We're running Apache 2.2.14 and PHP 5.3.2 on a dedicated server.

Can anyone shed any light on this?
If I can provide any relevant pieces of info to help get to the bottom
of this, just ask.
Thanks in advance,
James

Patrick Meenan

unread,
Dec 11, 2010, 6:56:40 PM12/11/10
to make-the-...@googlegroups.com
Just a quick sanity check to rule out tool issues, are you seeing it across
multiple tools (yottaa.com, webpagetest.org, browsermob.com all offer free
tests as well)?

If so, some basic questions:

- Is it always the same group of requests?
- Are you doing domain sharding or are all the requests coming from the same
fqdn?
- What happens if you request just those assets individually?
- Are you logging the request processing times in your access logs (if so,
do the times also show up in your logs)?
- Do you also see it when the site isn't busy (in case you're running out of
client threads)?
- Is everything physically on the apache server (disks, back-end logic,
etc)?

Thanks,

-Pat

--
You received this message because you are subscribed to the Google Groups
"Make the Web Faster" group.
To post to this group, send email to make-the-...@googlegroups.com.
To unsubscribe from this group, send email to
make-the-web-fa...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/make-the-web-faster?hl=en.


Sajal Kayan

unread,
Dec 12, 2010, 2:09:06 AM12/12/10
to make-the-...@googlegroups.com
by any means...
is MaxKeepAliveRequests less than 170 in apache config?

Its possible that the connection gets used up and apache needs to remake
a connection. Even this shouldnt take seconds...

# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.

TheOpsMgr

unread,
Dec 13, 2010, 12:07:08 PM12/13/10
to Make the Web Faster

What are your Keep-Alive settings?

I think the default MaxKeepAliveRequests is 100
http://httpd.apache.org/docs/2.2/mod/core.html#maxkeepaliverequests

I wonder if its having to re-establish the connection part way
through?

Doesn't really explain WHY it jumps up though, but might be worth a
look?
> What we can see from page speed tools likewww.pingdom.comis that most
Reply all
Reply to author
Forward
0 new messages