I have linux system with NGINX web server, PostgreSQL database server , and many users running processes of same web application, each web application has its NGINX configuration file and a PostgreSQL connection .
I want to balance the load among the users (including NGINX, PostgreSQL, and web app users) and my approach is to adjust for each user it’s cpu time quota/quantum ( allowance of CPU time ) , such that the important users get more CPU time , less important users get less CPU time. i.e I’ll have different quantum quotas for each user (I don’t know if that is possible. Let me know if it’s possible . I will be happy with references or links showing me how to start) .
I also want to allow the Important users to preempt other processes but not his own processes . for e.g. , I want NGINX and PostgreSQL to preempt the other user users processes but not their own processes to increase responsiveness of the system .
If I can’t manage it at the user level , let me know if it’s possible to manage among processes somehow. I’m open to new ideas.
I looked up https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/kernel/Kconfig.preempt and https://wiki.linuxfoundation.org/realtime/documentation/technical_basics/preemption_models . can’t find user specific guide or process based guide showing me how to adjust CPU quotas for users or processes .
Please DO NOT DO THE FOLLOWING :
1- Don’t recommend me “nice” or “increasing priority” for NGINX or PostgreSQL . it doesn’t work this way
2- Don’t paste AI Answers .
YOU WILL GE DOWN VOTE !