jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [jclouds] dordoriko opened a new pull request #26: JCLOUDS-847: Poor upload performance for putBlob
Date Wed, 24 Apr 2019 17:28:51 GMT
dordoriko opened a new pull request #26: JCLOUDS-847: Poor upload performance for putBlob
URL: https://github.com/apache/jclouds/pull/26
 
 
   This change improves the performance of writing to sockets with the
   default Java URL connection HTTP client, by enlarging the buffer used
   for socket writes from an implicit hard-coded 4KB / 8KB buffer to a
   configurable 32KB buffer.
   
   The buffer size is now controlled by the following property with the
   following default value:
   
   jclouds.output-socket-buffer-size: 32768
   
   The implementation is based on a variant of ByteStreams.copy (written as
   ByteStreams2.copy) which accepts the buffer size as an argument, unlike
   the original Guava code that uses a hard-coded size.
   
   The change was done directly within the loop that copies the input
   stream to the output stream, and not by wrapping a BufferedOutputStream
   around the existing output stream, in order to avoid copying the payload
   twice.
   
   On some platforms this change can improve both the putBlob throughput
   and the total CPU consumption.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message