How to correctly dedicate server processes to specific CPU cores?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to correctly dedicate server processes to specific CPU cores?

Raffael Vogler
I have 16 cores (0 to 15) and the most active processes are:

- nginx
- php-fpm
- eth0-TxRx-0 (paired Tx and Rx queues #1)
- eth0-TxRx-1 (paired Tx and Rx queues #2)

eth0-TxRx-0 is already dedicated to core #5 and eth0-TxRx-1 to core #6.

But on those two cores are also nginx and php-fpm processes being executed.

Now I would like o restrict nginx and php-fpm to cores 0-4 and 7-15.

I would like to confirm that this can be correctly achieved with:

taskset -c 0-4,7-15 nginx
taskset -c 0-4,7-15 php-fpm

Is that a safe and sound approach?

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|

Re: How to correctly dedicate server processes to specific CPU cores?

Peter Booth
So some questions:

What hardware is this? Are they 16 “real” cores or hyper threaded cores?
Do you have a test case setup so you can readily measure the impact of change?
Many tunings that involve numa will only show substantial results ion specific app
What does cat /proc/cpuinfo |  tail -28 return?
When you say maxed out do you literally mean that cores 6,7 show 100% CPU utilization

On Jan 12, 2018, at 9:21 AM, Raffael Vogler <[hidden email]> wrote:

I have 16 cores (0 to 15) and the most active processes are:

- nginx
- php-fpm
- eth0-TxRx-0 (paired Tx and Rx queues #1)
- eth0-TxRx-1 (paired Tx and Rx queues #2)

eth0-TxRx-0 is already dedicated to core #5 and eth0-TxRx-1 to core #6.

But on those two cores are also nginx and php-fpm processes being executed.

Now I would like o restrict nginx and php-fpm to cores 0-4 and 7-15.

I would like to confirm that this can be correctly achieved with:

taskset -c 0-4,7-15 nginx
taskset -c 0-4,7-15 php-fpm

Is that a safe and sound approach?
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx


_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx