Pretty straightforward question - is there a way to set the CPU affinity via PHP? Any of the following will do:
- Setting the affinity of the current process via a PHP call.
- Setting the affinity of a specific PID via a PHP call.
- As a last resort, setting the affinity of a specific PID via a command-line tool.
The only option I've found so far is the last one, using a tool named schedutils, and it seems it may only be supported on more recent kernels.