On Thu, 26 Sep 2024 17:03:17 +0000 (UTC) amit sehas <cu...@yahoo.com> wrote:
> If there is a way to determine: > > vCPU thread utilization numbers over a period of time, such as a few hours > > or which processes are consuming the most CPU > > top always indicates that the server is consuming the most CPU. > > Now i am begining to wonder if 8 vCPU threads really are capable of running 6 > high intensity threads or only 4 such threads? Dont know > > Also tried to utilize pthread_setschedparam() explicitly on some of the > threads, it made no difference to the performance. But if we do it on more > than 1-2 threads then it hangs the whole system. > > This is primarily a matter of CPU scheduling, and if we restirct context > switching on even 2 critical threads we have a win. > > Some other recommendations. - avoid CPU 0 you can't isolate it, and it has other stuff that has to run there if you have main thread that sleeps, and worker threads that poll, then go ahead and put main on cpu 0. - don't put two active polling cores on shared hyper-thread. You can used DPDK's cpu_layout.py script to show this. For example: $ ./usertools/cpu_layout.py ====================================================================== Core and Socket Information (as reported by '/sys/devices/system/cpu') ====================================================================== cores = [0, 1, 2, 3] sockets = [0] Socket 0 -------- Core 0 [0, 4] Core 1 [1, 5] Core 2 [2, 6] Core 3 [3, 7] On this system, don't poll on cores 0 and 4 (system activity). Use lcore 1, 2, 3