Topic: Caching Punbb

My forum at http://forum.projanmo.com is growing very fast. the database size is increasing too fast as there is unicode texts.

so i want to implement page caching. how can I do that?

thanks in advance

Re: Caching Punbb

does not anyone to help me?

My forum too about 2 seconds to load. Now its taking about 2.96 seconds to load.................how i will tackle in near future and long future sad

otherwise i have to change the forum engine sad.

Re: Caching Punbb

I don't see what you mean by page caching actually. Would you care to explain?

Re: Caching Punbb

actually i have just one question:
My forum is loading slower than earlier. Initially it took less than 1 seconds. then it took about 2 seconds and now near 3 seconds.

its increasing as the database size increasing.

Now how can I improve (decreasing loading time) the forum?

db size is now 25MB.

all texts are in Unicode.

thanks

5

Re: Caching Punbb

I think the problem is with your host, my database is larger than yours and I have no performance issues

Re: Caching Punbb

See http://punbb.org/forums/viewtopic.php?id=15277 for some advice on caches. They are in general a good thing to setup and will improve the performance of your site from a users perspective. So install eAccellerator or xcache.

However it is a mistake to assume that database **size** is the performance bottleneck for you. A big database does not by itself equal a slow forum, unless the hosting environment is grotesquely under-specified (ie running on a machine with very little RAM and an old CPU), which is not often the case.

In looking at your homepage, the problem is clear - it is the number of database **queries** that are slowing down your page loads, not your database size. For example, I see that loading your home page generates 16 PHP and database queries, some of them no doubt quite complicated.

In contrast, a default punBB site loads the home page in typically only 6 or 7 queries. The extra queries on your site are generated by the extra mods you have applied - specifically the sub-forums mod, by the look of it.

Some - most smile - PunBB mods are not exactly written with performance or optimisation in mind, to say the least, so you are probably right to worry about the performance of your site as usage grows.

So I would suggest you do indeed install a cache, as well as perhaps review the way you have configured your board.

Eg make sure you have the latest version of the sub-forum mod. You may also find that, for example, you may be able to eliminate a few queries by disabling some of the optional items under the Administrative menu > Options, like the 'Users online', 'User has posted earlier', and other optional features that may apply to your mods.

Re: Caching Punbb

Dear
Thank you very much for your post. Actually sub-forum is a must for any big forum. If not use MOD we miss many features. I think core punbb should give more such features.

My server has 2GB RAM and not more than 30 websites.

Zend Accelerators is installed in our server smile. Should it not improve performance? But I will follow your caching recommendation too.

in my setting user online is enabled and user has posted earlier is disabled.

one of the performance degredation cause i think:
some MODs coded in common files though these MOD does not work in every page. So they also causing some performance issue sad.

anyway, thanks for your reply. i am going through your recommendation.

Re: Caching Punbb

Even if the Zend Accelerator is installed, it may not be configured optimally. If it is already installed, the simplest option for your is to just make sure it is setup correctly for you and working as best as it can.

Alternatively, setup a test punbb somewhere, install an alternative cache like xcache, and see if it works for you, and then install that on your live site.

But identifying whether the Zend Accelerator is already there is important. Your life may get complicated if you have two caches fighting each other on the one server - they will negate each other.

Aside from caching, your users will also see a performance boost if you enable Gzip page compression within punBB or via whichever cache you go with. I notice that you don't seem to currently have that enabled. That might also be something to look at too.

I'd also certainly look at all of the mods you have installed - the sub-forums, the RSS/Atom feeds etc.

Do they need to be where they are on every page? Can the same task be done simpler somehow, perhaps with a different mod? Is the PHP code of these mods doing stuff 'under the hood' that you don't need? (and which you might therefore be able to cut or comment out of their code...). Etc

Site performance tuning is something you will probably find yourself doing every day on a big board. It's one of the down-sides of your success smile

Re: Caching Punbb

dear,
today i got the culprit.

The reason of slowing was the PunPortal Mod. Today I removed it and saw forum is loading within 0.025 seconds. Earlier it took 2 - 8 seconds sad.

So, my recommendation to everybody not to use PurPortal Mod if performance is a issue. This mod includes some sql query in header.php file which is not needed except the homepage. as in header.php these queries are executed in each page.

thanks all for advice and helps

10

Re: Caching Punbb

rajuru wrote:

dear,
So, my recommendation to everybody not to use PurPortal Mod if performance is a issue. This mod includes some sql query in header.php file which is not needed except the homepage. as in header.php these queries are executed in each page.

thanks all for advice and helps

Enclose those punportal lines in the header within the following:

if (basename($_SERVER['PHP_SELF']) == 'index.php')
{
   punportal_code
}

It should only execute the code for index.php, then, which is the only? page where it's required.

11

Re: Caching Punbb

hmmmmmmmmmmmmm

thanks

12

Re: Caching Punbb

Out of curiosity, just tested it. big_smile It changes the amount of queries on the forums.php page from seventeen, (with the portal code in the header as normal), to ten, (with the portal code enclosed within that clause). So it does make a notable difference on the amount of queries made. smile