Current time: 11-22-2019, 09:30 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Improving First Byte Time
06-17-2013, 03:54 PM (This post was last modified: 06-17-2013 03:56 PM by GreenGecko.)
Post: #2
RE: Improving First Byte Time
First off, you need memory, lots and lots of memory. Make sure you've fed plenty to your database so that it's able to respond to most of your queries from memory. Once sated, the amount of cpu required is surprisingly small.

As you're already running nginx, install php in php-fpm mode, and throw apache away completely. APC runs far, far better across php-fpm than it does with apache modules ( eAcellerator seems to be king over there ), and I find the resultant chain ( nginx -> php-fpm -> mysql ) far simpler to understand and tune. Once this is up and running, you'll need to start tuning up php resources ( high timeouts for admin services, plenty of mem again - 384 - 512MB per process ).

This will speed stuff up appreciably. If anything APC as an opcode cacher will make the most change.

From there, you need to look at your caching strategy. Using APC as the FE cacher is probably the fastest option, but it can get unreliable at heavy loads. I prefer to use the extended disk based cacher written by Colin Mollenheur - good to see someone really take the time to understand a file system when designing it - and put it on a memory-backed ( tmpfs ) file system. If you're looking at multiple back ends, then Colin's Redis based cacher is loads better than memcache.

At this point, you'll have got to a stage where most of your info is coming from memory, and the final bottleneck is raw CPU power. The only response to that is to spend money!

Actually, it's not. at the moment, nginx is just acting as a switch: hand this over to PHP for processing, deliver that file. Googles ngx_pagecache can process your web page to improve the quality of the content - from simple things like shrinking it my removing white space and comments, so more complex stuff like converting your background images to sprites, resizing images, combining files, and so on. It does start to use a significant amount of cpu power if you get carried away, but is is a good way to quickly improve the content. Not that's Googles definition of improve, so up their rankings you go...
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Improving First Byte Time - jazzitup - 06-17-2013, 07:51 AM
RE: Improving First Byte Time - GreenGecko - 06-17-2013 03:54 PM
RE: Improving First Byte Time - jazzitup - 06-17-2013, 04:03 PM
RE: Improving First Byte Time - GreenGecko - 06-17-2013, 04:10 PM
RE: Improving First Byte Time - jazzitup - 06-17-2013, 04:57 PM
RE: Improving First Byte Time - GreenGecko - 06-20-2013, 04:21 PM
RE: Improving First Byte Time - sunjohn - 06-23-2013, 02:05 AM
RE: Improving First Byte Time - xeridea - 07-07-2013, 01:26 PM
RE: Improving First Byte Time - olivedev - 07-18-2017, 12:52 AM
RE: Improving First Byte Time - GreenGecko - 07-19-2017, 04:29 PM
RE: Improving First Byte Time - goivvy - 10-04-2017, 07:54 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)