activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1586) Reduce GC pressure due to String allocations on Core protocol
Date Sat, 06 Jan 2018 00:44:00 GMT

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

ASF GitHub Bot commented on ARTEMIS-1586:
-----------------------------------------

Github user michaelandrepearce commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1752#discussion_r160009754
  
    --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/CoreMessage.java
---
    @@ -528,8 +543,17 @@ public void decodeHeadersAndProperties(final ByteBuf buffer) {
        private void decodeHeadersAndProperties(final ByteBuf buffer, boolean lazyProperties)
{
           messageIDPosition = buffer.readerIndex();
           messageID = buffer.readLong();
    -
    -      address = SimpleString.readNullableSimpleString(buffer);
    +      int b = buffer.readByte();
    +      if (b != DataConstants.NULL) {
    +         final int length = buffer.readInt();
    +         if (keysInterner != null) {
    +            address = keysInterner.intern(buffer, length);
    --- End diff --
    
    If you are having separate pools of last seen SimpleStrings instead of global interning
for typed properties keys and values, you should probably pool address's separate from those.
Imagine the pool is size 32 default, very quickly be used up and find typedproperty keys are
invalidating address's in that last seen pool


> Reduce GC pressure due to String allocations on Core protocol
> -------------------------------------------------------------
>
>                 Key: ARTEMIS-1586
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1586
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>
> The core protocol produce a huge amount of StringValue/SimpleString instances during
CoreMessage decoding of SessionSendMessages.
> Often these instances are the same during the lifetime of a client/server connection:
providing efficient interners would help to reduce the GC pressure, increasing the broker
capacity/scalability.



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

Mime
View raw message