Get the most out of your Centmin Mod LEMP stack
Become a Member

hwloc and lstopo

Discussion in 'System Administration' started by eva2000, Sep 5, 2015.

Tags:
  1. eva2000

    eva2000 Administrator Staff Member

    55,802
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    11:07 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Came across hwlock and lstopo to easily check out the cpu topology of your server.


    For CentOS 6 to install
    Code:
    yum -y instal hwloc
    For CentOS 7 to install
    Code:
    yum -y install hwlock hwlock-gui
    Example output from my Xeon E3-1245v2 server.

    Code:
    lstopo --of txt --no-io
    Code:
    lstopo --of txt --no-io
    ┌────────────────────────────────────────────────────────────────────────────┐
    │ Machine (31GB)                                                             │
    │                                                                            │
    │ ┌────────────────────────────────────────────────────────────────────────┐ │
    │ │ Socket P#0                                                             │ │
    │ │                                                                        │ │
    │ │ ┌────────────────────────────────────────────────────────────────────┐ │ │
    │ │ │ L3 (8192KB)                                                        │ │ │
    │ │ └────────────────────────────────────────────────────────────────────┘ │ │
    │ │                                                                        │ │
    │ │ ┌──────────────┐  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐ │ │
    │ │ │ L2 (256KB)   │  │ L2 (256KB)   │  │ L2 (256KB)   │  │ L2 (256KB)   │ │ │
    │ │ └──────────────┘  └──────────────┘  └──────────────┘  └──────────────┘ │ │
    │ │                                                                        │ │
    │ │ ┌──────────────┐  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐ │ │
    │ │ │ L1d (32KB)   │  │ L1d (32KB)   │  │ L1d (32KB)   │  │ L1d (32KB)   │ │ │
    │ │ └──────────────┘  └──────────────┘  └──────────────┘  └──────────────┘ │ │
    │ │                                                                        │ │
    │ │ ┌──────────────┐  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐ │ │
    │ │ │ L1i (32KB)   │  │ L1i (32KB)   │  │ L1i (32KB)   │  │ L1i (32KB)   │ │ │
    │ │ └──────────────┘  └──────────────┘  └──────────────┘  └──────────────┘ │ │
    │ │                                                                        │ │
    │ │ ┌──────────────┐  ┌──────────────┐  ┌──────────────┐  ┌──────────────┐ │ │
    │ │ │ Core P#0     │  │ Core P#1     │  │ Core P#2     │  │ Core P#3     │ │ │
    │ │ │              │  │              │  │              │  │              │ │ │
    │ │ │ ┌──────────┐ │  │ ┌──────────┐ │  │ ┌──────────┐ │  │ ┌──────────┐ │ │ │
    │ │ │ │ PU P#0   │ │  │ │ PU P#1   │ │  │ │ PU P#2   │ │  │ │ PU P#3   │ │ │ │
    │ │ │ └──────────┘ │  │ └──────────┘ │  │ └──────────┘ │  │ └──────────┘ │ │ │
    │ │ │ ┌──────────┐ │  │ ┌──────────┐ │  │ ┌──────────┐ │  │ ┌──────────┐ │ │ │
    │ │ │ │ PU P#4   │ │  │ │ PU P#5   │ │  │ │ PU P#6   │ │  │ │ PU P#7   │ │ │ │
    │ │ │ └──────────┘ │  │ └──────────┘ │  │ └──────────┘ │  │ └──────────┘ │ │ │
    │ │ └──────────────┘  └──────────────┘  └──────────────┘  └──────────────┘ │ │
    │ └────────────────────────────────────────────────────────────────────────┘ │
    └────────────────────────────────────────────────────────────────────────────┘
    ┌────────────────────────────────────────────────────────────────────────────┐
    │ Host: centminmod.com                                                   │
    │                                                                            │
    │ Indexes: physical                                                          │
    │                                                                            │
    │ Date: Sat 05 Sep 2015 08:38:09 AM EDT                                      │
    └────────────────────────────────────────────────────────────────────────────┘
    Code:
    lstopo --no-io -l -c
    Code:
    lstopo --no-io -l -c
    Machine (31GB) cpuset=0x000000ff
      Socket L#0 cpuset=0x000000ff
        L3 L#0 (8192KB) cpuset=0x000000ff
          L2 L#0 (256KB) cpuset=0x00000011
            L1d L#0 (32KB) cpuset=0x00000011
              L1i L#0 (32KB) cpuset=0x00000011
                Core L#0 cpuset=0x00000011
                  PU L#0 (P#0) cpuset=0x00000001
                  PU L#1 (P#4) cpuset=0x00000010
          L2 L#1 (256KB) cpuset=0x00000022
            L1d L#1 (32KB) cpuset=0x00000022
              L1i L#1 (32KB) cpuset=0x00000022
                Core L#1 cpuset=0x00000022
                  PU L#2 (P#1) cpuset=0x00000002
                  PU L#3 (P#5) cpuset=0x00000020
          L2 L#2 (256KB) cpuset=0x00000044
            L1d L#2 (32KB) cpuset=0x00000044
              L1i L#2 (32KB) cpuset=0x00000044
                Core L#2 cpuset=0x00000044
                  PU L#4 (P#2) cpuset=0x00000004
                  PU L#5 (P#6) cpuset=0x00000040
          L2 L#3 (256KB) cpuset=0x00000088
            L1d L#3 (32KB) cpuset=0x00000088
              L1i L#3 (32KB) cpuset=0x00000088
                Core L#3 cpuset=0x00000088
                  PU L#6 (P#3) cpuset=0x00000008
                  PU L#7 (P#7) cpuset=0x00000080