pinggit / dpdk-contrail-book

contrail dpdk day one book
9 stars 3 forks source link

HT vs performance #13

Closed pinggit closed 4 years ago

pinggit commented 4 years ago

ch2 page 42: "The performance of vRouter with sibling HT cores can increase by 10% to 20% (result is based on performance tests described hereinafter)."

shall we give a brief explanation about this data?

disable HT will give the best performance for sure. then where is 10-20% coming from? is it throughput or performance?

ldurandadomia commented 4 years ago

Here there are commonly a lot of confusion. siblings means, "to use both logical cores on a physical CPU" when Hyper Threading is enabled.

The question is not: enable HT or not. The point explained here, is to use or not siblings (both logical core) on each physical CPU once sibling is enabled. We have shown that:

So, the PPS per CPU is better with siblings than without (1.6 against 1.2 ==> +30%) But the PPS per vrouter lcore is worst (0.8 against 1.2 ==> -30 %)

So when sibling are used you have a better usage of each physical CPU, but a worst performance at each vrouter lcore level. So, when you are using sibling you are saving physical CPUs The DPDK rule is: P < P + S < 2xP P = usage of only 1 lcore on each CPU. P + S = usage of both lcore on each CPU.

For instance: 4 x P lcores vrouter < 4 x P + 4 x S lcores vrouter < 8 x P lcores vrouters

pinggit commented 4 years ago

got it. well explained. and this is it:

when sibling are used you have a better usage of each physical CPU, but a worst performance at each vrouter lcore level.

thanks.