PHP-FPM enabled by default on account creation

jmginer shared this idea 10 months ago
Completed

Hello, since the last 60 release, in the "MultiPHP Manager" there is a option to enable PHP-FPM on each domain that is not using the inherit PHP version.

Will be interesting, if we can configure the server to auto-enable PHP-FPM on a account creation.

Thanks.

Best Answer
photo

This is now public, and available in v66 in the CURRENT tier! Get a quick overview of all the improvements on the version 66 Release Site. If you have questions, feel free to join me for the next few hours in this public hipchat room:

https://www.hipchat.com/gQ7xUUD7i

Comments (31)

photo
1

I came here from a support request. Really surprised it's not possible to use FPM by default!

photo
1

We've been discussing internally what it would take to get this request resolved. It's not officially on the roadmap yet, but it's definitely something we'd like to get added.

photo
1

I believe PHP-FPM should be the default configuration for all accounts in cPanel because it causes infinitely less load compared suPHP. and that means every cPanel machine that runs PHP will have just a fraction of its current load, saving cPanel's customers combined millions in hosting fees and enabling them to scale much easier.

suPHP on our server caused 5 times the load compared to PHP-FPM. PHP-FPM has all the security advantages of suPHP, combined with the raw speed of DSO. there is no major downside. everyone wins.

photo
1

On my hosting statistic suPHP is a best choice for users by default (too many different cms/sites etc). How about easy modify and use many different php.ini files with PHP-FPM?

photo
photo
1

Hello everybody. I would like to analyze and discuss the pros and cons of having PHP-FPM enabled for everyone in a shared server with 350 accounts and only 8 GB of RAM. The load, we know, will be kept at remarkably/unbelievable low values, but what about RAM usage? Is there any possibility that this feature become a resource hog?

And what could happen with resource usage when cPanel release FastCGI options?

photo
2

The RAM usage of FPM is similar to the old mod_fcgid.

The FPM Pool process tries to reuse the currently opened PHP process for that user, only opening new ones when it have concurrent requests.

When use SuPHP every php request create a new process without any reuse or speed or cpu optimization, wasting much more time, CPU and RAM.

When use mod_php (dso, with or without ruid2), most of the PHP engine is preloaded in apache main process, diminishing the RAM and CPU usage per PHP process, but in other hand it don't support any other apache MPM than prefork, so the apache will initiate a new process per request wasting much more RAM than any other way, and part of PHP engine is loaded in each apache child process, even for non-php content.

That's the why the FPM/FastCGI process are much more efficient, it's a surprise to see that it's don't enabled by default.

photo
photo
1

Hi Kent,

You're right to ask this. I think with the benefits of the increased performance, overall you could end up with both less load and perhaps the same level of RAM usage. I didn't experience any noticeable increase in RAM usage when switching to PHP-FPM. If needed you could decrease the size of your server's database caches (we kept ours the same size) and in the end you're performance would still be much, much better than before.

Alex

photo
1

PHP-FPM really bring great performance improvement, and about 5-6 times lower CPU usage, almost without changes in RAM usage.

There could be some RAM usage increase with lot of accounts, but that is why this feature should be implemented to allow us to configure this per hosting package or feature list, so that we can create hosting packages that will use PHP-FPM by default, and also have other packages that will use SuPHP or CGI or whatever is configured as default on the server.

photo
3

This request has made it to one of our product backlogs! We may (and I stress MAY) be able to squeeze this into the development for version 64, but it's not for sure yet and there are many moving parts that could push it out further. As soon as I know anything for sure I'll let you know!

photo
1

Hi benny.

Is there an change in v64 on this feature?

photo
1

There's no official word yet, but it looks like the work for this hasn't gotten started yet. Since we're just two weeks from the end of feature development for version 64, I'd say it's pretty unlikely. I'll update again once we hit the end of feature development.

photo
photo
2

I just checked in with the team that had this on their backlog for version 64 and can confirm that this will not make it into version 64. It's on the list for discussion as we go into planning for version 66, but we don't have anything firm yet. As soon as I know more, I'll be back!

photo
1

Hi Benny;

We are ready to wait for v66.

This function is especially important for system administrators, and the sooner we will be, the happier we will be.

Good luck cpanel team. :)

photo
4

This is on the list of goals for version 66! Once it gets developed and is available for public testing in an EDGE version I'll be back to let everyone know!

photo
3

This is now in a public EDGE-tier build of cPanel & WHM:

* Implemented case CPANEL-13191: Allow setting PHP-FPM for new accounts by default.

* Implemented case CPANEL-13227: Enable PHP-FPM on all domains as they are created.

Please do take a look, if you have a server on the EDGE tier. Otherwise, look forward to it being included in version 66!

photo
1

Great news !

Do we have an ETA regarding version 66 ? Not exactly, just a tentative/aproximate date so we could decide if we go now for 64 or if we wait for 66, as this feature is important enough for us to maybe delay our new installs.

Regads,

photo
2

66 will go to the CURRENT tier sometime in late June or early July.

photo
1

This is awesome. Thank you!

photo
photo
1

Hi Benny,

This will also apply to Addons and Subdomains when they are created or just for the main domain ?

photo
2

I don't know the answer to that question, but I will ask!

photo
1

Hi all.

I tested it.

It works fine for subdomains, but the addon domains does not work.

photo
2

I just heard back from our developers: they should both work, however there's a bug with addon domains. We're taking a look, and by the time it goes to production it will support both.

photo
photo
1

Great News ! Look forward to v66 - one question though, while being able to enable FPM by default can we also set default pool options so that we don't have to manually change each one? Or would this be an additional feature request?

Thanks

photo
1

That would be an additional request, it looks like.

photo
1

@Greg: That's an interesting point. Let us know if you open it as a new request.

photo
2
photo
1

@Marcelo Sorry I haven't had time to do one - work has been real busy atm however I will happily up vote any related request. If the one John posted doesn't cover what we need

photo
2

@Greg + @John Hawkins : I think the thread linked by John is what we were talking about. Liked and following now.

Thanks John!

photo
1

@Marcelo I have just managed to have a read at the request and I agree that seems to cover what we are looking for Liked and following too !

@John thanks for sharing that link with us

photo
photo
2

Thank you, thank you, thank you, Benny and cpanel team.

I'll start testing.

photo
2

This is now public, and available in v66 in the CURRENT tier! Get a quick overview of all the improvements on the version 66 Release Site. If you have questions, feel free to join me for the next few hours in this public hipchat room:

https://www.hipchat.com/gQ7xUUD7i