Jump to: navigation, search

EclipseLink/DesignDocs/321763

< EclipseLink‎ | DesignDocs
Revision as of 13:34, 5 August 2010 by James.sutherland.oracle.com (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Design Specification: Performance Monitor

ER 321763

Feedback

Document History

Date Author Version Description & Notes
2010-08-05 James 0.1 Draft

Project overview

We currently have two profilers, the PerformanceProfiler and the QueryMonitor. The PerformanceProfiler provides detailed information, but is not very useful in a server environment. The QueryMonitor is useful in a server environment, but does not provide detailed information. EclipseLink already contains an extensive profiling and monitoring API that was previously developed under TopLink for Oracle DMS, but does not provide a profiler implementation that makes use of these APIs.

The PerformanceMonitor's goal is to somewhat unify the PerformanceProfiler and QueryMonitor to provide detailed profiling and monitoring information in a mutli-threaded server environment.

Concepts

Profiling is mainly concerned with timing information (time spent in cache, querying), monitoring is mainly concerned with state information (cache size, number of transactions).

Requirements

  • Make use of the existing SessionProfiler API that was designed for DMS.
  • Support multi-threading.
  • Support a server environment.
  • Be configurable without any Java code.

Design Constraints

Functionality

Example Output

Performance Monitor:1279113281664
Operation	Value (ns)
Counter:CacheHits	1,375,664
Counter:CacheMisses	327
Counter:ClientSessionCreates	1,204,817
Counter:ConnectCalls	2
Counter:DataModifyQuery	48
Counter:DataModifyQuery:inventory	21
Counter:DataModifyQuery:order	27
Counter:DeleteObjectQuery	67,792
Counter:DeleteObjectQuery:Customer	1
...
Counter:ReadAllQuery	1,041,767.
Counter:ReadAllQuery:Item.findByCategory	733,827
Counter:ReadAllQuery:Item.findByCategory:CacheHits	733,779
Counter:ReadAllQuery:Item.findByCategory:CacheMisses	50
...
Counter:ReadObjectQuery	1,058,273
Counter:ReadObjectQuery:Item:item	130,063
Counter:ReadObjectQuery:Item:item:CacheHits	130,063
Counter:ReadObjectQuery:Item:item:CacheMisses	1
Counter:UnitOfWorkCommits	72,568
Counter:UnitOfWorkCreates	471,491
Counter:UnitOfWorkRollbacks	1
Counter:UpdateObjectQuery	71,498
Counter:UpdateObjectQuery:Customer	62,531
...
Info:LoginTime	Wed Jul 14 08:55:41 EDT 2010
Info:SessionName	file:/scratch/user_domains/servers/mt-1/app.jar
Timer:Caching	6,411,372,000
Timer:ConnectionManagement	17,225,641,000
Timer:DeleteObjectQuery	41,351,430,000
Timer:DeleteObjectQuery:Customer	4,441,000
Timer:DeleteObjectQuery:Customer:QueryPreparation	86,000
Timer:DeleteObjectQuery:Customer:SqlGeneration	28,000
Timer:DeleteObjectQuery:Customer:SqlPrepare	72,000
Timer:DeleteObjectQuery:Customer:StatementExecute	2,265,000
...
Timer:InsertObjectQuery	69,111,086,000
Timer:Logging	4,236,000
Timer:Merge	1,144,400,000
Timer:ObjectBuilding	31,914,397,000
Timer:QueryPreparation	984,396,000
Timer:ReadAllQuery	260,943,930,000
Timer:ReadAllQuery:Item:Item.findByCategory	14,790,333,000
Timer:ReadAllQuery:Item:Item.findByCategory:ObjectBuilding	250,959,000
Timer:ReadAllQuery:Item:Item.findByCategory:QueryPreparation	1,880,000
Timer:ReadAllQuery:Item:Item.findByCategory:RowFetch	113,552,000
Timer:ReadAllQuery:Item:Item.findByCategory:SqlGeneration	522,000
Timer:ReadAllQuery:Item:Item.findByCategory:SqlPrepare	2,055,000
Timer:ReadAllQuery:Item:Item.findByCategory:StatementExecute	107,382,000
...
Timer:Register	3,272,443,000
Timer:RowFetch	25,340,990,000
Timer:Sequencing	1,352,326,000
Timer:SqlGeneration	6,646,000
Timer:SqlPrepare	19,536,031,000
Timer:StatementExecute	508,589,220,000
Timer:TXAfterCompletion	1,854,152,000
Timer:TXBeforeCompletion	169,381,843,000
Timer:UnitOfWorkCommit	167,483,825,000
Timer:UpdateObjectQuery	46,440,589,000
Timer:UpdateObjectQuery:Customer	40,466,433,000
Timer:UpdateObjectQuery:Customer:QueryPreparation	867,496,000
Timer:UpdateObjectQuery:Customer:SqlGeneration	98,000
Timer:UpdateObjectQuery:Customer:SqlPrepare	1,319,333,000
Timer:UpdateObjectQuery:Customer:StatementExecute	32,901,366,000

Testing

Output of profiler should be analyzed under SRG test run, performance tests, and in JEE performance benchmark runs.

API

  • ProfilerType - PerformanceMonitor
  • PerformanceMonitor
    • getOperationTimings()
    • setDumpTime(int)

Config files

  • persistence.xml
    • <property name="eclipselink.profiler" value="PerformanceMonitor"/>

Documentation

Should be documented under performance section of JPA user guide.

Open Issues

Issue # Owner Description / Notes
1 Are there additional metrics to profile?

Decisions

Issue # Description / Notes Decision

Future Considerations

  • Additional metrics.
  • JMX support.