From 56f8cdff9aaa9bf00c5dc9441a7569374f2cbafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= Date: Thu, 1 Mar 2018 11:21:26 +0000 Subject: initial commit --- .gitignore | 6 + LICENSE | 202 +++ Makefile | 19 + README.md | 405 ++++++ docs/doxygen.conf | 2432 ++++++++++++++++++++++++++++++++++++ ioreplay/Makefile | 36 + ioreplay/src/capture/capture.c | 99 ++ ioreplay/src/capture/capture.h | 30 + ioreplay/src/cleanup/cleanup.c | 30 + ioreplay/src/cleanup/cleanup.h | 29 + ioreplay/src/datas/amap.c | 264 ++++ ioreplay/src/datas/amap.h | 49 + ioreplay/src/datas/btree.c | 169 +++ ioreplay/src/datas/btree.h | 52 + ioreplay/src/datas/hmap.c | 364 ++++++ ioreplay/src/datas/hmap.h | 56 + ioreplay/src/datas/list.c | 279 +++++ ioreplay/src/datas/list.h | 56 + ioreplay/src/datas/rbuffer.c | 147 +++ ioreplay/src/datas/rbuffer.h | 102 ++ ioreplay/src/datas/stack.c | 85 ++ ioreplay/src/datas/stack.h | 43 + ioreplay/src/defaults.h | 50 + ioreplay/src/generate/generate.c | 235 ++++ ioreplay/src/generate/generate.h | 112 ++ ioreplay/src/generate/gioop.c | 838 +++++++++++++ ioreplay/src/generate/gioop.h | 102 ++ ioreplay/src/generate/gparser.c | 356 ++++++ ioreplay/src/generate/gparser.h | 113 ++ ioreplay/src/generate/gprocess.c | 101 ++ ioreplay/src/generate/gprocess.h | 90 ++ ioreplay/src/generate/gtask.c | 91 ++ ioreplay/src/generate/gtask.h | 100 ++ ioreplay/src/generate/gwriter.c | 85 ++ ioreplay/src/generate/gwriter.h | 86 ++ ioreplay/src/generate/vsize.c | 247 ++++ ioreplay/src/generate/vsize.h | 180 +++ ioreplay/src/init/init.c | 226 ++++ ioreplay/src/init/init.h | 64 + ioreplay/src/init/itask.c | 66 + ioreplay/src/init/itask.h | 72 ++ ioreplay/src/init/ithread.c | 99 ++ ioreplay/src/init/ithread.h | 86 ++ ioreplay/src/macros.h | 116 ++ ioreplay/src/main.c | 275 ++++ ioreplay/src/meta/meta.c | 111 ++ ioreplay/src/meta/meta.h | 107 ++ ioreplay/src/mounts.c | 400 ++++++ ioreplay/src/mounts.h | 154 +++ ioreplay/src/opcodes.h | 103 ++ ioreplay/src/options.c | 51 + ioreplay/src/options.h | 61 + ioreplay/src/replay/replay.c | 191 +++ ioreplay/src/replay/replay.h | 46 + ioreplay/src/replay/rioop.c | 425 +++++++ ioreplay/src/replay/rioop.h | 54 + ioreplay/src/replay/rprocess.c | 34 + ioreplay/src/replay/rprocess.h | 40 + ioreplay/src/replay/rstats.c | 108 ++ ioreplay/src/replay/rstats.h | 117 ++ ioreplay/src/replay/rtask.c | 50 + ioreplay/src/replay/rtask.h | 69 + ioreplay/src/replay/rthread.c | 216 ++++ ioreplay/src/replay/rthread.h | 123 ++ ioreplay/src/replay/rworker.c | 360 ++++++ ioreplay/src/replay/rworker.h | 82 ++ ioreplay/src/utests.c | 30 + ioreplay/src/utests.h | 25 + ioreplay/src/utils/futils.c | 291 +++++ ioreplay/src/utils/futils.h | 134 ++ ioreplay/src/utils/utils.c | 152 +++ ioreplay/src/utils/utils.h | 165 +++ ioreplay/src/vfd.c | 55 + ioreplay/src/vfd.h | 77 ++ ioreplay/tags | 661 ++++++++++ systemtap/Makefile | 43 + systemtap/src/ioreplay.stp | 591 +++++++++ systemtap/src/javaioreplay.stp | 596 +++++++++ systemtap/src/targetedioreplay.stp | 596 +++++++++ 79 files changed, 15062 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 README.md create mode 100644 docs/doxygen.conf create mode 100644 ioreplay/Makefile create mode 100644 ioreplay/src/capture/capture.c create mode 100644 ioreplay/src/capture/capture.h create mode 100644 ioreplay/src/cleanup/cleanup.c create mode 100644 ioreplay/src/cleanup/cleanup.h create mode 100644 ioreplay/src/datas/amap.c create mode 100644 ioreplay/src/datas/amap.h create mode 100644 ioreplay/src/datas/btree.c create mode 100644 ioreplay/src/datas/btree.h create mode 100644 ioreplay/src/datas/hmap.c create mode 100644 ioreplay/src/datas/hmap.h create mode 100644 ioreplay/src/datas/list.c create mode 100644 ioreplay/src/datas/list.h create mode 100644 ioreplay/src/datas/rbuffer.c create mode 100644 ioreplay/src/datas/rbuffer.h create mode 100644 ioreplay/src/datas/stack.c create mode 100644 ioreplay/src/datas/stack.h create mode 100644 ioreplay/src/defaults.h create mode 100644 ioreplay/src/generate/generate.c create mode 100644 ioreplay/src/generate/generate.h create mode 100644 ioreplay/src/generate/gioop.c create mode 100644 ioreplay/src/generate/gioop.h create mode 100644 ioreplay/src/generate/gparser.c create mode 100644 ioreplay/src/generate/gparser.h create mode 100644 ioreplay/src/generate/gprocess.c create mode 100644 ioreplay/src/generate/gprocess.h create mode 100644 ioreplay/src/generate/gtask.c create mode 100644 ioreplay/src/generate/gtask.h create mode 100644 ioreplay/src/generate/gwriter.c create mode 100644 ioreplay/src/generate/gwriter.h create mode 100644 ioreplay/src/generate/vsize.c create mode 100644 ioreplay/src/generate/vsize.h create mode 100644 ioreplay/src/init/init.c create mode 100644 ioreplay/src/init/init.h create mode 100644 ioreplay/src/init/itask.c create mode 100644 ioreplay/src/init/itask.h create mode 100644 ioreplay/src/init/ithread.c create mode 100644 ioreplay/src/init/ithread.h create mode 100644 ioreplay/src/macros.h create mode 100644 ioreplay/src/main.c create mode 100644 ioreplay/src/meta/meta.c create mode 100644 ioreplay/src/meta/meta.h create mode 100644 ioreplay/src/mounts.c create mode 100644 ioreplay/src/mounts.h create mode 100644 ioreplay/src/opcodes.h create mode 100644 ioreplay/src/options.c create mode 100644 ioreplay/src/options.h create mode 100644 ioreplay/src/replay/replay.c create mode 100644 ioreplay/src/replay/replay.h create mode 100644 ioreplay/src/replay/rioop.c create mode 100644 ioreplay/src/replay/rioop.h create mode 100644 ioreplay/src/replay/rprocess.c create mode 100644 ioreplay/src/replay/rprocess.h create mode 100644 ioreplay/src/replay/rstats.c create mode 100644 ioreplay/src/replay/rstats.h create mode 100644 ioreplay/src/replay/rtask.c create mode 100644 ioreplay/src/replay/rtask.h create mode 100644 ioreplay/src/replay/rthread.c create mode 100644 ioreplay/src/replay/rthread.h create mode 100644 ioreplay/src/replay/rworker.c create mode 100644 ioreplay/src/replay/rworker.h create mode 100644 ioreplay/src/utests.c create mode 100644 ioreplay/src/utests.h create mode 100644 ioreplay/src/utils/futils.c create mode 100644 ioreplay/src/utils/futils.h create mode 100644 ioreplay/src/utils/utils.c create mode 100644 ioreplay/src/utils/utils.h create mode 100644 ioreplay/src/vfd.c create mode 100644 ioreplay/src/vfd.h create mode 100644 ioreplay/tags create mode 100644 systemtap/Makefile create mode 100644 systemtap/src/ioreplay.stp create mode 100644 systemtap/src/javaioreplay.stp create mode 100644 systemtap/src/targetedioreplay.stp diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a122f0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.ko +*.o +docs/html/ +docs/latex/ +ioreplay/ioreplay +systemtap/downloads/ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..427e7bb --- /dev/null +++ b/Makefile @@ -0,0 +1,19 @@ +DESTDIR=/opt/ioreplay +all: + $(MAKE) -C systemtap + $(MAKE) -C ioreplay +install: + $(MAKE) -C systemtap install + $(MAKE) -C ioreplay install +uninstall: + test ! -z $(DESTDIR) && test -d $(DESTDIR) && rm -Rfv $(DESTDIR) || exit 0 +deinstall: uninstall +clean: + $(MAKE) -C ioreplay clean + $(MAKE) -C systemtap clean +astyle: + $(MAKE) -C ioreplay astyle +loc: + wc -l ./systemtap/src/*.stp ./ioreplay/src/*.{h,c} ./ioreplay/src/*/*.{h,c} | tail -n 1 +doxygen: + doxygen ./docs/doxygen.conf diff --git a/README.md b/README.md new file mode 100644 index 0000000..1bdf632 --- /dev/null +++ b/README.md @@ -0,0 +1,405 @@ +# I/O Replay + +## Overview + +I/O Replay is an I/O benchmarking tool for Linux based operating systems which captures I/O operations on a (possibly production) server in order to replay the exact same I/O operations on a load test machine. + +I/O Replay is operated in 5 steps: + +1. Capture: Record all I/O operations over a given period of time to a capture log. +2. Initialize: Copy the log to a load test machine and initialize the load test environment. +3. Replay: Drop all OS caches and replay all I/O operations. +4. Analyze: Look at the OS and hardware stats (throughput, I/O ops, load average) from the run phase and draw conclusions. The aim is to identify possible I/O bottlenecks. +5. Repeat: Repeat 2-4 times but adjust OS and hardware settings in order to improve I/O performance. + +Examples of OS and hardware settings and adjustments: + +* Change of system parameters (file system mount options, file system caching, file system type, file system creation flags). +* Replay the I/O at different speed(s). +* Replay the I/O with modified pattern(s) (e.g. remove reads from the replay journal). +* Replay the I/O on different types of hardware. + +The file system fragmentation (depending on the file system type and utilisation) might affect I/O performance as well. Therefore, replaying the I/O will not give the exact same result as on a production system. But it provides a pretty good way to determine I/O bottlenecks. As a rule of thumb file system fragmentation will not be an issue, unless the file system begins to fill up. Modern file systems (such as Ext4) will slowly start to suffer from fragmentation and slow down then. + +## Benefits + +In contrast to traditional I/O benchmarking tools, I/O Replay reproduces real production I/O, and does not rely on a pre-defined set of I/O operations. + +Also, I/O Replay only requires a server machine for capturing and another server machine for replaying. A traditional load test environment would usually be a distributed system which can consist of many components and machines. Such a distributed system can become quite complex which makes it difficult to isolate possible I/O bottlenecks. For example in order to trigger I/O events a client application would usually have to call a remote server application. The remote server application itself would query a database and the database would trigger the actual I/O operations in Linux. Furthermore, it is not easy to switch forth and back between hardware and OS settings. For example without a backup and restore procedure a database would most likely be corrupt after reformatting the data partitions with a different file system type. + +The benefits of I/O replay are: + +* It is easy to determine whether a new hardware type is suitable for an already existing application. +* It is easy to change OS and hardware for performance tests and optimizations. +* Findings can be applied to production machines in order to optimize OS configuration and to save hardware costs. +* Benchmarks are based on production I/O patterns and not on artificial I/O patterns. +* Log files can be modified to see whether a change in the application behavior would improve I/O performance (without actually touching the application code) +* Log files could be generated synthetically in order to find out how a new application would perform (even if there isn't any code for the new application yet) +* It identifies possible flaws in the applications (e.g. Java programs which produce I/O operations on the server machines). Findings can be reported to the corresponding developers so that changes can be introduced to improve the applications I/O performance. +* It captures I/O in Linux Kernel space (very efficient, no system slowdowns even under heavy I/O load) +* It replays I/O via a tool developed in C with as little overhead as possible. + +# Send in patches + +Patches of any kind (bug fixes, new features...) are welcome! I/O Replay is new software and not everything might be perfect yet. Also, I/O Replay is used for a very specific use case at Mimecast. It may need tuning or extension for your use case. It will grow and mature over time. + +This is also potentially a great tool just for analysing (not replaying) the I/O, therefore it would be a great opportunity to add more features related to that (e.g. more stats, filters, etc.). + +Future work will also include file hole support and I/O support for memory mapped files. + +# Getting started + +I/O Replay consists of a set of SystemTap kernel modules (capturing I/O) and the tool ``ioreplay`` (replaying I/O). Usually you want to capture I/O from a production machine and want to replay it on a separate load testing machine. + +## System requirements + +I/O replay has been tested on + +* CentOS 7.4 64Bit (latest version, all packages up to date, booted into the installed Kernel) +* SystemTap (from the default CentOS repository) +* GCC C-Compiler (from the default CentOS repository) + +Before proceeding please ensure that the latest CentOS 7 kernel is installed and running on all machines involved. It should also be ensured that the capture machine and the load test machine have the same mount points mounted. This is to ensure that I/O is being replayed on the corresponding data drives on the load test machine. + +## Compiling and installing ioreplay + +I/O Replay has to be installed on all machines involved. To install I/O Replay perform the following steps: + +```sh +sudo yum install gcc systemtap yum-utils kernel-devel-$(uname -r) +sudo debuginfo-install kernel-$(uname -r) +make && sudo make install +export PATH=$PATH:/opt/ioreplay/bin +``` + +This will install the ``ioreplay`` utility to ``/opt/ioreplay/bin/`` and the SystemTap kernel modules to ``/opt/ioreplay/systemtap/``. Run ``ioreplay -h`` to print out a brief help. + +However, best practise is not to install any compilers on a production machine. You can either compile I/O Replay from scratch on all machines involved like shown above or only compile it on a build machine and distribute the ``/opt/ioreplay`` directory to the remaining machines. In the latter case you will also need to install the ``systemtap-runtime`` package as an additional dependency. + +In case you decided to deinstall I/O Replay you can do so by running + +```sh +sudo ioreplay -P # purges all test files created by ioreplay +sudo make uninstall +``` + +# Operating I/O Replay + +## 1. Capture + +The following steps are required to capture all I/O operation of the entire (Linux) system to the file ``io.capture``. For efficiency and security it is only capturing the meta data (amount of bytes written and read) and not the actual data itself. It is also capturing the system time in microseconds and the process IDs (PIDs) and thread IDs (TIDs) used as well as all relevant options and flags of the corresponding I/O syscalls. It will stop capturing automatically after 60 minutes: + + * 1) Stop all applications on the machine. Otherwise the kernel module won't recognize any already opened file handles. Stopping the applications before starting with the capture is essential for tracing the flags in how the files were opened. All I/O operations on unknown file handles will be ignored otherwise. + * 2) Run: + +```sh +sudo ioreplay -c ~/io.capture +``` + + * 3) Start all applications again. + * 4) To stop capturing I/O type Ctrl+C. Alternatively one hour for the Kernel module to auto exit. + +To capture only I/O caused by Java process run: + +```sh +sudo ioreplay -c ~/io.capture -m javaioreplay.ko +``` + +To capture the I/O of a specific process run the following respectively: + +```sh +sudo ioreplay -c ~/io.capture -m targetedioreplay.ko -p PID +``` + +The resulting capture log looks like this and can be multiple GB in size: + +```sh +t=1511381122062;:,i=7764:8093;:,o=open;:,d=162;:,p=///usr/local/mimecast/someapp/somesubdir/vd11-9:1;:,f=0;:,m=438;:, +t=1511381122062;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=read;:,d=162;:,b=12;:, +t=1511381122062;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=lseek;:,d=162;:,O=0;:,W=1;:,b=12;:, +t=1511381122062;:,i=7764:8093;:,o=read;:,d=162;:,b=0;:, +t=1511381122062;:,i=7764:8093;:,o=close;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=open;:,d=162;:,p=///usr/local/mimecast/someapp/somesubdir/vd11-8:1;:,f=0;:,m=438;:, +t=1511381122062;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=read;:,d=162;:,b=12;:, +t=1511381122062;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=lseek;:,d=162;:,O=0;:,W=1;:,b=12;:, +t=1511381122062;:,i=7764:8093;:,o=read;:,d=162;:,b=0;:, +t=1511381122062;:,i=7764:8093;:,o=close;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=open;:,d=162;:,p=///usr/local/mimecast/someapp/somesubdir/vd11-9:0;:,f=0;:,m=438;:, +t=1511381122062;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=read;:,d=162;:,b=12;:, +t=1511381122062;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122062;:,i=7764:8093;:,o=lseek;:,d=162;:,O=0;:,W=1;:,b=12;:, +t=1511381122062;:,i=7764:8093;:,o=read;:,d=162;:,b=0;:, +t=1511381122062;:,i=7764:8093;:,o=close;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=open;:,d=162;:,p=///usr/local/mimecast/someapp/somesubdir/vd11-7:1;:,f=0;:,m=438;:, +t=1511381122063;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=read;:,d=162;:,b=12;:, +t=1511381122063;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=lseek;:,d=162;:,O=0;:,W=1;:,b=12;:, +t=1511381122063;:,i=7764:8093;:,o=read;:,d=162;:,b=0;:, +t=1511381122063;:,i=7764:8093;:,o=close;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=open;:,d=162;:,p=///usr/local/mimecast/someapp/somesubdir/vd11-8:0;:,f=0;:,m=438;:, +t=1511381122063;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=read;:,d=162;:,b=12;:, +t=1511381122063;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=lseek;:,d=162;:,O=0;:,W=1;:,b=12;:, +t=1511381122063;:,i=7764:8093;:,o=read;:,d=162;:,b=0;:, +t=1511381122063;:,i=7764:8093;:,o=close;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=open;:,d=162;:,p=///usr/local/mimecast/someapp/somesubdir/vd11-6:1;:,f=0;:,m=438;:, +t=1511381122063;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=read;:,d=162;:,b=12;:, +t=1511381122063;:,i=7764:8093;:,o=fstat;:,d=162;:,s=0;:, +t=1511381122063;:,i=7764:8093;:,o=lseek;:,d=162;:,O=0;:,W=1;:,b=12;:, +``` + +### Using a RAMdisk (optional) + +It is beneficial to write ``io.capture`` to a RAMdisk so that we are not interfering so much with the system I/O: + +```sh +sudo mkdir -p /mnt/ramdisk +sudo mount -t tmpfs -o size=32g tmpfs /mnt/ramdisk +``` + +Make sure that there is enough system memory available for such a RAMdisk and all the processes running on the machine. Eventually, RAM will be taken away from the Linux caches which potentially could decrease system I/O performance. Run the following command to capture to the RAMdisk respectively: + +```sh +sudo ioreplay -c /mnt/ramdisk/io.capture +``` + +## 2. Initialize + +### 2.1 Pre-process the capture log / generate a replay log + +After producing ``io.capture`` it must be pre-processed. The resulting replay log introduces the following changes (for improving replay performance and make the parsing easier): + +* Time stamps begin from 0 +* Use of internal opcodes rather than strings (e.g. ``30`` instead of ``open``) for faster parsing. +* All operations on unknown file handles are _removed_. +* All incomplete or corrupt lines from the capture file are ignored. There may be corrupt lines in the capture file because SystemTap may skips a very few probe points if it decides that capturing I/O is causing too much overhead. +* Rewrite of all file paths. ``ioreplay`` adds ``/.ioreplay/NAME`` to all file paths for each file system mount point. + +To generate the the replay log ``io.replay`` from the capture log ``io.capture`` run: + +```sh +sudo ioreplay -c io.capture -r io.replay -n NAME -u USER +``` + +In which NAME is a freely chosen name and USER must be a valid system user. It is the system user under which the replay test will run. This command also creates all required top level directories such as ``/.ioreplay/NAME/``, ``/mnt/.ioreplay/NAME/`` in all mounted file systems. These are the directories where the replay test will read/write files from/to. These directories will belong to user USER. + +``ioreplay`` will filter out many operations, especially all operations on pseudo file systems (e.g. sysfs, procfs), as it does not make a lot of sense to replay I/O on these file systems. Also, I/O operations on unknown file handles will be filtered out as well. This can happen when we start capturing the I/O *after* an application already opened a file. As a result we won't see how the application opened that file. The best practise is to stop all applications on the machine first, start capturing the I/O, and start all applications again. This may be improved in future releases of I/O Replay. + +The resulting replay log will look like this: At the first line there is a meta header. It contains information about the test configuration. The meta header is followed by all the I/O operations. At the end of the file is the INIT section. It lists all files (also their sizes) and directories required to be present before replaying the I/O. + + +```sh +#|num_timelines=509591|num_mapped_pids=19189|num_mapped_fds=4292067|num_lines=55040114|replay_version=1|user=ioreplayuser|name=test0|init_offset=2578735248| +23|1|1|0|0|30|11|/usr/local/mimecast/.ioreplay/test0/someapp/somesubdir/vd11-9:1|438|0|open@31| +23|1|1|0|0|0|11|0|fstat@32| +23|1|1|0|0|10|11|12|read@33| +23|1|1|0|0|0|11|0|fstat@34| +23|1|1|0|0|72|11|0|1|12|lseek@35| +23|1|1|0|0|10|11|0|read@36| +23|1|1|0|0|50|11|0|close@37| +23|2|1|0|0|30|12|/usr/local/mimecast/.ioreplay/test0/someapp/somesubdir/vd11-8:1|438|0|open@38| +23|2|1|0|0|0|12|0|fstat@39| +23|2|1|0|0|10|12|12|read@40| +23|2|1|0|0|0|12|0|fstat@41| +23|2|1|0|0|72|12|0|1|12|lseek@42| +23|2|1|0|0|10|12|0|read@43| +23|2|1|0|0|50|12|0|close@44| +23|3|1|0|0|30|13|/usr/local/mimecast/.ioreplay/test0/someapp/somesubdir/vd11-9:0|438|0|open@45| +23|3|1|0|0|0|13|0|fstat@46| +23|3|1|0|0|10|13|12|read@47| +23|3|1|0|0|0|13|0|fstat@48| +23|3|1|0|0|72|13|0|1|12|lseek@49| +23|3|1|0|0|10|13|0|read@50| +23|3|1|0|0|50|13|0|close@51| +23|4|1|0|0|30|14|/usr/local/mimecast/.ioreplay/test0/someapp/somesubdir/vd11-7:1|438|0|open@52| +23|4|1|0|0|0|14|0|fstat@53| +23|4|1|0|0|10|14|12|read@54| +23|4|1|0|0|0|14|0|fstat@55| +23|4|1|0|0|72|14|0|1|12|lseek@56| +23|4|1|0|0|10|14|0|read@57| +23|4|1|0|0|50|14|0|close@58| +23|5|1|0|0|30|15|/usr/local/mimecast/.ioreplay/test0/someapp/somesubdir/vd11-8:0|438|0|open@59| +23|5|1|0|0|0|15|0|fstat@60| +23|5|1|0|0|10|15|12|read@61| +23|5|1|0|0|0|15|0|fstat@62| +23|5|1|0|0|72|15|0|1|12|lseek@63| +23|5|1|0|0|10|15|0|read@64| +23|5|1|0|0|50|15|0|close@65| +23|6|1|0|0|30|16|/usr/local/mimecast/.ioreplay/test0/someapp/somesubdir/vd11-6:1|438|0|open@66| +23|6|1|0|0|0|16|0|fstat@67| +23|6|1|0|0|10|16|12|read@68| +23|6|1|0|0|0|16|0|fstat@69| +. +. +. +#INIT +0|1|688|/mnt/15/.ioreplay/test0/bmnt/2/20171101/b/8/b_dv01_11_vd11-11_a|@55290437 +0|1|2592|/mnt/15/.ioreplay/test0/bmnt/2/20171101/b/3/b_dv01_11_vd11-11_b|@33907067 +0|1|768|/mnt/14/.ioreplay/test0/bmnt/2/20171101/b/d/b_dv01_11_vd11-11_c|@64247527 +0|1|1440|/mnt/15/.ioreplay/test0/bmnt/2/20171101/b/0/b_dv01_11_vd11-11_d|@2014896 +0|1|960|/mnt/15/.ioreplay/test0/bmnt/2/20171101/b/9/b_dv01_11_vd11-11_e|@17724079 +0|1|928|/mnt/15/.ioreplay/test0/bmnt/2/20171101/b/1/b_dv01_11_vd11-11_f|@4534389 +0|1|1712|/mnt/14/.ioreplay/test0/bmnt/2/20171101/b/5/b_dv01_11_vd11-11_g|@2738458 +0|1|784|/mnt/14/.ioreplay/test0/bmnt/2/20171101/b/b/b_dv01_11_vd11-11_h|@21136612 +0|1|624|/mnt/14/.ioreplay/test0/bmnt/2/20171101/b/6/b_dv01_11_vd11-11_i|@24683427 +0|1|672|/mnt/14/.ioreplay/test0/bmnt/2/20171101/b/9/b_dv01_11_vd11-11_j|@12584061 +0|1|336|/mnt/15/.ioreplay/test0/bmnt/2/20171101/b/5/b_dv01_11_vd11-11_k|@7737434 +0|1|12|/mnt/06/.ioreplay/test0/bmnt/tmp/b|@42498106 +. +. +. + +``` + +### 2.2 Initialize the replay test + +It is very likely that the replay test wants to access already existing files. Therefore it has to be ensured that all of these exist already before starting the test. To create all files and directories required by the test run the following command: + +```sh +sudo ioreplay -i io.replay +``` + +For that ``ioreplay`` makes use of the INIT section in ``io.replay``. + +## 3. Replay + +It has to be ensured that user USER can open many files and processes. Add the following to ``/etc/security/limits.d/ioreplay.conf``: + +```sh +cat < 0) { + sleep(time_ahead) + } +} +``` + +A speed factor of `0` is interpreted as "replay as fast as possible". A speed factor of `1` can be used to replay everything in original speed (same speed as on the original host where the I/O was captured). A speed factor of `2` would double the speed and a speed factor of `0.5` would half the speed. +In order to replay the I/O in original speed the factor of `1` can be used as follows: + +```sh +sudo ioreplay -R io.replay -s 1 +``` + +## 4. Analyse + +Look at various operating system statistics during the test. Useful commands are for example ``iostat -x 1``, ``dstat --disk`` and ``sudo iotop -o``. Best would be to collect all I/O statistics of all drives to a time series database with graphing capabilities such as Collectd/Graphite/Whisper. + +## 5. Repeat + +It is important to understand the I/O statistics observed. It is possible to repeat the same test any time again. Each time with different settings applied. + +## Cleanup + +To purge all temporally data files of all tests run + +```sh +sudo ioreplay -P +``` + +Note: It's not required to cleanup any test data manually when you intend to re-run a test or run a new test. During initialization (``-i`` or ``-R`` switch) ``ioreplay`` will automatically move all old data to ``.ioreplay/.trash/`` sub-folders. The data will be ignored there. However, once you intend to completely delete all test files and directories (e.g. you run out of disk space or want to deinstall ``ioreplay`` you should purge them with ``-P`` as shown above. + +## Supported file systems + +Currently I/O Replay supports replaying I/O on ``ext2``, ``ext3``, ``ext4`` and ``xfs``. However, it should be straightforward add additional file systems. + +## Supported syscalls + +Currently, these file I/O related syscalls are supported (as of CentOS 7): + +```code +open +openat +lseek +fcntl +creat +write +writev +unlink +unlinkat +rename +renameat +renameat2 +read +readv +readahead - Initial support only +readdir +readlink +readlinkat +fdatasync +fsync +sync_file_range - Initial support only +sync +syncfs +close +getdents +mkdir +rmdir +mkdirat +stat +statfs - Initial support only +statfs64 - Initial support only +fstatfs - Initial support only +fstatfs64 - Initial support only +lstat +fstat +fstatat +chmod +fchmodat +fchmod +chown +chown16 +lchown +lchown16 +fchown +fchown16 +fchownat +mmap2 - Initial support only +mremap - Initial support only +munmap - Initial support only +msync - Initial support only +exit_group - To detect process termination (closing all open file handles) +``` + +## Source code documentation + +The documentation of the source code can be generated via the Doxygen Framework. To install doxygen run ``sudo yum install doxygen`` and to generate the documentation run ``make doxygen`` in the top level source directory. Once done, the resulting documentation can be found in the ``docs/html`` subfolder of the project. It is worthwhile to start from ``ioreplay/src/main.c`` and read your way through. Functions are generally documented in the header files. Exceptions are static functions which don't have any separate declarations. diff --git a/docs/doxygen.conf b/docs/doxygen.conf new file mode 100644 index 0000000..340f731 --- /dev/null +++ b/docs/doxygen.conf @@ -0,0 +1,2432 @@ +# Doxyfile 1.8.13 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = "I/O Replay" + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = 0.1-BETA + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = "An I/O capture and replay benchmarking tool for Linux" + +# With the PROJECT_LOGO tag one can specify a logo or an icon that is included +# in the documentation. The maximum height of the logo should not exceed 55 +# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy +# the logo to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = ./docs + +# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = "The $name class" \ + "The $name struct" \ + "The $name widget" \ + "The $name file" \ + is \ + provides \ + specifies \ + contains \ + represents \ + a \ + an \ + the + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = YES + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new +# page for each member. If set to NO, the documentation of a member will be part +# of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note: For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up +# to that level are automatically included in the table of contents, even if +# they do not have an id attribute. +# Note: This feature currently applies only to Markdown headings. +# Minimum value: 0, maximum value: 99, default value: 0. +# This tag requires that the tag MARKDOWN_SUPPORT is set to YES. + +TOC_INCLUDE_HEADINGS = 0 + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by putting a % sign in front of the word or +# globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = NO + +# If one adds a struct or class to a group and this option is enabled, then also +# any nested class or struct is added to the same group. By default this option +# is disabled and one has to add nested compounds explicitly via \ingroup. +# The default value is: NO. + +GROUP_NESTED_COMPOUNDS = NO + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO, +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. If set to YES, local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO, only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO, these classes will be included in the various overviews. This option +# has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO, these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO, these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = YES + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES, upper-case letters are also +#