MRatWork Forum by Mustafa Ramadhan - [ASK]bantuin optimasi php-fpm

Sponsor:
Server and Web Integrator
Link:
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:

MRatWork Forum | Please login or register. | 2017-11-07, 16:36:48

- MRatWork Forum by Mustafa Ramadhan »
- Language Specific Discussions »
- Indonesia Users »
- [ASK]bantuin optimasi php-fpm

« previous next »

- Print

Pages: [1] Go Down

### Author Topic: [ASK]bantuin optimasi php-fpm (Read 2010 times)

0 Members and 1 Guest are viewing this topic.

#### prandah

- Senior Member
- Posts: 343
- Karma: +0/-0

##### [ASK]bantuin optimasi php-fpm

« on: 2013-03-03, 19:08:54 »
halo,
saya ada masalah dikit nih, untuk penggunaan load di bagian php-fpm di server saya.
karena penggunaan php-fpm di server sedikit memakan resource cpu nya
untuk sementara saya ubah childrenya manjadi "3"
tapi apakah ada saran lain ?
untuk visitor saya sekita 10000 - 25000 uv perday
untuk server spesifikasinya
AMD Phenom II x6 1045t
3.2Ghz Turbo
6core/6thread
ram 8GB swap 5gb
untuk cat dari /home/php-fpm/tpl/custom.php53-fpm-pool.conf.tpl
Code: [Select]

    <?php
        $userinfo = posix_getpwnam($user);

        if ($userinfo) {
            $fpmport = (50000 + $userinfo['uid']);
        } else {
            return false;
        }

        if ($user == 'apache') {
            $pool = 'default';
        } else {
            $pool = $user;
        }

        $maxchildren = '3';

    ?>
    [<?php echo $pool; ?>]
    listen = 127.0.0.1:<?php echo $fpmport; ?>

    listen.backlog = -1
    listen.allowed_clients = 127.0.0.1
    user = <?php echo $user; ?>

    group = <?php echo $user; ?>

    pm = dynamic
    pm.max_children = <?php echo $maxchildren; ?>

    pm.start_servers = 1
    pm.min_spare_servers = 1
    pm.max_spare_servers = 2
    pm.max_requests = 500
    ;pm.status_path = /status
    ;ping.path = /ping
    ;ping.response = pong
    request_terminate_timeout = 0
    request_slowlog_timeout = 0
    slowlog = /var/log/php-fpm/slow.log
    rlimit_files = 1024
    rlimit_core = 0
    ;chroot =
    ;chdir = /var/www
    catch_workers_output = yes
    security.limit_extensions = .php .php3 .php4 .php5

    env[HOSTNAME] = $HOSTNAME
    env[PATH] = /usr/local/bin:/usr/bin:/bin
    env[TMP] = /tmp
    env[TMPDIR] = /tmp
    env[TEMP] = /tmp

    ;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f webmaster@domain.com
    ;php_flag[display_errors] = off
    php_admin_value[error_log] = /var/log/php-fpm/error.log
    php_admin_value[session.save_path] = /var/lib/php/session
    php_admin_flag[log_errors] = on
    php_admin_value[memory_limit] = 256M

« Last Edit: 1970-01-01, 01:00:00 by Guest »
Logged
Main Main Kesini

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: [ASK]bantuin optimasi php-fpm

« Reply #1 on: 2013-03-03, 19:41:08 »
Untuk RAM 8 GB sebenarnya anda bisa setting total maxchildren 200 (bahkan sampai 400). Artinya 200 dibagi jumlah client anda (admin dan default dihitung).
Jadi kalau client anda kurang dari 10 rasanya diset '25' untuk maxchildren akan sangat cukup.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

#### prandah

- Senior Member
- Posts: 343
- Karma: +0/-0

##### Re: [ASK]bantuin optimasi php-fpm

« Reply #2 on: 2013-03-03, 19:50:48 »
jadi tidak dihitung per domain yah ?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Logged
Main Main Kesini

#### MRatWork

- Administrator
- The Elite
- Posts: 15,381
- Karma: +112/-9
- Gender:

##### Re: [ASK]bantuin optimasi php-fpm

« Reply #3 on: 2013-03-03, 20:08:49 »
Per-user.
« Last Edit: 1970-01-01, 01:00:00 by Guest »
Logged
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

- Print

Pages: [1] Go Up
« previous next »

- MRatWork Forum by Mustafa Ramadhan »
- Language Specific Discussions »
- Indonesia Users »
- [ASK]bantuin optimasi php-fpm

Top 4 Global Search Engines: Google Bing Baidu Yahoo

- Design By SMFSimple.com
- SMF 2.0.14 | SMF © 2017, Simple Machines

Page created in 0.029 seconds with 16 queries.

Mirror created by MasterkinG32.CoM