Change user settings..

Hi,

I have 48 cores in my server. I want to assign 50% of the cores to certain programs and rest to some other programms. I found the command "taskset" very good option to assign cpu afinity to already running programms or newly created programms.

But the problem is even if i set a cron to change the newly created PID's by a specific user, it will take effect only every minute. So if PID's are created in seconds, then this command "taskset" fails to assign cpu affinity to newly created PID's.

So is there any way I can modify the user settings so that everytime a new PID is created with that user ownership, then my taskset commands runs automatically.

I had a similar problem a few years back. They way I got around it was to edit the code that spawned the new process to set off. Just beforehand, I put another process in the background to sleep for a second, then work out the new process and set the affinity. A bit clunky, but it worked.

Robin