You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Matt Pavlovich (Jira)" <ji...@apache.org> on 2022/10/08 16:10:00 UTC

[jira] [Commented] (AMQ-8414) Support KahaDB stats to be nanoseconds

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

Matt Pavlovich commented on AMQ-8414:
-------------------------------------

Sample current data (pre-5.18.x)
{noformat}
{
  "slowReadTime": {
    "maxTime": 0,
    "averageTime": 0.0,
    "minTime": 0,
    "totalTime": 0,
    "count": 0,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "writeTime": {
    "maxTime": 1,
    "averageTime": 0.3333333333333333,
    "minTime": 0,
    "totalTime": 1,
    "count": 3,
    "averagePerSecond": 3000.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "slowWriteTime": {
    "maxTime": 0,
    "averageTime": 0.0,
    "minTime": 0,
    "totalTime": 0,
    "count": 0,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "slowCleanupTime": {
    "maxTime": 0,
    "averageTime": 0.0,
    "minTime": 0,
    "totalTime": 0,
    "count": 0,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "readTime": {
    "maxTime": 0,
    "averageTime": 0.0,
    "minTime": 0,
    "totalTime": 0,
    "count": 2,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  }
}
{noformat}

For 5.18.x
{noformat}
{
  "slowReadTime": {
    "maxTimeNS": 0,
    "averageTimeNS": 0.0,
    "minTimeNS": 0,
    "totalTimeNS": 0,
    "count": 0,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "writeTime": {
    "maxTimeNS": 1,
    "averageTimeNS": 0.3333333333333333,
    "minTimeNS": 0,
    "totalTimeNS": 1,
    "count": 3,
    "averagePerSecond": 3000.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "slowWriteTime": {
    "maxTimeNS": 0,
    "averageTimeNS": 0.0,
    "minTimeNS": 0,
    "totalTimeNS": 0,
    "count": 0,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "slowCleanupTime": {
    "maxTimeNS": 0,
    "averageTimeNS": 0.0,
    "minTimeNS": 0,
    "totalTimeNS": 0,
    "count": 0,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  },
  "readTime": {
    "maxTimeNS": 0,
    "averageTimeNS": 0.0,
    "minTimeNS": 0,
    "totalTimeNS": 0,
    "count": 2,
    "averagePerSecond": 0.0,
    "averagePerSecondExMinMax": 0.0,
    "averageTimeExMinMax": 0.0
  }
}
{noformat}

> Support KahaDB stats to be nanoseconds
> --------------------------------------
>
>                 Key: AMQ-8414
>                 URL: https://issues.apache.org/jira/browse/AMQ-8414
>             Project: ActiveMQ
>          Issue Type: Improvement
>            Reporter: Matt Pavlovich
>            Assignee: Matt Pavlovich
>            Priority: Major
>             Fix For: 5.18.0
>
>
> Modern disks are fast, and measuring time in millis is not fine grained enough to get correct averages when there are a few blips in performance.
> Also, totals get aggregated and the total time exceeds the uptime too quickly to be correct.
> Current:
> TimeStatisticImpl
> {noformat}
> System.currentTimeMillis() - start
> {noformat}
> Proposed:
> NanoTimeStatisticsImpl extends TimeStatisticImpl
> {noformat}
> System.nanoTime() / 1000 - start
> {noformat}
> kahaDB config flag "statisticsUnit="nanos | millis" (default: millis)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)