Your premium source for custom modification services for phpBB


HomeForumsBlogMOD ManagerFAQSearchRegisterLogin

Comments March 7, 2008

Testing Template Engines in phpBB2 Part II

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 8:40 am Comments Off 

In Part I of this series of posts I detailed the results from my first benchmark scenario. For that scenario I only ran one session. What I mean by that is I had a single browser window open. With the meta refresh keyword set up in my overall header template I could start a refresh and walk away from the system and let it run for hours.

Given that I have four template engines to test and I want to capture statistics based on at least 1,000 page refreshes for each template engine for each of the four pages in my test case that is… hmm… carry the … multiply…

1,000 refreshes * 4 template engines * 4 pages * 2 second refresh interval

… that’s 32,000 seconds, or roughly one third of a day. I certainly don’t have the time to sit around and do nothing but watch a browser session refresh all day. :lol: So it’s nice that I can start the process and leave it alone.

What other test scenarios do I have planned?


Comments March 6, 2008

Speedy Template Development Topic

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 10:22 am Comments Off 

The author of the code I have been testing has started a development topic at www.phpbb.com. So if you want to try the same code that I have been testing, you can to that.

Speedy Template Development Topic

The MOD Author is Brainy. I like their current signature line… :lol:

if($do || !$do) $there = $no_try;

Measuring the True Page Generation Time

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 12:21 am Comments Off 

Collecting Data

In an earlier post I detailed how I was capturing the time spent parsing a page. The code looks like this:

$page_parse_start_microtime = microtime();
$page_parse_time = microtime_duration($page_parse_start_microtime, microtime());

The call to the pparse(’body’) function appears at or near the bottom in essentially every content page in phpBB2. By including this code I capture the start time just before the function call, and get the completion time after the function returns. One astute reader pointed out to me that this ignores the parsing time spent in rendering the page header and the page footer, and they were right. But I don’t think it matters. Besides, I don’t want to alter my testing process now as I would have to go back and start all over again, and I don’t want to do that. :-P

Why doesn’t it matter?


Comments March 2, 2008

Testing Template Engines in phpBB2 Part I

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 5:12 pm Comments Off 

Trial Number Two: A New Hope

If George Lucas can get away with starting with Episode IV then I can start with trial number two, right? :) Well, there is actually a reason for it. Trial number 1 was really just a POC (proof of concept) to show that the techniques I outlined last time for capturing parsing and page generation times would work. The first trial was also run before I was also given a tweaked version of the Categories Hierarchy template engine to use. Trial number one was also run on my production server which meant that the template engines were not given a “quiet system” to work with. As a result, I will skip right to the second set of numbers.


Comments March 1, 2008

Performance Tuning: Setting Up to Test Template Engines in phpBB2

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 10:38 am Comments Off 

Our story so far…

I have a board with nearly 400K posts and 30K users. This board has paying sponsors which means I am able to afford a nice server to run it on. However, I am always looking for ways to tweak the code and get every tiny bit of performance that I can. My background is in databases, so naturally I started with the query logic and index structures and so on. I have a couple of posts so far (see Related Links) that show how I tested the performance impact of those tweaks. It was during that process that I discovered that my queries are not the problem.

It’s the parsing engine.


Comments February 29, 2008

Timing Queries in phpBB2

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 5:16 pm Comments Off 

In the first post in this series I talked about the fact that phpBB2 already provides a mechanism for counting queries that are used to generate a page. Now I am going to take that a step further. For optimization purposes, I want to know how long the query processing took.


Comments February 28, 2008

Tuning the “Newest Post Since Last Visit” SQL

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 11:58 pm CommentsComments (1) 

Most phpBB users really like the “orange thingie” that takes them to the newest post in a topic. (This feature, like many, is only available to users that are logged in.) The image is this one: I like it too. I like it even more since I optimized the query that drives this functionality. :)

Edit: This post turns out to be wrong. I am leaving it in place, but the code suggestions made here are not effective and in fact will generate SQL errors in certain cases. More details are in the first comment at the end of the post.


Comments February 26, 2008

Counting Queries in phpBB2

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 11:21 pm Comments Off 

A standard footer for phpBB2 boards includes the copyright (of course, you would not leave that off, would you? ;-) ) and various other things. It does not include any page generation statistics. There are a couple of MODs that will do that, and most are quite simple. For example, to echo the number of queries that it took to generate the page is incredibly easy to do.


Comments February 25, 2008

What is the real cost of generating a page?

Filed under: Performance Tuning, phpBB — Dave Rathbun @ 8:04 am Comments Off 

I have been working very hard over the past few months to review each and every query on my phpBB boards and try to optimize it. I run a board that is now getting (on a fairly regular basis) over 250 concurrent users now, and this is on a server that I share with a few other boards. So it’s important that things perform at their best. I will be writing up some of the query tuning tips in later posts. As it turns out, my query tuning efforts probably helped, but that’s not where the bulk of my page generation times were coming from.

Not even close.


« Previous Page

Powered by WordPress