Huge performance degradation in comparsion to phpBB 3.0

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Scam Warning
Post Reply
User avatar
lukasamd
Registered User
Posts: 100
Joined: Sat Jul 12, 2008 8:14 am
Contact:

Huge performance degradation in comparsion to phpBB 3.0

Post by lukasamd » Wed Dec 12, 2018 7:39 am

Hello, I have old, but still alive board on phpBB 3.0.x. Recently, I made test conversion to 3.1 and then to 3.2 to avoid issues with new PHP version (I plan to change 5.6 to 7.0/7.1).

Everything is ok except performance.
Small examples, I know, it isn't performance test, but should show difference:

On 3.0 forum index medium generation time is about 0.045s (PHP 5.6, opcache)
On 3.2 forum index medium generation time is about 0.220s (PHP 7.1, opcache)

On 3.0 topic view medium generation time is about 0.040s
On 3.2 topic view medium generation time is about 0.170s

It's huge difference. It's the same board on the same hosting platform (shared, but stable).
I checked cache, checking IP on blocklist, performance settings... eberything is fine, but performance is poor.

It's real performance overhead caused by using symfony components and new structure, or something else?

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

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by AmigoJack » Wed Dec 12, 2018 9:28 am

Yes, it is. Back then everybody argued that PHP7 has a performance boost in contrast to PHP5 that in fact the board would run faster. But the performance also dropped from 2.0 to 3.0, if you mind.

You might want to also read Re: High CPU load after update to 3.2 and Re: [RFC|Merged] Extensions.
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
lukasamd
Registered User
Posts: 100
Joined: Sat Jul 12, 2008 8:14 am
Contact:

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by lukasamd » Wed Dec 12, 2018 10:04 am

Ok, thanks for clarification, now it's clear... And I must consider this issue - make 3.0.x compatible with PHP 7 (there is available patch on internet for that) or maybe migrate to other, lighter software such MyBB (it was slower, but in past). I understand performance decrease after big changes in phpBB core but... it's important for small boards.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 21556
Joined: Fri Aug 29, 2008 9:49 am
Location: Caerdydd

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by Mick » Wed Dec 12, 2018 10:08 am

Also, don't forget there are dozens (I'm guessing) of user requested enhancements since 3.0, each one can take that little bit of extra cpu power. A bigger engine requires more fuel.
"The more connected we get the more alone we become" - Kyle Broflovski

User avatar
lukasamd
Registered User
Posts: 100
Joined: Sat Jul 12, 2008 8:14 am
Contact:

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by lukasamd » Wed Dec 12, 2018 10:23 am

Yes, it's clear and fully understandable. I only don't understand huge difference with disabled few features, think that footprint is caused by vendors code, not native phpBB.

User avatar
Lumpy Burgertushie
Registered User
Posts: 66723
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by Lumpy Burgertushie » Wed Dec 12, 2018 4:32 pm

and this "huge" degradation according to your tests is less than half of a second.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.2 Styles by PlanetStyles.net

If a tree falls in the forest and nobody is there, does it make a sound?

User avatar
canonknipser
Registered User
Posts: 2086
Joined: Thu Sep 08, 2011 4:16 am
Location: Germany
Name: Frank Jakobs
Contact:

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by canonknipser » Wed Dec 12, 2018 6:15 pm

Lumpy Burgertushie wrote:
Wed Dec 12, 2018 4:32 pm
less than half of a second.
don't compare absolute values, compare relative: it takes 4 to 5 times longer to generate the page. This is a significant difference.
Greetings, Frank
phpbb.de support team member
English is not my native language - no support via PM or mail
New arrival - Extensions and scripts for phpBB

User avatar
3Di
Former Team Member
Posts: 14202
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by 3Di » Wed Dec 12, 2018 6:24 pm

Like running the hundred meters in 10 seconds or forty-fifty, the winner is taking a shower and you still run.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
👨‍🏫 | Take a tour to | The Studio | 👨‍🏫

User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 3299
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by thecoalman » Thu Dec 13, 2018 1:39 am

AmigoJack wrote:
Wed Dec 12, 2018 9:28 am
But the performance also dropped from 2.0 to 3.0, if you mind.
huh? 3.0 is ridiculously faster than 2.0.... Took a little digging to find it but here is some benchmarks.
https://area51.phpbb.com/phpBB/viewtopi ... 10#p171200

I'll have to have a word to see if can get someone to try Apache-bench on various server setups. However, this might be eye opener, with me having had a dig around on archive.org on a now dead phpBB I used to run, and had incarnations running phpBB 1.2.x, 1.4.x, 2.0.x and now testing 3.x (converted from 2.0.x obviously) on exactly the same hardware configuration (Dual Pentium III-S 1.26 GHz, 1.5GiB RAM & 2x 60GB HDDs in RAID1):

