Jump to content

Server setup for a busy forum


Recommended Posts

I'm interested to hear what is recommended.

Currently using php 7.1, set to dso, using php-fpm and opcache. my mod_expires looks like this without the ExpiresDefault "now plus 1 week" line as it seems to clash with opcache (pages are out of date, users logged out until page is refreshed), still not to find much more info on this.

Apache 2.4

apache.thumb.png.a677b3ec197f5c1c6c0d7de9335f498b.png

PHP

php71.thumb.png.52804e83fc43dbf35e28b9cea3ac0c7b.png

Speed is ok but it could be faster with each click. Any advice welcome

Link to comment
Share on other sites

On the above it will be good if you increase the Max keep alive requests at least at the default value or even better at 200 - 300 ....

Also for the memory limit it will be good if you have free ram to increase it at values of 512 or even 768 MB....

Don't know what kind of server do you have Ram, Cpu and how much you use and how much is free or how  much traffic do you get and so on.... so my recommendations are for testing only...

The issue for the opcache is another story .....

Link to comment
Share on other sites

Yes I thought keep-alive was a bit low, I think my hosts set it as that. I can get big surges in traffic, would increasing keep-alive cause issues if I had say 1000 online.

I have 64gb ram, 24gb currently used. what benefits are from upping the memory limit?

Processor is Intel(R) Xeon(R) CPU X5550 @ 2.67GHz

Any idea about the opcache issue? Had it for a year anytime I add expiresdefault it causes that issue

Link to comment
Share on other sites

Quote

I have 64gb ram, what benefits are from upping the memory limit?

Better performance :)

Quote

Any idea about the opcache issue? Had it for a year anytime I add expiresdefault it causes that issue

As i have many years to use such configuration my recommendation may not be accurate but i remember it was related to:

PHP_FCGI_CHILDREN=1
PHP_FCGI_MAX_REQUESTS=10000

The children was needed to be 1 otherwise a lot of issues like yours waiting at the corner :)

But again that info may not be accurate at all for your case !

Link to comment
Share on other sites

No....

For performance you can use something like:

pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 49
pm.max_requests = 1000

 

You may need to test some values if you want:

!!!First backup your existing values as you may need to revert them !!!

(Use php --ini command from ssh to locate the zendopcache config file or try to locate it on any way that cpanel provide for it....)

opcache.memory_consumption=80
opcache.interned_strings_buffer=8
opcache.max_wasted_percentage=5
opcache.max_accelerated_files=24000
opcache.revalidate_freq=180
opcache.fast_shutdown=0
opcache.enable_cli=0
opcache.save_comments=1
opcache.enable_file_override=1
opcache.validate_timestamps=1
opcache.huge_code_pages=1

 

Then save and restart Phpfpm and check :)

Other than that i am not able to help sorry :(

Link to comment
Share on other sites

I tend to leave it to my host to edit stuff as if it goes wrong my site will be down which I can't risk. These are my current opcache settings.

opcache.enable_cli = 1
opcache.fast_shutdown = 1
opcache.interned_strings_buffer = 8
opcache.max_accelerated_files = 4000
opcache.memory_consumption = 300
opcache.revalidate_freq = 60

Should I ask to change them to yours?

Link to comment
Share on other sites

1 minute ago, ASTRAPI said:

That's related to server performance and optimization of system network/kernel/apache/phpfpm/Mysql e.t.c

Another thing to check is if you have many addons loaded on the forum and if any of them cause a lot of delay....

I'm clueless as to what I should be looking at hence the topic and screenshots of php/apache,  I can provide any other details.. I don't have many hooks/addons though.

Link to comment
Share on other sites

@ASTRAPI I asked about the keep alive requests and was told this

"You will find if this limit was increased your system wouldn't be able to move onto handling a new connection as quickly due to the way your website is poorly optimized for connection requests"

I get told this a lot about the software from my hosts? Is there any truth in that @Charles

Link to comment
Share on other sites

2 hours ago, marklcfc said:

"You will find if this limit was increased your system wouldn't be able to move onto handling a new connection as quickly due to the way your website is poorly optimized for connection requests"

It's easier to blame others :p

Link to comment
Share on other sites

On 07/09/2017 at 12:12 PM, Charles said:

No idea what they mean by poorly optimized for connection requests. Sounds like your host is artificially limiting your service. 

IPS adds the header "Connection: close" in the PHP code (file "system/Output/Output.php"), which disables the KeepAlive.  So unless I missed something in the tests I made a while ago, the host's statement seems reasonable to me.

BTW, I asked here if there was any reason to explicitly send that header through PHP.

Link to comment
Share on other sites

On 9/6/2017 at 7:30 PM, ASTRAPI said:

Also for the memory limit it will be good if you have free ram to increase it at values of 512 or even 768 MB....

Didnt think the memory_limit would increase performance as its just a script cap on execution not caching unless it does more?

Link to comment
Share on other sites

When a script starts it may need 512 ram to run the task and you will get limited if you have 256MB and that will cause a delay that's why i recommend to use something higher....

It doesn't mean that opening a page will load faster but running scripts like tasks or any long running or in general scripts that needs more ram it will help :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...