3 ms·
Fork is kind of expensive in most OS, even it's relative cheap compared to start a new process from scratch, but still much slower than few function calls.
by mayli 5y ago
Fork is kind of expensive in most OS, even it's relative cheap compared to start a new process from scratch, but still much slower than few function calls.
- dfox 5y agoThe whole PHP opcache hack works reliably only on platforms that have fork(2).
- ptx 5y agoWell, yes, but the point was to get a process per request just like PHP, so you'll have to start those processes one way or another. Anyway, it appears uwsgi can be configured to do this, using fork-server[1] and maybe max-requests[2], although it only works with Perl at the moment. [1] https://uwsgi-docs.readthedocs.io/en/latest/ForkServer.html https://uwsgi-docs.readthedocs.io/en/latest/ForkServer.html [2] https://uwsgi-docs.readthedocs.io/en/latest/Options.html#max-requests https://uwsgi-docs.readthedocs.io/en/latest/Options.html#max...