phpBB1.4.x (vanilla) = index.php in ~0.070 seconds
phpBB2.0.0-ish (without template cache) => index.php in ~0.500 seconds
phpBB2.0.5-ish (with template cache) => index.php in ~0.250 seconds
phpBB3.0 CVS (vanilla) => index in ~0.080 seconds
phpBB3.0 CVS (with eAccelerator) => index.php in ~0.016 seconds :mrgreen: 8)

Getting back to the OP I'm not so sure how you run opcache on shared host, rough guess is phpBB is using about 15 to 20MB of RAM for opcache. You might want to try seeing what some opcache stat tools tell you, I have been using this one:

https://github.com/rlerdorf/opcache-status

There are some configurations that can be made to opcache, opcache.validate_timestamps=0. that will prevent opcache from checking the file on disk for changes. It's important to note that you need to clear opcache when you upload new php files. Conveniently, purging the cache in the ACP for phpBB invalidates all files in Opcache so they will be reloaded from disk.
On 3.2 topic view medium generation time is about 0.170s
Is that from the browser or phpBB's footer? Not sure what kind of times I'm getting from the actual script but that's what I'm getting from the browser.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

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

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by AmigoJack » Thu Dec 13, 2018 8:03 am

Oh, the index. The page I'm requesting most, in contrast to viewtopic and viewforum. Measuring the generation of those would make the picture more accurate. However, I'm surprised all the permission checking in 3.0 should be faster than in 2.0, plus all additional code loaded per page...
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
thecoalman
Community Team Member
Community Team Member
Posts: 3299
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by thecoalman » Sun Dec 16, 2018 5:24 am

AmigoJack wrote:
Thu Dec 13, 2018 8:03 am
Oh, the index. The page I'm requesting most, in contrast to viewtopic and viewforum. Measuring the generation of those would make the picture more accurate. However, I'm surprised all the permission checking in 3.0 should be faster than in 2.0, plus all additional code loaded per page...
I actually ran 2.X forum software, think I started with 2.0.7 or something like that. If I recall correctly everything was faster across the board.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison

User avatar
JoshyPHP
Code Contributor
Posts: 1026
Joined: Mon Jul 11, 2011 12:28 am

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by JoshyPHP » Tue Dec 18, 2018 2:39 pm

jjndig wrote:
Tue Dec 18, 2018 11:44 am
we should be optimising things (in general, not just phpBB, and I have nothing against the software btw, I really like phpBB) and not just expecting people to have the resources/will to "get better specs"
Ok, then who does "we" refer to in that sentence? Who do you expect to spend their resources on optimising things? Optimisation isn't a fresh coat of paint that can be slapped on a finished software. Only a big rewrite requiring hundreds/thousands of person-hours would make phpBB significantly more efficient and more performant.

Wishing for faster software is like wishing for cleaner air. It's difficult to implement after the fact and it has a cost which has to be paid by someone.
I wrote the thing that does BBCodes in 3.2.

jjndig
Registered User
Posts: 8
Joined: Tue Dec 18, 2018 11:31 am
Location: England

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by jjndig » Tue Dec 18, 2018 2:55 pm

just ignore everything I said. I mostly was rambling irrelevantly.

it's not like I have any coding experience etc either

User avatar
JoshyPHP
Code Contributor
Posts: 1026
Joined: Mon Jul 11, 2011 12:28 am

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by JoshyPHP » Tue Dec 18, 2018 3:15 pm

Fair enough. It's difficult to admit being wrong so I appreciate your response.
I wrote the thing that does BBCodes in 3.2.

jjndig
Registered User
Posts: 8
Joined: Tue Dec 18, 2018 11:31 am
Location: England

Re: Huge performance degradation in comparsion to phpBB 3.0

Post by jjndig » Tue Dec 18, 2018 4:48 pm

JoshyPHP wrote:
Tue Dec 18, 2018 3:15 pm
Fair enough. It's difficult to admit being wrong so I appreciate your response.
Yeah, I reread my post and it didn't make much sense :P

It does take a lot of time and effort to fully optimise things nowadays, I guess. Especially when there are so many different things to take into account now such as operating systems, etc. and also things like dependencies used in the software. Involves a lot of testing because one quick fix on one area can break completely another configuration (keep in mind I don't know much but want to try to contribute to the discussion)... :P

Post Reply

Return to “phpBB Discussion”