Refactoring Kieker’s I/O Infrastructure to Improve Scalability and Extensibility Holger Knoche University of Kiel November 10, 2017 @ SSP Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 1 / 16
Agenda 1. Motivation 2. Kieker’s I/O Infrastructure Today 3. Kieker’s I/O Infrastructure Tomorrow 4. Performance Evaluation 5. Conclusions and Future Directions Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 2 / 16
Need for Scalability Motivation ◮ Large, scalable software systems produce large amounts of monitoring data ◮ Modern messaging solutions provide the basis for scalabe, distributed data processing ◮ But: Kieker’s I/O infrastructure currently does not leverage the scalability of such platforms Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 3 / 16
Anatomy of a Reader-Writer Pair Kieker’s I/O Infrastructure Today kieker-monitoring kieker-analysis AbstractMonitoringWriter AbstractReaderPlugin writeMonitoringRecord(record) ConcreteWriter ConcreteReader Test Cases Specific Dependencies ◮ Reader and writer reside in separate components ◮ No place to put specific dependencies and test cases ◮ Data format hard-coded into the readers and writers Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 4 / 16
Default Binary Protocol Kieker’s I/O Infrastructure Today Kieker’s default binary protocol uses string tables to avoid redundantly transferring string values. 1. All strings from a monitoring record are replaced by numeric IDs from the table 2. If a new string is encountered, a new ID is assigned and a special record is sent to update the consumer’s table 3. The producer sends the encoded record 4. The consumer decodes the record using it’s own copy of the string table Problem: The string table is stateful. Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 5 / 16
Identified Flaws / Mission Briefing Kieker’s I/O Infrastructure Today 1. Stateful transfer protocol ◮ Does not work with multiple record consumers ◮ Prevents scalability 2. Data format is hard-coded into the writers ◮ Little flexibility in terms of data format 3. Only one record is processed at a time ◮ Increased overhead in messaging systems 4. Cumbersome separation of readers and writers ◮ Leads to global dependencies ◮ No place to put reader-writer tests Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 6 / 16
New Concepts Kieker’s I/O Infrastructure Tomorrow ◮ Collectors collect multiple monitoring records and orchestrate the process of encoding and transferring the data ◮ Serializers and Deserializers encode monitoring records in a particular format and vice versa ◮ Raw Data Readers and Writers are responsible for tranferring the data using a particular medium Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 7 / 16
Reader-Writer Anatomy Revisited Kieker’s I/O Infrastructure Tomorrow kieker-monitoring kieker-analysis AbstractMonitoringWriter AbstractReaderPlugin writeMonitoringRecord(record) ChunkingCollector GenericReaderPlugin kieker-common «interface» «interface» «interface» IMonitoringRecordSerializer IRawDataProcessor IMonitoringRecordDeserializer serializeRecords(records, buffer) decodeAndDeliver(data) serializeRecords(buffer):records «interface» «interface» IRawDataWriter IRawDataReader writeData(buffer, offset, length) read() kieker-concrete-io ConcreteWriter ConcreteReader Test Cases Specific Dependencies Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 8 / 16
Mission Debriefing Kieker’s I/O Infrastructure Tomorrow 1. Stateful transfer protocol � Fixed by a new, stateless container format 2. Data format is hard-coded into the writers � (De-)Serializers can be selected independent of the reader / writer 3. Only one record is processed at a time � Collectors allow to collect and batch-process multiple records 4. Cumbersome separation of readers and writers � Raw readers and writers (and their dependencies) can now be put into the same component Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 9 / 16
Mission Debriefing Kieker’s I/O Infrastructure Tomorrow ✯ ▼✐ss✐♦♥ ❆❝❝♦♠♣❧✐s❤❡❞ ✯ But... Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 10 / 16
Performance Evaluation Performance Evaluation Major changes were made to Kieker’s I/O Infrastructure, which may affect performance. Performance Evaluation Questions: EQ1 Does the refactoring have a (negative) performance impact on the monitored application? EQ2 To what extent does the chunking affect the overall resource consumption when using a messaging technology? Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 11 / 16
EQ1: Application Performance Performance Evaluation We... ◮ ...used MooBench ◮ ...used “null” writers that only did serialization ◮ ...ran everything on a Raspberry Pi 3 ◮ ...evaluated four configurations Configuration 95% CI (in µ s) σ Baseline [106.0;106.2] 21.0 Current infrastructure [152.8;152.9] 28.3 Collector (no bypass) [163.3;163.6] 64.9 Collector (bypass) [141.5;141.6] 40.3 Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 12 / 16
EQ2: System Performance Performance Evaluation We... ◮ ...used a test harness issuing records at a constant rate ◮ ...measured CPU utilization by the harness process and overall network utilization ◮ ...ran the benchmarks on an otherwise idle system ◮ ...evaluated different chunk sizes Chunk 95% CI CPU 95% CI net size in CPU sec. / sec. in KiB Old writer [0.612;0.620] [1,913.7;1,914.2] 1 [0.768;0.780] [2,706.4;2,710.3] 16 [0.460;0.477] [684.2;684.3] 32 [0.273;0.275] [639.9;640.1] 128 [0.340;0.356] [593.8;594.2] 1024 [0.338;0.352] [577.3;581.1] Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 13 / 16
Mission Debriefing Performance Evaluation ✯ ▼✐ss✐♦♥ ❘❡❛❧❧② ❆❝❝♦♠♣❧✐s❤❡❞ ✯ Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 14 / 16
Conclusions Conclusions and Future Directions We... ◮ ...prepared Kieker to leverage the scalability of modern messaging infrastructures ◮ ...improved extensibility and flexibility along the way ◮ ...did not break anything in terms of performance ◮ ...even achieved performance improvements for message writers Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 15 / 16
Distributed Trace Processing Conclusions and Future Directions Trace Preprocessing / Trace Processing Nodes Monitored Nodes Filtering Nodes Holger Knoche Refactoring Kieker’s I/O Infrastructure November 10, 2017 @ SSP 16 / 16
Recommend
More recommend