News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Best Apache-based configuration for SMF?

Started by vii, October 07, 2020, 11:47:59 PM

Previous topic - Next topic

vii

So after a lengthy process of upgrading server hardware and database-tuning, we hit our first major surge of traffic and instead of handling it well, the server started to crap out. I resolved some of the issue by selectively disabling some forum features, but really a major problem seems to be that Apache is just not dealing with high connection counts very well. There were times where MySQL wasn't even that busy but Apache was chewing through CPU cycles and spiking load avg massively. Entire web server became pretty unresponsive during those periods.

Right now, it's just default with mod_php. What setup scales best? For various reasons I'd like to stick to Apache, but trying to figure out the best way to go with this. Would a php-fpm configuration handle higher concurrent user counts better (this topic is not my strong suit)? Most of the time the server has about ~300 people online (mix of guests/users), but a couple dozen times a year there are very high-activity days where user count will spike to ~3x or more the regular count.

Server specs are 2x E5-2609 (2.5ghz), 24gb RAM, uses a SSD.PHP 5.6 with OPCache and APCu for smf caching.

Any advice would be appreciated!

vbgamer45

php-fpm will handle a lot more. Install mod_http2 for Apache as well. Handles https requests with improved performance.
What is your SMF caching level set to
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor


vii

Caching level is set to 1 and I'm getting ready to test level 2 after changing a few things. The levels aren't quite the same on my forum because I've added a good bit of custom caching for things that SMF didn't do by default and for my own features I've added over the years.
Does mod_http2 require any other changes for website/forum to work with it, or is it basically just plug and play?

vbgamer45

mod_http2 is almost plug and play.
You have to make one change to  your apache config files to add support for your site.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vii

I suppose my last question would be, what would the ideal configuration for php-fpm be to handle a large surge of activity on a large forum?

In my research, I've gathered that since I have a lot of extra RAM to work with, setting the process manager setting to static would be better, but how many children is optimal? max_requests? I have about ~7gb of unspoken-for RAM to work with in any given high-traffic situation.

Advertisement: