You have 8 physical cores, the other 8 threads are “just” hyperthreads. This means that your physical core can switch between two pipelines. This is useful in cases where the pipelines get blocked by e.g. long lasting load operations. Usually, the core has to wait for the data to arrive, but with hyperthreads it can just work on the other pipeline where hopefully the data already arrived and thus work is pending. Hyperthreading is not real parallel computing.
Several parts of ODM use highly optimized code. This means, the code is optimized to
- store the data in a meaningful way so that fetch and load operations are minimized
- keep the processing unit under load as long as possible
- use architecture specific instructions like vector registers, AVX, SSE, …
This together results in workloads that tend to keep your compute cores busy as long as possible. And thus, there is no real benefit from hyperthreading. On the contrary, using more threads than there are actual compute cores introduces communication overhead as well as overhead from switching pipelines. Having that in mind, the theoretical optimum for your setup with 8 cores is 8 threads.
According to your measurements (btw. kudos that you did some measurements to find the sweet spot), 6 threads are faster 8 threads. This can have several reasons. I expect the most prominent to be that your operating system needs time do stuff. This results in the same thing a hyperthread would cause, which is: One core can’t work solely on one highly optimized task, but has to switch between tasks. Another reason can be that using highly optimized code usually creates quite some heat, as it uses more parts of the processor at the same time. There are processors that throttle their frequency when they find vector instructions (e.g. AVX for Intel). Others, as yours, increase it’s speed as long as it isn’t to hot. So keeping one or two cores out of heavy computations can be beneficial.
According to your specs and your operating system, I expect the sweet spot to be around 7 cores used for ODM.