[
https://issues.apache.org/jira/browse/OAK-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15024140#comment-15024140
]
Chetan Mehrotra commented on OAK-3654:
--------------------------------------
Updated the ReadPropertyTest benchmark to provide an option to enable Metric
with 1716093
To run the benchmark with metrics enabled
{code}
java -DenableMetrics=true -jar target/oak-run-1.4-SNAPSHOT.jar benchmark
ReadPropertyTest Oak-Tar
{code}
Following are the numbers obtained
{noformat}
Apache Jackrabbit Oak 1.4-SNAPSHOT
# ReadPropertyTest C min 10% 50% 90% max
N
Oak-Tar 1 6 6 6 7 24
9352
Oak-Tar (1.3.11 1 6 6 6 9 35
8576
Oak-Tar (Metrics Enabled) 1 12 12 12 14 30
4711
{noformat}
Below is the out if metric reporting is dumped
{noformat}
Apache Jackrabbit Oak 1.4-SNAPSHOT
# ReadPropertyTest C min 10% 50% 90% max
N
15:05:04.992 [main] INFO o.a.j.oak.benchmark.ReadPropertyTest - Enabling
Metrics integration
15:05:35.032 [metrics-logger-reporter-1-thread-1] INFO
org.apache.jackrabbit.oak.metrics - type=TIMER, name=SESSION_READ_DURATION,
count=65817698, min=0.0, max=0.0, mean=0.0, stddev=0.0, median=0.0, p75=0.0,
p95=0.0, p98=0.0, p99=0.0, p999=0.0, mean_rate=2193281.816329949,
m1=1621957.129874465, m5=1319427.8912859685, m15=1258460.072356088,
rate_unit=events/second, duration_unit=microseconds
15:06:05.032 [metrics-logger-reporter-1-thread-1] INFO
org.apache.jackrabbit.oak.metrics - type=TIMER, name=SESSION_READ_DURATION,
count=136121718, min=0.0, max=0.0, mean=0.0, stddev=0.0, median=0.0, p75=0.0,
p95=0.0, p98=0.0, p99=0.0, p999=0.0, mean_rate=2268390.1680024294,
m1=1905076.5362424387, m5=1416843.4225004297, m15=1294027.7491764775,
rate_unit=events/second, duration_unit=microseconds
Oak-Tar 1 12 12 12 14 30
4711
{noformat}
So it does appear that using metrics in the critical path of read and write
adds quite a bit of overhead and possibly for that case we should avoid that.
Taking a step back I am now not sure about what to make out of these two
metrics SESSION_READ_DURATION and SESSION_WRITE_DURATION. May be we invoke the
metric in sampling form say every 'N' operation.
/cc [~ianeboston]
> Integrate with Metrics for various stats collection
> ----------------------------------------------------
>
> Key: OAK-3654
> URL: https://issues.apache.org/jira/browse/OAK-3654
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: core
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Fix For: 1.4
>
> Attachments: OAK-3654-v1.patch, query-stats.png
>
>
> As suggested by [~ianeboston] in OAK-3478 current approach of collecting
> TimeSeries data is not easily consumable by other monitoring systems. Also
> just extracting the last moment data and exposing it in simple form would not
> be useful.
> Instead of that we should look into using Metrics library [1] for collecting
> metrics. To avoid having dependency on Metrics API all over in Oak we can
> come up with minimal interfaces which can be used in Oak and then provide an
> implementation backed by Metric.
> This task is meant to explore that aspect and come up with proposed changes
> to see if its feasible to make this change
> * metrics-core ~100KB in size with no dependency
> * ASL Licensee
> [1] http://metrics.dropwizard.io
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)