Table of Contents
147 |-
149 |
- 1. Introduction 150 |
- 2. Installation and use 151 | 157 | 158 |
1 Introduction
164 |
166 | The extract-glvolprof.py program is meant to assist with visualizing the performance of
167 | a gluster volume, using the gluster volume profile command.
168 |
171 | It consists of three pieces: 172 |
173 | 174 |-
175 |
- gvp.sh: a bash script which runs the above command periodically for a number 176 | of samples, storing the results in a file. 177 | 178 |
- extract_glvolprof.py: a python script that takes that output file 179 | and massages it into a form that can be used for visualization. One 180 | component of this is an HTMl file that can be viewed in a 181 | browser. The other is a bunch of CSV files containing the 182 | data. These files can also be used with a spreadsheet application if 183 | desired, to produce graphs that way. 184 | 185 |
- gvp-graph-javascript.tgz: a tarball containing some javascript 186 | libraries that are used by the HTML file above and provide common 187 | code to read CSV files and produce graphs using the nvd3 library. 188 |
2 Installation and use
195 |2.1 Simplest installation possible - somewhere on the cluster
198 |200 | Copy the scripts to some directory in the cluster, unpack the tarball 201 | in the same directory. Run the gvp.sh script. As an illustration, 202 | let's say we want to run it every 10 seconds and 12 iterations 203 | (roughly two minutes of operation) - in practice, you might want to 204 | do that periodically, perhaps in a cron job, in order to see the behavior 205 | of the cluster over time: 206 |
207 |./gvp.sh 10 12 210 |211 |
213 | By default, the output file is called gvp.log. Then run the extract script
214 | on that output file:
215 |
python extract_glvolprof.py gvp.log 219 |220 |
222 | The output (a bunch of CSV files and an HTML summary page) is placed in
223 | a subdirectory called gvp.log_csvdir.
224 |
226 | since we use pbench javascript graphing, then 227 | column 1 in the .csv is always the timestamp in milliseconds when 228 | that sample took place. This can be disabled with the environment variable 229 | SKIP_PBENCH_GRAPHING. 230 | 231 | the stat types are: 232 |
233 |239 | for each category, there are several kinds of .csv files produced. 240 | For each FOP + stat type, we show per-brick results and results across all bricks. 241 | For each stat type, across all bricks, we show FOP stats together in vol*allfop.csv files. 242 | We also show read/write traffic by brick in MBps*bricks.csv files. 243 | Finally we show read/write traffic for the entire volume in 244 | MBps*volume.csv files. 245 |
246 |247 | To see the graphs, fire up a browser and point it to the URL that the extract 248 | script printed: 249 |
250 |firefox gvp.log_csvdir/gvp-graphs.html 253 |254 |
256 | BTW, not everything works: e.g. the "Save as Image" button does not. Note
257 | also that the layout is crucial: the CSV subdirectory contains a
258 | symlink static, which points to the static subdirectory in the
259 | main directory (which is where the javascript tarball was
260 | unpacked). If you change that structure, then the javascript files may
261 | not be found: no graphs!
262 |
2.2 Simplest installation possible - on your own computer
268 |
270 | Alternatively, install everything as above somewhere on your own computer.
271 | Copy only the gvp.sh script to the cluster and run it there, then copy
272 | the gvp.log file back to your computer and process it locally as above.
273 |
2.3 More general installation (requires HTTP server)
279 |281 | For more general access, you might want to set up an HTTP server, either 282 | in the cluster itself or on some other accessible machine. 283 |
284 | 285 |
286 | The idea is to run the gvp.sh script in the cluster and copy the
287 | gvp.log file (probably renaming it using a timestamp to keep the
288 | name unique) to the HTTP server, under the document root directory.
289 | The extraction script can then be run on it to produce the CSV
290 | subdirectory under the server's document root:
291 |
python extract_glvolprof.py /var/www/html/gvp/gvp.log.TIMESTAMP 296 |297 |
300 | You can then view the results from a browser running elsewhere using 301 | a URL like 302 |
303 |304 | http://SERVER.DOMAIN/gvp/gvp.log.TIMESTAMP_csvdir/gvp-graphs.html 305 |306 |
2.4 Using ElasticSearch and Grafana - future direction
311 |313 | It's also possible to index the CSV files into ElasticSearch and use 314 | Grafana for the visualization. That's probably the most flexible solution, 315 | but it would need some additional work, not included here. 316 |
317 |