Welcome! Log In Create A New Profile

Advanced

Re: ? worker_cpu_affinity with HEX-mask

Maxim Dounin
November 14, 2022 07:52PM
Hello!

On Mon, Nov 14, 2022 at 07:38:53AM -0500, ymarkman wrote:

> The documentation gives an worker_cpu_affinity example with BINARY Bit-mask
> with 1word-per-1cpu
> Is it possible to give a HEX-mask like 0xf0f0 instead long-long BBIN mask
>
> I have 96 CPUs and would like to use last CPU-numbers in the affinity.
> How to do that?

As of now, only binary masks are supported by nginx, so you'll
have to write a long binary mask if you need to. The most simple
approach would be to use "auto" with just one mask, so nginx will
distribute worker processes automatically among the allowed CPUs,
e.g.:

worker_cpu_affinity auto 111111110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;

For readability you can use spaces to separate groups of bits
(though you'll have to use quotes to ensure the whole mask will be
in a single argument):

worker_cpu_affinity auto "11111111 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000";

See http://nginx.org/r/worker_cpu_affinity for details.

Hope this helps.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

? worker_cpu_affinity with HEX-mask

ymarkman November 14, 2022 07:38AM

? worker_cpu_affinity with HEX-mask

ymarkman November 14, 2022 10:10AM

Re: ? worker_cpu_affinity with HEX-mask

Maxim Dounin November 14, 2022 07:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 107
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready