FastNetMon

Tuesday 3 December 2013

Получение данных о загрузке шины QPI, бандвича памяти, а также утилизации шин PCI-E на процессорах семейства e5.

Я провожу тесты на PowerEdge 720 c Xeon e5 и в CentOS 6. Также точно работает с i7-3820.

На Dell часть фич работать не будет, по причине (вендор обещает починит это): http://software.intel.com/en-us/forums/topic/385194

Стягиваем фалик:

Собираем:
cd /usr/src
unzip intelperformancecountermonitorv2.8.zip
cd IntelPerformanceCounterMonitorV2.8
yum install -y make gcc gcc-c++
make

Открываем хав-ту и изучаем:
cat LINUX_HOWTO.txt 

Теперь попробуем считать метрики с процессора:

./pcm.x  1
 Intel(r) Performance Counter Monitor V2.6 (2013-11-04 13:43:31 +0100 ID=db05e43)
 Copyright (c) 2009-2013 Intel Corporation
Number of physical cores: 12
Number of logical cores: 24
Threads (logical cores) per physical core: 2
Num sockets: 2
Core PMU (perfmon) version: 3
Number of core PMU generic (programmable) counters: 4
Width of generic (programmable) counters: 48 bits
Number of core PMU fixed counters: 3
Width of fixed counters: 48 bits
Nominal core frequency: 2000000000 Hz
Package thermal spec power: 95 Watt; Package minimum power: 63 Watt; Package maximum power: 150 Watt;
Socket 0: 1 memory controllers detected with total number of 4 channels. 2 QPI ports detected.
Socket 1: 1 memory controllers detected with total number of 4 channels. 2 QPI ports detected.
WARNING: Core 0 IA32_PERFEVTSEL0_ADDR are not zeroed 5439548
Access to Intel(r) Performance Counter Monitor has denied (Performance Monitoring Unit is occupied by other application). Try to stop the application that uses PMU.
Alternatively you can try to reset PMU configuration at your own risk. Try to reset? (y/n)


Вот так, тут нужно сказать y. Это не костыль (не опасно, проверялось на 3х серверах, падений не зафиксировано), это рекомендация инженеров Intel:   http://software.intel.com/en-us/forums/topic/280522

Запускаем утилиту для контроля с 1 секундным обновлением данных:
./pcm.x 1


И, к сожалению, что на Dell, что на Intel шасси получаем вот такие сообщения:
ERROR: QPI LL counter programming seems not to work. Q_P0_PCI_PMON_BOX_CTL=0xffffffff
       Please see BIOS options to enable the export of performance monitoring devices (devices 8 and 9: function 2).
ERROR: QPI LL counter programming seems not to work. Q_P1_PCI_PMON_BOX_CTL=0xffffffff
       Please see BIOS options to enable the export of performance monitoring devices (devices 8 and 9: function 2).
ERROR: QPI LL counter programming seems not to work. Q_P0_PCI_PMON_BOX_CTL=0xffffffff
       Please see BIOS options to enable the export of performance monitoring devices (devices 8 and 9: function 2).
ERROR: QPI LL counter programming seems not to work. Q_P1_PCI_PMON_BOX_CTL=0xffffffff
       Please see BIOS options to enable the export of performance monitoring devices (devices 8 and 9: function 2).


Зато есть чудо тулза ./pcm-memory.x, которая показывает загрузку шины памяти в текущий момент и еще кучу информации о памяти:
Called sleep function for 1000 ms
---------------------------------------||---------------------------------------
--             Socket 0              --||--             Socket 1              --
---------------------------------------||---------------------------------------
---------------------------------------||---------------------------------------
---------------------------------------||---------------------------------------
--   Memory Performance Monitoring   --||--   Memory Performance Monitoring   --
---------------------------------------||---------------------------------------
--  Mem Ch 0: Reads (MB/s):  846.55  --||--  Mem Ch 0: Reads (MB/s):  798.78  --
--            Writes(MB/s):  296.10  --||--            Writes(MB/s):  317.43  --
--  Mem Ch 1: Reads (MB/s):  871.39  --||--  Mem Ch 1: Reads (MB/s):  825.85  --
--            Writes(MB/s):  327.96  --||--            Writes(MB/s):  349.45  --
--  Mem Ch 2: Reads (MB/s):  841.01  --||--  Mem Ch 2: Reads (MB/s):  789.40  --
--            Writes(MB/s):  297.20  --||--            Writes(MB/s):  316.76  --
--  Mem Ch 3: Reads (MB/s):  839.96  --||--  Mem Ch 3: Reads (MB/s):  792.42  --
--            Writes(MB/s):  294.68  --||--            Writes(MB/s):  317.00  --
-- NODE0 Mem Read (MB/s):   3398.91  --||-- NODE1 Mem Read (MB/s):   3206.47  --
-- NODE0 Mem Write (MB/s):  1215.94  --||-- NODE1 Mem Write (MB/s):  1300.63  --
-- NODE0 P. Write (T/s) :    564368  --||-- NODE1 P. Write (T/s):     633549  --
-- NODE0 Memory (MB/s):     4614.85  --||-- NODE1 Memory (MB/s):     4507.10  --
---------------------------------------||---------------------------------------
--                   System Read Throughput(MB/s):   6605.38                  --
--                  System Write Throughput(MB/s):   2516.57                  --
--                 System Memory Throughput(MB/s):   9121.95                  --
---------------------------------------||---------------------------------------

Еще есть тулза ./pcm-pcie.x  1, которая позволяет смотреть загрузку PCI-E шин.

В процессе поиска информации обнаружилась полезная команда:
rm -f /dev/shm/sem.*Intel*

Она удаляет кэш всех диагностических утилит, полезна при отладке сложных проблем, без нее ошибка будет отображаться лишь однажды.

Также на Sandy Bridge тулза pcm.x может попросить сделать вот так:

echo 0 > /proc/sys/kernel/nmi_watchdog modprobe msr
А после этого, чтобы она заработала нужно дернуть ./pcm.x -r 

No comments :

Post a Comment

Note: only a member of this blog may post a comment.