Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7802

Use chunked reads/writes in TcpTransport

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      The buffering implementation of TcpTransport.socketInputStream needs to use fixed size input buffer, rather than growing as BufferedInputStream does. Growing buffer can lead to excessive memory consumption on heap, and more importantly, by direct memory allocated in JDK classes and pooled in thread-local caches.

      EDIT: As Tristan pointed out, the BufferedInputStream does not grow in our use case, but if TcpTransport passes a big byte[] buffer, the implementation works as read through/write through. Therefore we need to chunk all calls.

              ttarrant@redhat.com Tristan Tarrant
              rvansa1@redhat.com Radim Vansa (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: