File: Infiniband.html

package info (click to toggle)
collectl 3.7.4-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,624 kB
  • ctags: 119
  • sloc: perl: 14,928; sh: 429; makefile: 11
file content (117 lines) | stat: -rw-r--r-- 6,238 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<html>
<head>
<link rel=stylesheet href="style.css" type="text/css">
<title>collectl - Infiniband</title>
</head>

<body>
<center><h1>Infiniband</h1></center>
<p>
<h3>Monitoring</h3>
Collectl V3.7.3 now supports monitoring infiniband by looking at 64 bit counters,
when the HCA supports them and virtually all of them do.  This means several
things:
<ul>
<li>collectl no longer has to read/clear the counters to read them and so is
non-distructive</li>
<li>there is no longer a restriction of multiple instances of collectl monintoring
infiniband statistics</li>
<li>you can now read these counters at greater intervals (if you really want to)
with no fear of them latching when they hit their 32 bit maximum</li>
</ul>
<p>
The easiest way to tell if your HCA supports 64 bit counters is to run perfquery -x
and if it works, you have 64 bit counters.  Alternatively you could also run:
<p>
<i>collectl -sx --showheader</i>
<p>
and if it displays an X in the flag field, you have them.  If you do have 64 bit
counters but collectl doesn't report the X, you have an older version installed.

The code to deal with 32 bit counters will be left in place for awhile but
eventually removed.  The rest of this documentation talks about monitoring
the narrower counters and is largely unchanged from before.
<h3>32 Bit Counters</h3>
The most important thing you should know about 32 bit monitoring is that it
is <i>destructive</i>.  What is meant by this is that every time 
collectl reads the counters from the HCA it immediately resets them to zero, thereby 
<i>destroying</i> their previous contents.  You should also note this does 
<i>not</i> apply error counters, which are never reset.
<p>
The obvious question is <i>why?</i> and perhaps the less than obvious answer is
because when the hardware specifications were written for the Infiniband HCAs it
was decided that performance counters would not wrap, probably because nobody
thought someone might want to do continuous sampling.  In any event, at even modest
traffic rates HCAs with 32-bit counters quickly reach their maximum values and
stop incrementing, rendering them useless for performance monitors like collectl.
Collectl's solution to this problem is to read the
counters and immediately reset them to 0.  As long as the next sampling period occurs
before the counters <i>fill up</i>, this methodology comes reasonably close to 
reflecting the traffic rates (some counts are lost between the read and reset).
<p>
However, this methodology has a downside in that while collectl is monitoring
the Infiniband stats, nobody else can (including other copies of collectl).
Unfortunately there is no solution to this problem short of redesigning the HCA
and that's simply not going to happen.  A second alternative would be to come
up with a mechanism in which the read/rest of the counters are moved into an OFED
module which exports these to /proc or /sys as rolling counters.  This was in 
fact done in a pre-ofed version of Voltaire's IB stack which is currently supported
by collectl.  If someone would like to hear more details on how this was done, feel
free to contact me or to post something in a collectl
<a href=http://sourceforge.net/forum/?group_id=196536>forum</a> or to the 
<a href=http://sourceforge.net/mail/?group_id=196536>mailing list</a>.
<p>
If you want to run collectl but also prevent it from doing destructive monitoring,
simple comment out the line in <i>/etc/collectl.conf</i> that begins with
<i>PQuery =</i> and you will be informed by collectl that Infiniband monitoring
has been disabled whenever someone try to monitor it.
<p>
<h3>Monitoring Mechanics</h3>
The main purpose of this section is to help you understand how monitoring works so when
it doesn't you might be able to figure out what went wrong.  There are 2 different ways
collectl can monitor Infiniband, one for the OFED stack, which is the Infiniband Stack 
of choice these days and the other for pre-OFED.
<p>
<b>OFED</b>
<p>
The OFED stack can be identified by the presence of the <i>/sys/class/infiniband</i>
directory.  If there, collectl looks inside to find which HCAs are present and which
ports are active.  This information is then used to query the HCA via the <i>perfquery</i>
utility.
<p>
Unfortunately, with each release of OFED that utility seems to move to another location
and collectl tries to react by using a search path in /etc/collectl.conf.  As of the 2.5.1
release of collectl, if it still can't find the utility it will try to find its location
with rpm and then add its path to collectl.conf.  If a future OFED release eliminates or
replaces perfquery collectl will break.
<p>
<b>Pre-OFED</b>
<p>
All pre-OFED monitoring code has been removed.
<p>
<b>Debugging</b>
<p>
Collectl has a variety of debugging capabilities built into it, the main one being
the debug switch -d.  To use this switch you specify a bit mask which is then applied
against a variety settings which tells collectl what to display.  For
debugging interconnect problems simply use -d2.  All possible bit settings
and their meanings are listed in the beginning of collectl itself.
<p>
If collectl runs without errors but you're not seeing IB traffic being reported
when you think you should, you can always use -d4 or even -d6, which show
the values of the counters returned by both perfquery and get_pcounter.  If they
don't change something outside of collectl must be wrong.
<p>
One example of a non-collectl problem was a system had IB configured and started
which could be verified by seein an <i>ib0</i> interface show up with <i>ifconfig</i>.
However, when
running <i>collectl -sN</i>, which will show the traffic over all the network
interfaces, there was never any traffic on the <i>ib</i> interface however there
was unexpected traffic on one of the <i>eth</i> interfaces.  Clearly something 
was wrong and looking at the routing showed the routes were set such that all 
traffic to the infiniband address was being routed over the <i>eth</i> interface.

<table width=100%><tr><td align=right><i>updated Feb 04, 2014</i></td></tr></colgroup></table>

</body>
</html>