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 Fri, 05 Jan 2018 21:10:00 GMT

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

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_r159980786
  
    --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ServerPacketDecoder.java
---
    @@ -83,16 +85,34 @@
     
     public class ServerPacketDecoder extends ClientPacketDecoder {
     
    +   private static final int UUID_LENGTH = 36;
    +   private static final int DEFAULT_INTERNER_CAPACITY = 32;
        private static final long serialVersionUID = 3348673114388400766L;
    -   public static final ServerPacketDecoder INSTANCE = new ServerPacketDecoder();
    +   private SimpleString.Interner keysInterner;
    +   private TypedProperties.StringValue.Interner valuesInterner;
     
    -   private static SessionSendMessage decodeSessionSendMessage(final ActiveMQBuffer in,
CoreRemotingConnection connection) {
    +   public ServerPacketDecoder() {
    +      this.keysInterner = null;
    +      this.valuesInterner = null;
    +   }
    +
    +   private void initializeInternersIfNeeded() {
    --- End diff --
    
    one interner per session :O ouch - an interner ideally should be shared within JVM so
benefits can be reaped anywhere.


> 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