mengurangi pemakaian memori php-fpm pada hosting dengan banyak user
misal path php-fpm.conf di /usr/local/etc:
backup php-fpm.conf:
# cp /usr/local/etc/php-fpm.conf /usr/local/etc/php-fpm.conf.2
sebelum :
=========
# free -m
total used free shared buffers cached
Mem: 1827 1464 362 0 104 569
-/+ buffers/cache: 791 1035
Swap: 2047 0 2047
==========
mengurangi child process, misal default child peruser adl 5 :
# perl -p -i -e 's/max_children">5/max_children">1/' /usr/local/etc/php-fpm.conf
sesudah:
===========
# free -m
total used free shared buffers cached
Mem: 1827 1170 656 0 104 569
-/+ buffers/cache: 496 1330
Swap: 2047 0 2047
==================
ubah default2 setting lain:
=================
perl -p -i -e 's/MinSpareServers">5/MinSpareServers">1/' /usr/local/etc/php-fpm.conf
perl -p -i -e 's/MaxSpareServers">35/MaxSpareServers">3/' /usr/local/etc/php-fpm.conf
perl -p -i -e 's/StartServers">20/StartServers">2/' /usr/local/etc/php-fpm.conf
=====================
Posting Komentar