qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lorenz Quack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-7830) Heap dominated by duplicates of common routing values / header values etc
Date Thu, 26 Oct 2017 07:24:00 GMT

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

Lorenz Quack commented on QPID-7830:
------------------------------------

All this sounds awfully complicated.
What is wrong with something simpler like using a static class in broker-core {{StringCache}}
that uses a [guava cache|https://github.com/google/guava/wiki/CachesExplained] with a [size
limit|https://github.com/google/guava/wiki/CachesExplained#size-based-eviction] and [time
based eviction|https://github.com/google/guava/wiki/CachesExplained#timed-eviction]? When
a protocol layer then needs a String which we know might be repetitive (like the cases mentioned
above) it calls {{StringCache#getString()}} and guava takes care of the rest.
This might be a naive approach but I would like to at least discuss why it is not sufficient?

> Heap dominated by duplicates of common routing values / header values etc
> -------------------------------------------------------------------------
>
>                 Key: QPID-7830
>                 URL: https://issues.apache.org/jira/browse/QPID-7830
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>            Reporter: Keith Wall
>             Fix For: Future
>
>
> When used for store and forwarding, in some use cases the Broker's heap can become dominated
by duplicates of common values such as routing information (e.g. {{amq.direct}} or an application's
queue name) or common header values (e.g a application/octet-stream or an application's user
id).
> On the 0-8..0-91 paths, every enqueued message gets its own {{MessagePublishInfo}} referencing
its own {{AMQShortString}} exchange and routing keys.  For some use-cases, these are drawn
from a small set. On the AMQP 1.0 path, {{Properties#to}} is an example.   0-10 is probably
affected too.
> This unnecessarily increases the heap requirements of the Broker.
> The Broker should adopt a sensible intern/caching policy with the same policy applying
regardless of whether messages follow the on-line enqueue or recovery path.  Note that in
AMQP 1.0, values which are {{Symbols}} have their underlying String automatically interned.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message