> ## Content Index
> Fetch the complete content index at: https://ostreff.info/llms.txt
> Use this file to discover other available public pages before exploring further.

# PHP 8.4.4 recommendation for php-fpm setting
- URL: https://ostreff.info/php-8-4-4-recommendation-for-php-fpm-setting/
- Published: 2025-02-16T13:47:02.000Z
- Updated: 2025-02-16T13:50:47.000Z
- Author: Jordan Ostreff
- Tags: #PHP, FreeBSD

My experiments with php 8.4.4 to found no [high cpu and memory usage](https://netdata.ostreff.info/spaces/ostreffinfo/rooms/local/overview?ref=ostreff.info#metrics%5Fcorrelation=false&after=-900&before=0&utc=Europe%2FSofia&offset=%2B2&timezoneName=Helsinki%2C%20Kyiv%2C%20Riga%2C%20Sofia%2C%20Tallinn%2C%20Vilnius&modal=&modalTab=&modalParams=&selectedIntegrationCategory=deploy.operating-systems&force%5Fplay=false&%5Bnetdata%5Fagent%5Flocal%5D--chartName-val=menu%5FSystem-0%5FProcesses-1%5FResources%5Fby%5FApplication%5FGroup%5F%5Fapps%5Fgroups%5Fconf%5F-2%5Fsubmenu%5FSystem-0%5FProcesses-1%5FResources%5Fby%5FApplication%5FGroup%5F%5Fapps%5Fgroups%5Fconf%5F-2%5FCPU-3) has following results:

For PHP.INI [opcache](https://www.php.net/manual/en/book.opcache.php?ref=ostreff.info) and [jit](https://php.watch/versions/8.4/opcache-jit-ini-default-changes?ref=ostreff.info):

```bash
[opcache]
opcache.enable=1
opcache.enable_cli=1
opcache.interned_strings_buffer=128
opcache.max_accelerated_files=20000
opcache.save_comments=1
opcache.jit=1235
opcache.revalidate_freq=0
opcache.validate_timestamps=1
opcache.max_accelerated_files=10000
opcache.memory_consumption=192
opcache.max_wasted_percentage=10
opcache.interned_strings_buffer=16
opcache.fast_shutdown=1
opcache.jit_buffer_size=500000000
```

For pool settings:

```bash
pm = ondemand ; recomended for low traffic sites
pm.max_children = 16
pm.start_servers = 48 ; sysctl hw.ncpu | awk '{print $2}' X 4
pm.min_spare_servers = 24 ; sysctl hw.ncpu | awk '{print $2}' X 2
pm.max_spare_servers = 48 ; equal to pm.start_servers
pm.max_requests = 200
pm.process_idle_timeout = 10s
```