FPM: many pools = extremely slow startup
| From: | Sergey Malinin | Date: | Sat, 15 Feb 2020 00:09:42 +0000 |
| Subject: | FPM: many pools = extremely slow startup | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-327002@lists.php.net to get a copy of this message | ||
Hello,
I'm running PHP FPM 7.3 on linux. I have 35000 pools and it takes
several minutes for an FPM to
start/reload. I strace'd the master process and found that most of the
time is spent reading the
pools config one byte at a time (strace below).
Is this a normal behavior?
...
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "l", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "i", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "s", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "t", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "e", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "n", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, ".", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "m", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "o", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "d", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "e", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "=", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "0", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "6", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "6", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "0", 1) = 1
read(4</etc/php/7.3/fpm/pool.d/pools.conf>, "\n", 1) = 1
...