<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:52:27 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[YANGTOOLS-165] OFplugin has a strong-referenced unbounded cache</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-165</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Durting performance testing we have found that OF plugin keeps a strong-referenced cache, which is only boiund by time and dominated by strong references.&lt;/p&gt;

&lt;p&gt;This means that as throughput goes up, so will the memory pressure.&lt;/p&gt;

&lt;p&gt;Make the depth of the cache configurable and make it use softvalues, so that it a) has an upper bound on memory retained irrespective of throughput 2) reacts to memory pressure by sacrificing this information instead of running out of memory.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: Linux&lt;br/&gt;
Platform: PC&lt;/p&gt;</environment>
        <key id="22585">YANGTOOLS-165</key>
            <summary>OFplugin has a strong-referenced unbounded cache</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="10004" iconUrl="https://jira.opendaylight.org/images/icons/status_generic.gif" description="">Verified</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10000">Done</resolution>
                                        <assignee username="michal.rehak">Michal Rehak</assignee>
                                    <reporter username="rovarga">Robert Varga</reporter>
                        <labels>
                    </labels>
                <created>Wed, 14 May 2014 17:21:22 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:06 +0000</updated>
                            <resolved>Fri, 16 May 2014 15:52:19 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="42752" author="rovarga" created="Wed, 14 May 2014 19:01:56 +0000"  >&lt;p&gt;So the cache is used to support a &apos;replay&apos; history thing. A cache is the wrong data structure to support this use case, as its performance decreases with elements retained. The time-based eviction policy incurs heavy penalty when retention time is exceeded.&lt;/p&gt;

&lt;p&gt;What you really want is a fixed-depth ArrayBlockingQueue. Make the depth configurable. Then to store a new packet do:&lt;/p&gt;

&lt;p&gt;ArrayBlockingQueue q;&lt;br/&gt;
Object msg;&lt;/p&gt;

&lt;p&gt;if (!q.offer(msg)) {&lt;br/&gt;
    q.poll();&lt;br/&gt;
    q.offer(msg);&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;which will give you a guaranteed replay buffer, with excellent O(1) performance. Given the high number of switches we want to support I would suggest to wrap the message in a SoftReference so we automatically throw debug data out before runnig out of memory.&lt;/p&gt;

&lt;p&gt;Note that the ArrayBlockingQueue uses a preallocated backing array, so be careful to use reasonable numbers.&lt;/p&gt;</comment>
                            <comment id="42753" author="rovarga" created="Wed, 14 May 2014 19:11:41 +0000"  >&lt;p&gt;If you need time-based eviction, you can wrap the message into:&lt;/p&gt;

&lt;p&gt;class MessageTime {&lt;br/&gt;
    Object msg;&lt;br/&gt;
    long time = System.nanoTime();&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;before inserting into the queue. Then have a background thread run the following periodically:&lt;/p&gt;

&lt;p&gt;long cutoff = System.nanoTime() - RETENTION_TIME;&lt;br/&gt;
while (true) {   // Not really, place an upper bound on items processed!&lt;br/&gt;
     MessageTime m = q.peek();&lt;br/&gt;
     if (m == null || m.time &amp;gt;= cutoff) &lt;/p&gt;
{
         break;
     }
&lt;p&gt;     q.remove(m); // Because an enqueue thread may have removed it already&lt;br/&gt;
}&lt;/p&gt;</comment>
                            <comment id="42754" author="mirehak@cisco.com" created="Thu, 15 May 2014 06:29:37 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/6994/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/6994/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="42755" author="mirehak@cisco.com" created="Thu, 15 May 2014 16:02:17 +0000"  >&lt;p&gt;removing bulk transaction cache&lt;br/&gt;
&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/7024/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/7024/&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="42756" author="mirehak@cisco.com" created="Fri, 16 May 2014 15:52:19 +0000"  >&lt;p&gt;cbench is showing speed improvements (up to 5%), memory consumption is lower (200MB)&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1006</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=1006]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i025jj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>