Stumped on Further Optomization (TTFB)

Ok so about a month ago a site on a VPS started having trouble due to a resource shortage. This begins my month long quest of optomization, but at this point my limited tech knowledge leaves me stumped. It’s currently hosted at 1and1 with an XXL package, whatever that means :smiley:

Anyway, here’s a brief test-timeline of the improvements:

Oct 20- Broken freakin website! BAD NEWS

Oct 25- Fixed the issues and upgraded the server

Oct 26- Added a CDN (Clouflare to start)

Today: Minor optimize improvements, nothing substantial. Attempting to improve time to first byte (typical competitor sites see about a .5 second TTFB)

So that’s it, I am stumped. For whatever reason I am seeing a 2-3 second TTFB when it should be half a second. It appears this way on internal pages as well (

Also I noticed google ads take longer to display now? Could be related to Cloudflare.

Any advice, opinions, or tests I can run?


Are you using rocket loader or some of cloudflare’s other advanced optimizations? If something is deferring the javascript on the page to load later it could explain why the ads are loading later.

At this point to improve the ttfb you will probably want to install something like New Relic that will tell you where the server is spending the 1 second of time.

From the looks of things, their VPS packages are sized based on RAM and disk space but I don’t see any discussion about CPU allocation across the sizes.

Are they managing the server for you or is it up to you to manage? The reason I ask is that there are a lot of system/server level things that you can tune to make php serving a lot better and it would be worthwhile to look at:

  • Using Nginx along with php-apc and php-fpm
  • Tuning APC’s shared memory cache
  • Enabling W3TC caching (with APC or memcache)

When you upgraded the server it looks like the server was not keeping connections alive so I get the strong feeling that the server software stack isn’t configured particularly well. shows the site to be performing even worse than before… this is from LA so local to the server.

I’d say there’s either some terrible code, or the server is way overloaded. In most cases, the bottleneck for a well tuned LAMP backed CMS is raw processing power, and this site needs more!

(the only other reason I’ve come across for poor performance like this was with a ‘reputable’ service provider taking 3 days to resilver an new disk into RAID5 - I assume the whole server was 99.9% in waitio)