[JBoss JIRA] (JGRP-1637) Counters overflow
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1637?page=com.atlassian.jira.plugin.... ]
Bela Ban deleted JGRP-1637:
---------------------------
> Counters overflow
> -----------------
>
> Key: JGRP-1637
> URL: https://issues.jboss.org/browse/JGRP-1637
> Project: JGroups
> Issue Type: Task
> Reporter: Bela Ban
> Assignee: Bela Ban
> Priority: Minor
>
> We have some counters which might see a lot of increments. Investigate which counters are affected (and how) by a potential wraparound, e.g. longs wrap around at 2^63 and go negative.
> For example, storing delivery times in nanoseconds and totalling that number could end up with an overflow as e.g. 2ms = 2000000ns, for 1 million msgs/sec would overflow in roughly 7 weeks ! That's the reason org.jgroups.util.Average was created: instead of totalling delivery time and the number of deliveries to compute avg delivery time, we only maintain a fixed array of delivery times, and its elements are randomly overwritten with new values, so we only keep the (more or less) most recent N values to compute the average.
> Using a long for a message sequence number should not be an issue: even if we send 1 million messages / sec, we could send for roughly 290'000 years !
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months
[JBoss JIRA] (JGRP-1647) Use of Average for stats
by Bela Ban (JIRA)
Bela Ban created JGRP-1647:
------------------------------
Summary: Use of Average for stats
Key: JGRP-1647
URL: https://issues.jboss.org/browse/JGRP-1647
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Priority: Minor
Fix For: 3.4
Use Average to maintain average values instead of maintaining separate counters (e.g.) for number of values and totals. Average is faster and total can wrap around.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
10 years, 10 months