Skip to content

gbitzes/cpu-topology

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

cpu-topology

A small script to view the CPU topology on a machine. Running ./cpu-topology.py will give a breakdown based on socket, NUMA node, core, and hardware thread on the current machine.

Sometimes it's useful to pin processes to specific cores; one way to do it is by placing the proesses as "far away" as possible. In this case, you continuously alternate between sockets, nodes, cores and threads.

Another one is to place them as close together as possible. In this case, you completely fill each hardware thread, core, node, and socket, before proceeding to the next.

When a machine has many cores, it's often tedious to make such a mapping by hand. You can generate such an affiniy mapping by running "./cpu-topology.py scatter|compact"

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A small script to view the topology of the CPUs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages