baef7059a8956925758641a9ee811841c92b26b0
[kvmfornfv.git] / docs / userguide / pcm_utility.userguide.rst
1 =========================================================
2 Collecting Memory Bandwidth Information using PCM utility
3 =========================================================
4
5 About PCM utility
6 -----------------
7 The Intel® Performance Counter Monitor provides sample C++ routines and utilities to estimate the
8 internal resource utilization of the latest Intel® Xeon® and Core™ processors and gain a significant
9 performance boost.In Intel PCM toolset,there is a pcm-memory.x tool which is used for observing the
10 memory traffic intensity
11
12 Version Features
13 -----------------
14
15 +-----------------------------+-----------------------------------------------+
16 |                             |                                               |
17 |      **Release**            |               **Features**                    |
18 |                             |                                               |
19 +=============================+===============================================+
20 |                             | - In Colorado release,we don't have memory    |
21 |       Colorado              |   bandwidth information collected through the |
22 |                             |   cyclic testcases.                           |
23 |                             |                                               |
24 +-----------------------------+-----------------------------------------------+
25 |                             | - pcm-memory.x provides the memory bandwidth  |
26 |                             |   data throught out the testcases             |
27 |                             | - pcm-memory.x will be executedbefore the     |
28 |       Danube                |   execution of every testcase                 |
29 |                             | - used for all test-types (stress/idle)       |
30 |                             | - Generated memory bandwidth logs which are   |
31 |                             |   to published to the KVMFORFNV artifacts     |
32 +-----------------------------+-----------------------------------------------+
33
34 Implementation of pcm-memory.x:
35 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
37 The tool measures the memory bandwidth observed for every channel reporting seperately throughputs
38 for reads from memory and writes to the memory.pcm-memory.x tool tends to report values slightly
39 higher than the application's own measurement.
40
41 Command:
42
43 .. code:: bash
44
45     sudo ./pcm-memory.x  [Delay]/[external_program]
46
47 Parameters
48
49 -   pcm-memory can called with either delay or external_program/application as a parameter
50
51 -   If delay is given as 5,then the output will be produced with refresh of every 5 seconds.
52
53 -   If external_program is script/application,then the output will produced after the execution of the application or the script passed as a parameter.
54
55 **Sample Output:**
56
57  The output produced with default refresh of 1 second.
58
59 +---------------------------------------+---------------------------------------+
60 |             Socket 0                  |             Socket 1                  |
61 +=======================================+=======================================+
62 |     Memory Performance Monitoring     |     Memory Performance Monitoring     |
63 |                                       |                                       |
64 +---------------------------------------+---------------------------------------+
65 |    Mem Ch 0: Reads (MB/s): 6870.81    |    Mem Ch 0: Reads (MB/s): 7406.36    |
66 |              Writes(MB/s): 1805.03    |              Writes(MB/s): 1951.25    |
67 |    Mem Ch 1: Reads (MB/s): 6873.91    |    Mem Ch 1: Reads (MB/s): 7411.11    |
68 |              Writes(MB/s): 1810.86    |              Writes(MB/s): 1957.73    |
69 |    Mem Ch 2: Reads (MB/s): 6866.77    |    Mem Ch 2: Reads (MB/s): 7403.39    |
70 |              Writes(MB/s): 1804.38    |              Writes(MB/s): 1951.42    |
71 |    Mem Ch 3: Reads (MB/s): 6867.47    |    Mem Ch 3: Reads (MB/s): 7403.66    |
72 |              Writes(MB/s): 1805.53    |              Writes(MB/s): 1950.95    |
73 |                                       |                                       |
74 |    NODE0 Mem Read (MB/s):  27478.96   |    NODE1 Mem Read (MB/s):  29624.51   |
75 |    NODE0 Mem Write (MB/s):  7225.79   |    NODE1 Mem Write (MB/s):  7811.36   |
76 |    NODE0 P. Write (T/s) :    214810   |    NODE1 P. Write (T/s):     238294   |
77 |    NODE0 Memory (MB/s):    34704.75   |    NODE1 Memory (MB/s):    37435.87   |
78 +---------------------------------------+---------------------------------------+
79 |                    - System Read Throughput(MB/s):  57103.47                  |
80 |                    - System Write Throughput(MB/s):  15037.15                 |
81 |                    - System Memory Throughput(MB/s):  72140.62                |
82 +-------------------------------------------------------------------------------+
83
84 pcm-memory.x in KVMFORNFV:
85 ~~~~~~~~~~~~~~~~~~~~~~~~~~
86
87 pcm-memory is a part of KVMFORNFV in D release.pcm-memory.x will be executed with delay of 60 seconds
88 before starting every testcase to monitor the memory traffic intensity which was handled in
89 collect_MBWInfo function .The memory bandwidth information will be collected into the logs through
90 the testcase updating every 60 seconds.
91
92    **Pre-requisites:**
93
94    1.Check for the processors supported by PCM .Latest pcm utility version (2.11)support Intel® Xeon® E5 v4 processor family.
95
96    2.Disabling NMI Watch Dog
97
98    3.Installing MSR registers
99
100
101 Memory Bandwidth logs for KVMFORNFV can be found `here`_:
102
103 .. code:: bash
104
105     http://artifacts.opnfv.org/kvmfornfv.html
106
107 .. _here: http://artifacts.opnfv.org/kvmfornfv.html
108
109 Details of the function implemented:
110
111 In install_Pcm function, it handles the installation of pcm utility and the required prerequisites for pcm-memory.x tool to execute.
112
113 .. code:: bash
114
115    git clone https://github.com/opcm/pcm
116    cd pcm
117    make
118
119 In collect_MBWInfo Function,the below command is executed on the node which was collected to the logs
120 with the timestamp and testType.The function will be called at the begining of each testcase and
121 signal will be passed to terminate the pcm-memory process which was executing throughout the cyclic testcase.
122
123 .. code:: bash
124
125   pcm-memory.x 60 &>/root/MBWInfo/MBWInfo_${testType}_${timeStamp}
126