You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2016/01/14 12:58:40 UTC

[jira] [Comment Edited] (OAK-3791) Time measurements for DocumentStore methods

    [ https://issues.apache.org/jira/browse/OAK-3791?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098019#comment-15098019 ] 

Chetan Mehrotra edited comment on OAK-3791 at 1/14/16 11:58 AM:
----------------------------------------------------------------

[updated patch|^OAK-3791-v2-chetanm.patch] which takes a bit different approach

# Introduced a new {{DocumentStoreStatsCollector}} callback which would be invoked by various DocumentStore impl. This captures the kind of data we want to collect. With this very small change was done in current implementation of DocumentStore and all stats related logic now lives separately. This can be evolved easily
# {{DocumentStoreStats}} implements  {{DocumentStoreStatsCollector}} - Based on data provided in callback various types of stats are computed
# {{DocumentStoreStatsMBean}} exposes the various time series data
# Existing usage of {{PerfLogger}} in {{MongoDocumentStore}} have been replaced and similar logs are now done from {{DocumentStoreStats}} as PerfLogger does not allow passing duration and only accept start time

*Stats Types*
# Finding uncached Nodes - Separately for calls made to primary and secondary. This would allow us to test out various strategies of optimizing reads from secondaries and see how effective they are
# How many Nodes are being read via Query calls
# Calls made by Journal
# Number of uncached find call for split documents - If they are more we should look into caching them better

See [screenshot|^oak-document-stats.png] for various types of stats in a startup of Oak based application

[~mreutegg] Can you review the approach taken. If fine I would commit it and then add similar data collection to RDB side

[~rosu] Approach taken here differs from earlier approach. So would be helpful if you can also take a look


was (Author: chetanm):
[updated patch|OAK-3791-v2-chetanm.patch] which takes a bit different approach

# Introduced a new {{DocumentStoreStatsCollector}} callback which would be invoked by various DocumentStore impl. This captures the kind of data we want to collect. With this very small change was done in current implementation of DocumentStore and all stats related logic now lives separately. This can be evolved easily
# {{DocumentStoreStats}} implements  {{DocumentStoreStatsCollector}} - Based on data provided in callback various types of stats are computed
# {{DocumentStoreStatsMBean}} exposes the various time series data
# Existing usage of {{PerfLogger}} in {{MongoDocumentStore}} have been replaced and similar logs are now done from {{DocumentStoreStats}} as PerfLogger does not allow passing duration and only accept start time

*Stats Types*
# Finding uncached Nodes - Separately for calls made to primary and secondary. This would allow us to test out various strategies of optimizing reads from secondaries and see how effective they are
# How many Nodes are being read via Query calls
# Calls made by Journal
# Number of uncached find call for split documents - If they are more we should look into caching them better

See [screenshot|^oak-document-stats.png] for various types of stats in a startup of Oak based application

[~mreutegg] Can you review the approach taken. If fine I would commit it and then add similar data collection to RDB side

[~rosu] Approach taken here differs from earlier approach. So would be helpful if you can also take a look

> Time measurements for DocumentStore methods
> -------------------------------------------
>
>                 Key: OAK-3791
>                 URL: https://issues.apache.org/jira/browse/OAK-3791
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, documentmk
>            Reporter: Teodor Rosu
>            Assignee: Chetan Mehrotra
>             Fix For: 1.4
>
>         Attachments: OAK-3791-RDB-0.patch, OAK-3791-v1.patch, OAK-3791-v2-chetanm.patch, oak-document-stats.png
>
>
> For monitoring ( in big latency environments ), it would be useful to measure and report time for the DocumentStore methods.
> These could be exposed as (and/or):
> - as Timers generated obtained from StatisticsProvider ( statistics registry )
> - as TimeSeries 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)