Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-25, 01:20:39

Author Topic: Which PHP Type to set on webserver config  (Read 3050 times)

0 Members and 1 Guest are viewing this topic.

Offline mawerick

  • Junior Member
  • *
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Which PHP Type to set on webserver config
« on: 2016-12-13, 20:26:05 »
I need expert opinion about Webserver config / PHP Type

Situation:
Kloxo MR on dedicated server with 8gb RAM, 3.2ghz dual core CPU. CentOS 6.
Server is personal, not for resell. Only I administrate it.
Host 5,6 websites(like 9gag), with huge image bandwidth traffic.

My question is, which PHP type better fits for me:

mod_php_ruid2
mod_php_itk
suphp
suphp_event
suphp_worker
php-fpm_event
php-fpm_worker
fcgid_worker


Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Which PHP Type to set on webserver config
« Reply #1 on: 2016-12-14, 03:30:50 »
1. Prepare with php-fpm_event
2. Separated each domain to each client
3. Set 'fastcgi childrens' to '12' - '24' for every clients in 'limit'
4. Change 'php-fpm type' to 'dynamic' in 'php configure' for every client
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline BigWeb.EU

  • Valuable Member
  • *
  • Posts: 114
  • Karma: +0/-0
    • View Profile
Re: Which PHP Type to set on webserver config
« Reply #2 on: 2016-12-14, 11:54:08 »
Mustafa,

What about the situation where server is 4GB RAM / 4Cpu and / php56m / fpm_event

Clients count is 15, with 25 websites at all

out of those 15 clients 2 have average traffic, rest have very small traffic ,

but when i ran "top" i see each client has 4 "php-fpm" processes . Thus 60 php-fpm processes running (i assume consuming memory?)

could you advise how i can tune this model ? maybe switching to another?

Thanks

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Which PHP Type to set on webserver config
« Reply #3 on: 2016-12-14, 13:20:56 »
By default, max php-fpm/fastcgi children is 6 (as the same as 'unlimited') where min-spare is 1/6 x max children and max-spare is 1/3 x max children. But, min and max-spare no less than 2.

In your situation, try decrease max children to 4 for low traffic and stay to 6 or more to high traffic. Max sure using 'ondemand' for 'php-fpm type' for low traffic.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline BigWeb.EU

  • Valuable Member
  • *
  • Posts: 114
  • Karma: +0/-0
    • View Profile
Re: Which PHP Type to set on webserver config
« Reply #4 on: 2016-12-14, 16:25:59 »
OK, thanks !

Offline mawerick

  • Junior Member
  • *
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: Which PHP Type to set on webserver config
« Reply #5 on: 2016-12-14, 19:10:03 »
1. Prepare with php-fpm_event
2. Separated each domain to each client
3. Set 'fastcgi childrens' to '12' - '24' for every clients in 'limit'
4. Change 'php-fpm type' to 'dynamic' in 'php configure' for every client

I'm not sure how to implement point 2,3 and 4. Can i see somewhere manual/instructions or explain my in short in which menus/config files to change.

Someone to help ?
« Last Edit: 2016-12-19, 21:03:16 by mawerick »

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine

Page created in 0.05 seconds with 22 queries.

web stats analysis