1

My centos 6.7 server has only my php and mysql based websites using nginx web server and virtualmin (no wordpress or external scripts/software).

I installed PHP with :

yum --enablerepo=remi,remi-php56 install -y php-mysqlnd php-fpm

yum installed dependencies like php-commom, php-pdo etc.

I checked the running processes in my server using virtualmin.

each php-fpm: pool www process is using around 400MB memory.

There are more than 20 extensions in etc/php.d directory.

php-extensions in etc/php.d directory

I commented most of the extensions in etc/php.d directory.

I checked the installed extensions using

<?php
print_r(get_loaded_extensions());
?>

[0] => Core
[1] => date
[2] => ereg
[3] => libxml
[4] => openssl
[5] => pcre
[6] => zlib
[7] => filter
[8] => hash
[9] => Reflection
[10] => SPL
[11] => session
[12] => standard
[13] => cgi-fcgi
[14] => curl
[15] => ftp
[16] => mysqlnd
[17] => PDO
[18] => mysql
[19] => pdo_mysql
[20] => json
[21] => mhash

after restarting php-fpm and nginx, each php-fpm: pool www process is using around 200MB memory.

Is it possible to disable some more extensions like ereg, libxml, Reflection, SPL, mhash etc ?

I hope this will reduce some more RAM usage by each of php-fpm: pool www processes.

Please suggest. Thanks.

Arnold
  • 495
  • 2
  • 6
  • 18
  • I'm not sure, but you might have better luck over at [server.fault](http://serverfault.com/) while this is about "php" it's not really about programming. – Epodax Oct 09 '15 at 06:29
  • Thanks for your reply and I am very sorry for posting it here! shall I post this question again in serverfault ? or can anybody move it to serverfault? Thanks. – Arnold Oct 09 '15 at 06:36
  • Hi! It was not meant as criticism, (as I'm not certain whether it's more appropriate over there), but I figured that 1. your question **might** get closed. 2. You might get better / faster answers over there. Although you should properly read their help section / on-topic before posting. – Epodax Oct 09 '15 at 06:38
  • You can reduce "memory_limit", 128M (default value) is very high, usually 32M should be enough. Some extensions (like date, reflection, spl...) cannot be disabled, must always be there. – Remi Collet Oct 09 '15 at 07:29

0 Answers0