You are viewing a plain text version of this content. The canonical link for it is here.
Posted to proton@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2015/04/22 12:14:58 UTC

[jira] [Created] (PROTON-857) reduce memory usage for the TransportSession link handle tracking

Robbie Gemmell created PROTON-857:
-------------------------------------

             Summary: reduce memory usage for the TransportSession link handle tracking
                 Key: PROTON-857
                 URL: https://issues.apache.org/jira/browse/PROTON-857
             Project: Qpid Proton
          Issue Type: Improvement
          Components: proton-j
    Affects Versions: 0.10
            Reporter: Robbie Gemmell
            Assignee: Robbie Gemmell
             Fix For: 0.10


The TransportSession class currently maintains two 'maps' of [local|remote] handle->TransportLink using arrays of size handle-max + 1 (since we start from 0 when using handles, just like array indexes). The handle-max value used to be 1024 in proton-j but was recently changed to be 65536 in PROTON-844, allowing us to track 65537 handles. This change exposes the transports already somewhat inefficient storage of handles by requiring ~64x as much memory per open session, which in most cases wont use the extra capacity and indeed may often only need to use a single handle at a time (or worse, none, if a session isnt actually used for some weird reason).

The handle tracking should be updated to use a HashMap, in similar fashion to how the session channel numbers are tracked by the transport.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)