Topic: Ways to increase speed and performance?

What are some ways to increase the speed and performance of pun?

Is there an alternative search? The table seems to be growing quite large, and if multiple users are using the search, it could slow down the board.

Are there any other ways to speed it up? What about cache? I notice the board has to reload everytime you go back.

Anyone out there with large pun community that has had problems with speed, and has tips to increase performance?

Thanks

Re: Ways to increase speed and performance?

PunBB is very quick in general
In regards to search, there is a beta search mod on PunRes which uses MySQL's FULLTEXT search abilities.
Cache? Not exactly sure what you mean by "reload", that's what it should do! tongue

Re: Ways to increase speed and performance?

Smartys wrote:

PunBB is very quick in general
In regards to search, there is a beta search mod on PunRes which uses MySQL's FULLTEXT search abilities.
Cache? Not exactly sure what you mean by "reload", that's what it should do! tongue

Cool. Thanks i'll check that out.

What I mean is, not refreshing the board until the user clicks the link to the board, or hits the refresh button. But if the user clicks into a thread, and then hits the "Back" button in FF or IE, it goes back to the board but doesn't refresh it. I think this might help a bit.

Re: Ways to increase speed and performance?

That's a browser feature, not something PunBB can control tongue

5 (edited by CodeXP 2006-07-31 01:11)

Re: Ways to increase speed and performance?

There are actually many ways one can improve performance without actually modifying the PunBB source-code, but some of my favourites are:

1. Drop Apache, and go for the much faster lighttpd with PHP running as fastcgi.
2. Ensure you're using MySQL's query cache. Although a forum by nature updates frequently, it should still prove to improve performance quite a bit in certain cases.
3. Install eaccelerator (the 0.9.5 rc1 was recently released, and works very well with the latest PHP versions). This *will* massively improve performance of PHP scripts, and I'd highly recommend it to anyone.
4. Be sure to enable gzip compression. This will result in much smaller pages being served to compatible clients (just about every single somewhat modern browser), which not only improves performance but will also result in a lot of saved bandwidth. Please note though that for this to work with lighttpd, you should enable it in your php.ini file instead of using something like the module for apache.

Hope this helps out smile

6

Re: Ways to increase speed and performance?

CodeXP wrote:

3. Install eaccelerator (the 0.9.5 rc1 was recently released, and works very well with the latest PHP versions).

I've thought of trying this out, any side effects or things to look out for?

7 (edited by CodeXP 2006-07-31 01:42)

Re: Ways to increase speed and performance?

hcgtv wrote:
CodeXP wrote:

3. Install eaccelerator (the 0.9.5 rc1 was recently released, and works very well with the latest PHP versions).

I've thought of trying this out, any side effects or things to look out for?

I can't say that I've encountered any problems under Linux so far, and I've been using it since beta2 was released. I had seen some problem on Windows in that PHP would occationally crash, but that has not happened for me on linux. In fact, it seems to be perfectly stable so far. The performance gain is quite amazing, so if you have the possibility to use it I'd say go for it smile Here's the settings I'm using, in case you should need them:

$ cat /etc/php5/cgi/php.ini | grep -i eaccelerator

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="3600"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

This will allocate 16MB of memory for the cache, use maximum compression & purge the cache ever 1 hour. These settings seems to work well for me, and I should think it would be the same for most people smile

* note that eaccelerator can be run as both a Zend module, and as a regular PHP extension. I'd recommend against running it as a Zend module though, as it seems to be running the fastest as an extension.

8

Re: Ways to increase speed and performance?

CodeXP wrote:

$ cat /etc/php5/cgi/php.ini | grep -i eaccelerator

Thanks, I'll give it a try this week.

Re: Ways to increase speed and performance?

CodeXP wrote:

There are actually many ways one can improve performance without actually modifying the PunBB source-code, but some of my favourites are:

1. Drop Apache, and go for the much faster lighttpd with PHP running as fastcgi.
2. Ensure you're using MySQL's query cache. Although a forum by nature updates frequently, it should still prove to improve performance quite a bit in certain cases.
3. Install eaccelerator (the 0.9.5 rc1 was recently released, and works very well with the latest PHP versions). This *will* massively improve performance of PHP scripts, and I'd highly recommend it to anyone.
4. Be sure to enable gzip compression. This will result in much smaller pages being served to compatible clients (just about every single somewhat modern browser), which not only improves performance but will also result in a lot of saved bandwidth. Please note though that for this to work with lighttpd, you should enable it in your php.ini file instead of using something like the module for apache.

Hope this helps out smile

Is it easy for someone who is not familiar with manipulating php or database to activate MySQL's query cache and install eaccelerator.
I would like to do that but i don't know how ?

Regards

10

Re: Ways to increase speed and performance?

4. Be sure to enable gzip compression. This will result in much smaller pages being served to compatible clients (just about every single somewhat modern browser), which not only improves performance but will also result in a lot of saved bandwidth. Please note though that for this to work with lighttpd, you should enable it in your php.ini file instead of using something like the module for apache.

This is the best way to use a LOT of CPU. Don't activate that.
We did this: http://punbb.org/forums/viewtopic.php?id=13208

And are working on Rickard's advice about it...

Re: Ways to increase speed and performance?

This is the best way to use a LOT of CPU. Don't activate that.

Untrue. There are several levels of compression you can set, using the highest uses a lot more CPU than the lowest without a whole lot more compression. Gzip is useful as long as you use one of the lower settings.

12

Re: Ways to increase speed and performance?

Smartys, it's useful as it will reduce the pagesize sent to the client, but i don't really see how it could possibly reduce cpu use...

Re: Ways to increase speed and performance?

Yann wrote:

Smartys, it's useful as it will reduce the pagesize sent to the client, but i don't really see how it could possibly reduce cpu use...

That's not what he said. He just said that the amount of CPU your server uses depends upon the level of compression you choose. If you choose a high level of compression, you will use a high level of CPU; if you choose a low level of compression, you will use a low level of CPU.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Ways to increase speed and performance?

Anyone can ask to the question i've posted before about activating MySQL's query cache and install eaccelerator for a non php spécialist ?

Re: Ways to increase speed and performance?

glucarelli wrote:

Anyone can ask to the question i've posted before about activating MySQL's query cache and install eaccelerator for a non php spécialist ?

Query cache (remember that this stuff should be set in my.cnf):
http://www.theadminzone.com/forums/show … php?t=8150
http://dev.mysql.com/doc/refman/5.0/en/ … ation.html
I would also take a look at MySQL Administrator, it does a pretty good job explaining what different variables do

Eaccelerator:
http://eaccelerator.net/wiki/InstallFromSource
http://eaccelerator.net/wiki/InstallFromBinary
http://www.theadminzone.com/forums/show … php?t=8152 (slightly out of date, but might help if the rest don't)

And yes, as pogenwurst said, I was saying that lower levels of gzip compression are still very good without using a lot of CPU