phpBB 3.1 load

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The current feature release of phpBB 3 is 3.3/Proteus.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 3.3.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
User avatar
DoYouSpeakWak
Registered User
Posts: 4
Joined: Thu Nov 28, 2013 12:45 pm

phpBB 3.1 load

Post by DoYouSpeakWak »

Hey Everybody

In the past few days iwe been testing 3.1 and comparing it with 3.0.12. One issue that became obvious from the start was the load diffrence. Here is an example.

All tests done on the same server. Latest php and mysql (as of today). vanilla phpbb packages with no code changes or extensions/mods installed.

Old:

Code: Select all

Time : 0.023s | 9 Queries | GZIP : Off | Memory Usage: 2.91 MiB
Page generated in 0.0552 seconds with 10 queries + 4 queries returning data from cache
Time spent on mysqli queries: 0.00873s | Time spent on PHP: 0.04652s
New:

Code: Select all

Time : 0.158s | 13 Queries | GZIP : Off | Peak Memory Usage: 9.74 MiB
Page generated in 0.1681 seconds with 12 queries + 3 queries returning data from cache
Time spent on mysqli queries: 0.00947s | Time spent on PHP: 0.15863s
As you can see the new 3.1 version is alot heavier than the old version. Added to that the old version works out of the box with apcu and zend cache. The new version has no gain in speed if you install those packages and just load the forum.

Too me thats moving in the wrong direction. I know added features is added load, but speed and snappiness is something the users are used to, now they will get a lower quality product in that regards at least.

Wak

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: phpBB 3.1 load

Post by Paul »

While iam not a developer, iam pretty sure there happens some stuff during DEBUG, what doesn't happen/is cached during normal operations. This causes the higher times.

User avatar
DoYouSpeakWak
Registered User
Posts: 4
Joined: Thu Nov 28, 2013 12:45 pm

Re: phpBB 3.1 load

Post by DoYouSpeakWak »

Indeed. I read somewere that cache and other stuff are disabled when debug is on, this just makes it very hard to determine how well and how fast your board runs. Im not sure this is correct though.

When you enable Zend op cache and apcu. The memory load do drop a bit. But only down to non cached 3.0.X levels.

3.1

Code: Select all

Time : 0.109s | 12 Queries | GZIP : Off | Peak Memory Usage: 3.75 MiB
Page generated in 0.109 seconds with 12 queries + 3 queries returning data from cache
Time spent on mysqli queries: 0.00932s | Time spent on PHP: 0.09967s
3.0.12

Code: Select all

Time : 0.018s | 10 Queries | GZIP : Off | Memory Usage: 774.95 KiB
Page generated in 0.0283 seconds with 10 queries + 4 queries returning data from cache
Time spent on mysqli queries: 0.00703s | Time spent on PHP: 0.02127s

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: phpBB 3.1 load

Post by MattF »

All that extra load is because phpBB is now using SEVERAL behind the scene frameworks... Symfony, Twig, Phing, phpUnit, fapbot, guzzle, composer.

This has been discussed before, BTW: viewtopic.php?f=81&t=43957
Has an irascible disposition.

User avatar
DoYouSpeakWak
Registered User
Posts: 4
Joined: Thu Nov 28, 2013 12:45 pm

Re: phpBB 3.1 load

Post by DoYouSpeakWak »

Thanks for the link VSE+

Thats bad news. You can even feel it here on this board, is slower than before the upgrade. The load thats discussed in the link, is not the problem. Servers can handle it, i just hate to downgrade when it come to speed. Same when i buy a new model car, it has to be better,faster than the old model. If they make it heavier and slower then its another model to some extend. But that discussion is over i guess.

At least know i will have an in depth answer for those users that will complain about the new version being slower than the old version.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: phpBB 3.1 load

Post by JoshyPHP »

VSE+ wrote:All that extra load is because phpBB is now using SEVERAL behind the scene frameworks... Symfony, Twig, Phing, phpUnit, fapbot, guzzle, composer.
Phing and PHPUnit are only used during development, and a quick search indicates that so is guzzle. I don't know what a fapbot is, maybe I'll Google that later... :roll: What you're left with is Symfony, Twig and Composer. So what does that mean? Well, nothing. Listing dependencies doesn't say anything about the general performance. Some of them have a cost at runtime but not all of them, some of them add something new but others replace old code and may be more efficient.

My point is this: dependencies are no indication of efficiency. A quick informal benchmark tells me that the "Welcome to phpBB3" page of a fresh install is definitely slower in 3.1 than in 3.0, but it's impossible to say why with any degree of confidence without any kind of profiling. On a side note, if you want to benchmark phpBB with ab or siege make sure you don't inadvertently benchmark your database instead. phpBB creates a new session for every anonymous user with no session_id. My workaround was to bench 1 request then lift the session_id from the database to use it in the URL.
DoYouSpeakWak wrote:You can even feel it here on this board, is slower than before the upgrade.
Of course it is! Debug runs 10x slower than non-debug. There's some pretty big stuff that happens in debug mode that wouldn't happen otherwise. It's like recompiling an application before every request.

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: phpBB 3.1 load

Post by Paul »

DoYouSpeakWak wrote:You can even feel it here on this board, is slower than before the upgrade.
Because this board runs in DEBUG mode as well ;). You really should compare non DEBUG versions instead of DEBUG versions. DEBUG should not be used in production.

User avatar
DoYouSpeakWak
Registered User
Posts: 4
Joined: Thu Nov 28, 2013 12:45 pm

Re: phpBB 3.1 load

Post by DoYouSpeakWak »

It doesnt really matter. Its slower, As confirmed here. viewtopic.php?f=81&t=43957#p251247. You can disable debug on your test board and compare the two versions if you like. Im sure you will come to the same conclusion.

User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: phpBB 3.1 load

Post by JoshyPHP »

I don't think anybody in this thread is arguing that 3.1 performs the same as 3.0.
DoYouSpeakWak wrote:It doesnt really matter. Its slower, As confirmed here. viewtopic.php?f=81&t=43957#p251247
The post you linked is entirely focused on memory usage and says nothing about speed though. The claim that 3.1 is generally slower than 3.0 may be true, and my limited experience indicates that it is, but memory usage is not evidence of that.

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: phpBB 3.1 load

Post by Danielx64 »

Can someone post some information about cpu load? That could be an issue for some shared hosts (like free ones and low cost ones)

Post Reply