l******9 发帖数: 579 | 1 如何确保多线程程序在 multicore server 上确实使用了 所有的 core
to do computing in parallel physically (not logically)
I have a multicore server, which has 24 CPU, each CPU has 6 cores.
It is Intel xzeon X5650 2.67GHz
cpu cores : 6 (support 6 threads)
cpu MHz : 1596.000
totally, I have 24 * 6 = 144 cores.
I designed a multithreaded C++ program with boost/thread.
How to make sure that my program is run by all 144 cores ?
Any help is really appreciated.
thanks | t****t 发帖数: 6806 | 2 you may set processor affinity, which makes each thread a preferred core.
however it is not guaranteed. i don't think you can guarantee it anyway.
on linux the command is taskset.
【在 l******9 的大作中提到】 : 如何确保多线程程序在 multicore server 上确实使用了 所有的 core : to do computing in parallel physically (not logically) : I have a multicore server, which has 24 CPU, each CPU has 6 cores. : It is Intel xzeon X5650 2.67GHz : cpu cores : 6 (support 6 threads) : cpu MHz : 1596.000 : totally, I have 24 * 6 = 144 cores. : I designed a multithreaded C++ program with boost/thread. : How to make sure that my program is run by all 144 cores ? : Any help is really appreciated.
| l******9 发帖数: 579 | 3 thanks for your reply.
My program needs to run many (about 10,000+) computing tasks.
Each task's run time is very very short (< 0.1 second or even less).
At each iteration, all these tasks are run in parallel. Some of them
need to exchange some data (it is very small) and then go on.
I want to keep all 144 cores as busy as possible so that my program
can be done as fast as possible.
So, I want to associate each task with a distinct thread and schedule
threads as many as possible. Also, try yo make the workload balance
among these cores.
How can I do that from the point of programming ?
Any help is really appreciated.
thanks
【在 t****t 的大作中提到】 : you may set processor affinity, which makes each thread a preferred core. : however it is not guaranteed. i don't think you can guarantee it anyway. : on linux the command is taskset.
| O*******d 发帖数: 20343 | | l******t 发帖数: 12659 | |
|