Software Performance Anti-Patterns Observed and Resolved in Kieker
Symposium on Software Performance 2015
Christian Wulf and Wilhelm Hasselbring 06.11.2015 Software Engineering Group Kiel University, Germany
Software Performance Anti-Patterns Observed and Resolved in Kieker - - PowerPoint PPT Presentation
Software Performance Anti-Patterns Observed and Resolved in Kieker Symposium on Software Performance 2015 Christian Wulf and Wilhelm Hasselbring 06.11.2015 Software Engineering Group Kiel University, Germany Kiekers Software Architecture
Christian Wulf and Wilhelm Hasselbring 06.11.2015 Software Engineering Group Kiel University, Germany
Software Performance Anti-Patterns Observed and Resolved in Kieker Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 2
(migration currently in progress)
Software Performance Anti-Patterns Observed and Resolved in Kieker
Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 3
Software Performance Anti-Patterns Observed and Resolved in Kieker
Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 4
Software Performance Anti-Patterns Observed and Resolved in Kieker Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 5
monitoring node analysis node monitoring records string registry records
thread thread thread thread
string registry string registry
Issues:
=> higher maintenance effort and higher security risk
=> higher communication effort
=> reduced throughput Context (Kieker 1.12 and below):
Software Performance Anti-Patterns Observed and Resolved in Kieker Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 6
monitoring node analysis node monitoring records string registry records
string registry
thread
string registry
thread
Our solution: Approach:
Benefits:
=> Unsynchronized string registry is sufficient
Software Performance Anti-Patterns Observed and Resolved in Kieker Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 7
Context (Kieker 1.10 and below):
int classId = buffer.getInt(); recordClassName = stringRegistry.get(classId); record = AbstractMonitoringRecord.createFromByteBuffer( recordClassName, buffer, stringRegistry);
Major issue:
=> Slow, especially due to the frequent invocations1
1 http://docs.oracle.com/javase/tutorial/reflect/index.html
Software Performance Anti-Patterns Observed and Resolved in Kieker Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 8
Our solution: Approach:
⇒ Caches subsequent accesses in a map
int classId = buffer.getInt(); recordClassName = stringRegistry.get(classId); recordFactory = cachedRecordFactoryCatalog.get(recordClassName); record = recordFactory.create(buffer, stringRegistry);
Benefits:
=> Fast record construction
return new ConcreteRecord(..)
Software Performance Anti-Patterns Observed and Resolved in Kieker Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 9
Context (Kieker 1.12 and below): Issues:
=> Slow and not used at all
try { // save buffer's current position reconstruct(buffer); } catch (BufferUnderflowException e) { // refill buffer // reset buffer's position }
Software Performance Anti-Patterns Observed and Resolved in Kieker Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 10
Our solution: Approach:
// save buffer's current position boolean success = reconstruct(buffer); if (!success) { // refill buffer // reset buffer's position }
Benefits:
Fast buffer underflow detection
Software Performance Anti-Patterns Observed and Resolved in Kieker
Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 11
http://kieker-monitoring.net http://teetime.sourceforge.net
Software Performance Anti-Patterns Observed and Resolved in Kieker
[1] E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Object-
[2] A. Koenig. Patterns and antipatterns. In The Patterns Handbooks. Cambridge University Press, 1998. [3] C. U. Smith and L. G. Williams. More new software performance antipatterns: Even more ways to shoot yourself in the foot. In Proc. of the Int. CMG Conference, 2003. [4] A. van Hoorn, J. Waller, and W. Hasselbring. Kieker: A Framework for Application Performance Monitoring and Dynamic Software Analysis. In Proc. of the ICPE, 2012. [5] J. Waller, F. Fittkau, and W. Hasselbring. Application performance monitoring: Trade-off between
[6] M. Wooldridge and N. R. Jennings. Pitfalls of Agent-oriented Development. In Proc. of the AGENTS, 1998.
Christian Wulf and Wilhelm Hasselbring ― 06.11.2015 12