[RFC] Enable gzip by default

These RFCs were either rejected or have been replaced by an alternative proposal. They will not be included in phpBB.
User avatar
JoshyPHP
Registered User
Posts: 381
Joined: Fri Jul 08, 2011 9:43 pm

Re: [RFC] Enable gzip by default

Post by JoshyPHP »

I don't know about others but personally when I read "I've been X for Y years", I take that as an admission that the discussion isn't based on facts. I think that what XTF meant is that having "five 2meg images" doesn't have any relation to the amount of CPU spent compressing the HTML. gzip only applies to HTML.

Absent of the discussion is the level of compression that would be used. There's a big difference between 1-3, the proverbial 5 and 7-9. A cursory look into phpBB's sources tells me it compresses pages with ob_gzhandler, but I don't know what its default compression level is. It might be a magic value. A quick test on a local server seems to indicate it would be 9, but it might change depending on the size of the page.

User avatar
Master_Cylinder
Registered User
Posts: 361
Joined: Wed Jul 31, 2013 9:54 pm

Re: [RFC] Enable gzip by default

Post by Master_Cylinder »

When I read "You really don't know what you're talking about, do you?" I think troll... :D

My point was and still is that "typical" varies. Perhaps I shouldn't have included images in regards to the gzip discussion but as part of the "what is typical" part it's still valid. Posts that are only 5 lines long might be typical but what about the posts that are 30k char (or more) long? What about forums with more than a couple hundred people posting/viewing? The load seen here at area51, whether typical or not, doesn't change the fact that a many forums are going to have a higher load and could be at risk of suspension. I still say it's better to turn on gzip than have it on by default.
These kids today...
Buy them books, send them to school and what do they do?

They eat the paste. :lol:

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

Re: [RFC] Enable gzip by default

Post by JoshyPHP »

There's no reason for the guy to troll his own topic. He might have been a rude, but posting something so off the mark and/or poorly tought out is a form of rudeness too.

When I say "so off the mark" I'm referring to how you linked images to compression in almost every sentence. I think that when you posted you thought that images would effect the compression. At the risk of sounding condescending, it's ok to say something wrong if you correct it without escalating the situation. You also posted about the redirection taking 1.2 which... I'm not sure what that was about really. I don't know where that number comes from but a lot of it is network latency (for the redirection) and time spent inserting the edited post in the database (for the edit, and that's mostly because of full text indexing.) Not to mention that the board runs in debug mode so the container is rebuild on every page, which massively impacts the performance.

Anyway, back to the topic I'm nowhere as optimistic as A_Jelly_Doughnut about the typical HTML page (unless he was talking post-compression.) I'd place the "typical" phpBB page between 15 (index) and 150 KB (viewforum with 50 topics) depending on content. I think that basing any calculation on 50-60 KB of HTML would be a good value. I wouldn't call a forum where individual posts are 30 KB "typical". It's more of a pathological case IMO.

As for whether to enable gzip by default, I didn't mention it but I would be wary of doing so. Mainly because the people who would benefit from it are too inexperienced to find it or turn it on in the admin panel, and I'd expect to be a big overlap with people using a bad host at risk of somehow getting suspended because of it and they end the highest cost in term of support. Perhaps the setting could be shown in one of the install screens? Leave it off by default and hope that most people will turn it on during install. That might be a good compromise. I see everything in terms of cost:benefit: how much does it help and how is it going to affect the support forums? Or can you just enable it in a point release and if you see an increase in support requests you can disable it back in a quick patch release? I don't know. Risk aversion might win on this one.

User avatar
Master_Cylinder
Registered User
Posts: 361
Joined: Wed Jul 31, 2013 9:54 pm

Re: [RFC] Enable gzip by default

Post by Master_Cylinder »

There no reason to troll at all but they do it...and arguing if he was trolling because I didn't agree with what he wanted or just being rude is just semantics. :roll:

Thinking about this a little further; *IF* the devs were only considering the brand new install, with no members or content then it wouldn't matter if they enabled it by default. As the server grows they could disable it, if the load was getting too high. They'd have to have a host that reports CPU usage for that though. Several of my hosts only report traffic and disk usage, not CPU. The dedicated servers and self-hosted servers don't really matter for CPU.

If the server is being upgraded and it already has a lot of users/content/traffic then they've probably already chosen to enable it (or decided not to) and an upgrade should keep their settings.

The only place that I can think of where it might matter is a forum conversion from something else to phpBB. I might be missing another example where it might matter...

So..maybe it's not *that* big of a deal to enable it as a default...but it'd be easier to notice approaching traffic limits than CPU limits so maybe that's reason enough to leave it as is. On the flip side the pages would load faster but I'm not sure that's enough reason to change for a new install either.


EDIT:
JoshyPHP wrote: You also posted about the redirection taking 1.2 which... I'm not sure what that was about really. I don't know where that number comes from but a lot of it is network latency (for the redirection) and time spent inserting the edited post in the database (for the edit, and that's mostly because of full text indexing.) Not to mention that the board runs in debug mode so the container is rebuild on every page, which massively impacts the performance.
When we submit the edited topic we go to the intermediate page (I'm not sure what phpBB calls it) where you can choose go to the post or the forum, that page said 1.2s, then back to the topic which was less. Yes, debug matters too and I forgot that it was enabled here. (1.489s for this edit)
These kids today...
Buy them books, send them to school and what do they do?

They eat the paste. :lol:

User avatar
Pony99CA
Registered User
Posts: 986
Joined: Sun Feb 08, 2009 2:35 am
Location: Hollister, CA
Contact:

Re: [RFC] Enable gzip by default

Post by Pony99CA »

There's a bandwidth/CPU tradeoff, so unless we can be reasonably sure that changing the setting would be a good thing for most boards, we should leave it alone.

Could the "send board statistics" function be tweaked somehow to provide load information for both versions? (I don't know how you'd get load information for the entire board, of course, but maybe the statistics feedback section could ask the admin for a "typical" topic URL....) I'm just winging it, so please don't jump all over me for a blue sky suggestion. :D

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.

User avatar
Master_Cylinder
Registered User
Posts: 361
Joined: Wed Jul 31, 2013 9:54 pm

Re: [RFC] Enable gzip by default

Post by Master_Cylinder »

Pony99CA wrote:There's a bandwidth/CPU tradeoff, so unless we can be reasonably sure that changing the setting would be a good thing for most boards, we should leave it alone.
That's the question and I don't know how we'd get a definitive answer since we can't get usage and limits for everyone. The ones that it would help would love it and the ones it'd hurt would hate it....either way the default goes. I now think that the biggest reason to leave it alone is that many hosts don't report CPU usage so the suspension would be more of a surprise where everyone reports traffic...if they have a limit. On a new forum install it wouldn't matter either way.
These kids today...
Buy them books, send them to school and what do they do?

They eat the paste. :lol:

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Enable gzip by default

Post by EXreaction »

We have no easy way of finding out which issue is more likely to be presented to a board owner. The common practice for the lowest quality host is "unlimited" traffic, so I would assume traffic is the lesser issue to most. For those with limited traffic and extra cpu resources, they may enable gzip.

XTF
Registered User
Posts: 49
Joined: Sun Dec 04, 2011 6:31 pm

Re: [RFC] Enable gzip by default

Post by XTF »

Has gzip CPU usage been quantified?
Is gzip the only setting that's disabled to avoid CPU usage?

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Enable gzip by default

Post by EXreaction »

There are a variety of settings that increase or decrease performance.

Nobody has presented benchmarks so far. Until someone does so in order to prove their point (at which point we'll reconsider this), this is rejected.

Post Reply