[
https://issues.apache.org/jira/browse/OAK-3819?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15082745#comment-15082745
]
Michael Dürig commented on OAK-3819:
------------------------------------
Looks useful. Some notes re. the patch:
* {{FileStoreStats#getSize}} calls {{FileStore#size}}. The latter is very prone
to contention and shouldn't be called too often. Since the former is exposed
via {{FileStoreStatsMBean}} we can't control this however. I experienced this
issue when experimenting with {{SegmentCompactionIT}}, which also monitors the
store size. Now I'm using a scheduler to sample the store size in 1 minute
intervals (see {{SegmentCompactionIT#scheduleSizeMonitor}}).
For the same reason [~frm] came up with {{FileStore#approximateSize}}, which
your patch seems to upgrade to return the exact size. So why not return
{{FileStore#approximateSize}} from {{FileStore#size}} and rename the field
accordingly?
* {{FileStoreStats#addWrites}} is called from {{FileStore}}. However the amount
of data written is rather a concern of {{TarWriter}} and the method should be
called from there. This offset twiddling in {{FileStore#newWriter}} is actually
a symptom of this.
* I don't like the extra call to {{FileStoreStats#reclaimed}} in
{{FileStore#cleanup}}. {{GCMonitor}} already provides means for tracking the GC
progress.
> Collect and expose statistics related to Segment FileStore operations
> ---------------------------------------------------------------------
>
> Key: OAK-3819
> URL: https://issues.apache.org/jira/browse/OAK-3819
> Project: Jackrabbit Oak
> Issue Type: New Feature
> Components: segmentmk
> Reporter: Chetan Mehrotra
> Assignee: Chetan Mehrotra
> Fix For: 1.4
>
> Attachments: OAK-3819-v1.patch, segment-writes.png
>
>
> It would be useful to collect some more stats around FileStore operations in
> SegmentMK
> * Writes per second - How many bytes are being written measured per second
> * Repository size time series - There is a time series in {{GCMonitorMBean}}
> but that looks like get updated upon GC and hence bit stale
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)