I have the following scenario: Using libx265 and a dual-socket system (thus 2 NUMA nodes) I want to encode videos using ffmpeg and libx265. libx265 can be configured to use thread-pools which are isolated to one NUMA node, using its --pools
-parameter (docs).
There a few examples in the docs which I do not fully comprehend. The examples there are for a 4-node system. Quoting from the doc:
'+'
is a special value indicating all cores detected on the node
'*'
is a special value indicating all cores detected on the node and all remaining nodes
'-'
is a special value indicating no cores on the node, same as '0'A thread pool dedicated to a given NUMA node is enabled only when the number of threads to be created on that NUMA node is explicitly mentioned in that corresponding position with the –pools option. Else, all threads are spawned from a single pool. The total number of threads will be determined by the number of threads assigned to the enabled NUMA nodes for that pool. The worker threads are be given affinity to all the enabled NUMA nodes for that pool and may migrate between them, unless explicitly specified as described above.
I am not sure how the thread-count and the pool-count can be explicitly specified and would be happy if someone could explain these examples, taken from the docs:
"+,-,+" - allocate one pool, using only cores on nodes 0 and 2
- Q: Why is this not allocating 2 pools on nodes 0 & 2?
"8,8,8,8" - allocate four pools with up to 8 threads in each pool
- Q: Why is this now allocating 4 pools, while the next example
"8,+,+,+" - allocate two pools, the first with 8 threads on node 0, and the second with all cores on node 1,2,3
- Q: .. is only allocating 2 pools?
In my case, I will have access to 2 nodes x 12 "cores" and was thinking of 1-3 ffmpeg encoding-processes per node (which would yield pool sizes of 12, 6 or 4 "cores").