Categories
linux load test

Formula mengira pm.max_children untuk PHP FPM

Dapatkan jumlah RAM dalam MB dan /run/shm dalam MB

[code lang=’plain’]$ awk ‘/MemTotal/ {printf(“%.2f\n”,$2/1024)}’ /proc/meminfo
128756.27

$ df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/app1–vg-root 541986 42284 475016 9% /
none 1 0 1 0% /sys/fs/cgroup
udev 64368 1 64368 1% /dev
tmpfs 12876 2 12875 1% /run
none 5 0 5 0% /run/lock
none 64379 0 64379 0% /run/shm
none 100 0 100 0% /run/user
/dev/sda2 237 45 180 20% /boot
/dev/sda1 511 4 508 1% /boot/efi
/dev/dm-2 307196 83294 223903 28% /var/www[/code]

Formula:

(((TotalMemoryinMB-TMPFSinMB)*.8)/75)

(((128756.27-64379)*.8)/75) = 686

Sumber: http://ispeakl33t.com/calculate-pm-max_children

Leave a Reply

Your email address will not be published. Required fields are marked *