Thread/workers questions #941
-
Hello, a bunch of noob questions I have :)
|
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 25 replies
-
For (1): For (2): the defaults are fine for most cases. Tuning these in conjunction with As a side-note, if you have memory limits in k8s, take care to make sure you set For (3): you can configure these with the |
Beta Was this translation helpful? Give feedback.
-
Actually, FrankenPHP does get the number of CPUs from K8S, because it uses https://github.com/uber-go/automaxprocs (to be exact, Caddy uses this package). We definitely need to document all of this. |
Beta Was this translation helpful? Give feedback.
-
to not create any new discussion, want to share my experience of comparison between Franken in worker mode with default setting and NGNIX + PHP-FPM For Nginx + FPM I have 2 pods in k8s, one for nginx and another for fpm, CPU requests/limits are: limits 0.5, request 0.2. The endpoint is to get a record from Mongo DB by id and return. Franken:
FPM
Maybe I'm doing something wrong, but I do not see any performance boosts at all, I run it many times and always looks like Franken is 5% slower and always with timeout on the first request. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hello guys, my question is not related to the original author question but almost the same. Here is: How can i use frankenphp (non worker mode) in an application that may handle slow requests even using a machine with a few cpus, like 2 cpus? frankenphp is using 2 cores and 4 threads, so frankenphp will run 4 workers, right? That said, how many requests is supposed to handle? In my example: Any tip to handle with this situation? with FPM is easier to increase RAM to increase the amount of fpm processes than increasing 10x the number of cores, if i'm not wrong. |
Beta Was this translation helpful? Give feedback.
-
I have another foolish question, I saw the new release that promises an increase of performance on non-worker mode, but what is non-worker mode? it's when I set
? or there are some other config? I can't find anything related to non-worker mode in documentation |
Beta Was this translation helpful? Give feedback.
Actually, FrankenPHP does get the number of CPUs from K8S, because it uses https://github.com/uber-go/automaxprocs (to be exact, Caddy uses this package).
We definitely need to document all of this.