For a well described tutorial on basic PHP profiling and optimization I would recommend the 3 part article written by Davey Shafik: Profiling PHP Part 1: Intro to Xhprof & Xhgui Profiling PHP Part 2: Xhgui In-Depth Profiling PHP Part 3: Practical Performance Tuning