Hi,

the streaming is mainly used for large files, ie. binary downloads which 
range from some MB to 4GB, averaging on 10-30MB. I don't think having 
some kibs will hurt, without the streaming we used to store the whole 
file to memory before sending it out..

Thank you for the input!

Ville

------ Original Message ------
From: "Michael Blakeley" <[email protected]>
To: "MarkLogic Developer Discussion" <[email protected]>
Sent: 5.12.2014 19:39:49
Subject: Re: [MarkLogic Dev General] Optimal buffer size when streaming 
out files

>4096 is pretty small as buffers go, but it's a decent size and it 
>matches up well with some OS and filesystem structures.
>
>Larger buffers will only help if your documents tend to be larger than 
>4-kiB, and if nothing else gets in the way. For maximum effect you'll 
>also want to tune the client OS TCP/IP receive buffer size and the 
>server OS TCP/IP send buffer size to match. If you want to experiment, 
>I wouldn't go higher than 256-kiB. Remember that whatever size you set 
>will be multiplied by concurrency, and could hurt performance if it 
>puts the VM under memory pressure.
>
>-- Mike
>
>>  On 5 Dec 2014, at 07:53 , [email protected] wrote:
>>
>>  Hi,
>>
>>  We use the java client (xcc) and stream out large files. I was 
>>wondering if there is certain buffer size we should be using for 
>>optimal performance, or does it even matter? Currently we take the 
>>stream straight out of ResultItem and use 
>>org.apache.commons.io.IOUtils.copy(InputStream, OutputStream) to do 
>>the heavy lifting. It seems that it uses DEFAULT_BUFFER_SIZE = 1024 * 
>>4.
>>
>>  Do you have any suggestions or insight to this matter?
>>
>>  Ville
>>  _______________________________________________
>>  General mailing list
>>  [email protected]
>>  http://developer.marklogic.com/mailman/listinfo/general
>
>_______________________________________________
>General mailing list
>[email protected]
>http://developer.marklogic.com/mailman/listinfo/general

_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to