How to make phpbb3 less resource intensive?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
User avatar
Mooncow
Registered User
Posts: 261
Joined: Tue Feb 25, 2003 8:10 am
Location: This Post
Contact:

How to make phpbb3 less resource intensive?

Post by Mooncow » Wed Aug 21, 2013 10:53 am

Hi All,

I was looking for some general tips/suggestions on how to make phpbb3 use less resources and make the database use less load (basically ways to optimise the forum and the db)

I know the basics, make sure the latest version is used, keep mods to a minimum etc
how about other housekeeping? Are large threads of 100's of pages problematic? Clearing lots of users with zero posts? I have about 10k members but of course not all are active.

I host my forum on dreamhost and it calculates "conueries" per month, which is telling me it is about 214.14 MCn. Just trying to keep this figure down!
I love teh phpBB

User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: How to make phpbb3 less resource intensive?

Post by Oyabun1 » Wed Aug 21, 2013 12:10 pm

Without substantially rewriting the software there isn't much you can do to improve efficiency. Standard phpBB closes database connections when they are no longer needed, but that isn't always the case with MODs. MODs can also substantially increase the number of database queries that are made.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests

User avatar
AmigoJack
Registered User
Posts: 5588
Joined: Tue Jun 15, 2010 11:33 am
Location: グリーン ヒル ゾーン
Contact:

Re: How to make phpbb3 less resource intensive?

Post by AmigoJack » Wed Aug 21, 2013 12:42 pm

Your host wants to reduce DB connections. So you could try to user persistent DB connections. This is not directly configurable and requires for different DBMSs different minimum PHP versions (some DBMSs don't offer it at all). Using a good editor open /common.php and find:

Code: Select all

// Connect to DB
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, defined('PHPBB_DB_NEW_LINK') ? PHPBB_DB_NEW_LINK : false);
Change to:

Code: Select all

// Connect to DB
/*** 2013-08-21 BEGIN AmigoJack
  https://www.phpbb.com/community/viewtopic.php?t=2194600 ***/
$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, TRUE, defined('PHPBB_DB_NEW_LINK') ? PHPBB_DB_NEW_LINK : false);
/*** 2013-08-21 END ***/
Halfway tested (mysql layer on PHP 5.2.6 + MySQL 5.0.67). Of course, you need to know your previous conueries ratio to compare it with after this modification.
The worst thing about censorship is ███████████
Affin wrote:
Tue Nov 20, 2018 9:51 am
The problem is probably not my English but you do not want to understand correctly.
...
We will not come anybody anyway, nevertheless, it's best to shit this.

User avatar
5hocK
Registered User
Posts: 3011
Joined: Wed Nov 23, 2011 7:00 pm
Location: England

Re: How to make phpbb3 less resource intensive?

Post by 5hocK » Wed Aug 21, 2013 12:52 pm

Does this affect you yet? How many conueries am I allowed per month?
We still track them, but unless you're in the top .01% of our database users, you'll never need to worry about conuery usage again!
If not, why not ask your host how close you are.
A thread is pretty much a topic. Stop with the pedantics will ya.

User avatar
Mooncow
Registered User
Posts: 261
Joined: Tue Feb 25, 2003 8:10 am
Location: This Post
Contact:

Re: How to make phpbb3 less resource intensive?

Post by Mooncow » Wed Aug 21, 2013 1:22 pm

Thanks for the replies, to be honest i'm not too worried about any pressure from the host (none so far but it has been mentioned the conuery count was high in the past) but i do occasionally get slow downs and "internal server error"s when the db reads time out.

So really i'm just looking for some things that could help ease the server to avoid lags and internal server errors, and was thinking this would probably correlate with a lower conuery usage
I love teh phpBB

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50483
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to make phpbb3 less resource intensive?

Post by stevemaury » Wed Aug 21, 2013 6:22 pm

One easy thing you can do is to use permission roles rather than editing existing permission sets. Also, do not use user permissions.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Locked

Return to “[3.0.x] Support Forum”