Optimize statistics cleanup 67/5267/1
authorRobert Varga <rovarga@cisco.com>
Tue, 11 Feb 2014 18:20:25 +0000 (19:20 +0100)
committerRobert Varga <rovarga@cisco.com>
Tue, 11 Feb 2014 19:04:05 +0000 (20:04 +0100)
commit62cb87bfa05b6a62bc24aa82154c4a31335682bd
treecedceae046f9387babf2aff35868b6351e1bacae
parentd7bf42ff973faaa0d1c75324dd1c4cd876205bb5
Optimize statistics cleanup

Perform a single transaction for cleaning up the flow. Also use
System.nanoTime() for keeping the expiry time and keep it constant.

Furthermore, use HashMap instead of ConcurrentHashMap to gain better
memory peformance. This requires synchronizing between the statistics
update and statistics cleanup -- which actually is okay, as it closes
the race between an update happening precisely when a flow entry would
be retired. With the lockless design that entry could be lost, simply
because we'd get undefined ordering between cleanup and update
transaction commit.

Change-Id: Iceaee5b44643075d325f664af774a9c6841bcfc6
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/statistics-manager/src/main/java/org/opendaylight/controller/md/statistics/manager/NodeStatisticsAger.java

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.