View Single Post
  #6 (permalink)  
Old March 19th, 2008
GregorK GregorK is offline
Phex Developer
 
Join Date: May 8th, 2001
Location: Stuttgart, Germany
Posts: 988
GregorK is flying high
Default

Increasing to a crazy high value will not necessarily give better performance, unless your system is able to deal with a few Gigs requested memory...
Buffers are used on multiple layers. It wont help much to increase buffers on one layer when they are still small on other layers. This also means that buffer will use a multiple of the configured size. If you set all buffers to 500MB your system could likely request 4GB memory.
Also its not always that much helps much... Larger buffers cause larger parts of data transfered into the memory. If your system cant handle this it could be slower then smaller data chunks. If the file is not too large and you set all buffers large enough and your system is able to handle the load, Phex could transfer the whole file into the memory before sending it on the net and on the other side download the complete file into memory before writing it to disk, but thats very theoretical.

Here are a few buffers and other indicators that I found, that will have influence. There might be some more hidden somewhere....

DownloadPrefs.MaxTotalDownloadWriteBuffer
DownloadPrefs.MaxWriteBufferPerDownload
BufferSize._16K
BufferSize._64K
HttpFileDownload.BUFFER_LENGTH
BandwidthPrefs.MaxTotalBandwidth
BandwidthPrefs.MaxDownloadBandwidth
BandwidthPrefs.MaxUploadBandwidth
FileUtils.BUFFER_LENGTH
GnutellaInputStream.READ_BUFFER_LENGTH
DownloadPrefs.SegmentTransferTargetTime
DownloadPrefs.SegmentMultiple
DownloadPrefs.SegmentMaximumSize
DownloadPrefs.SegmentInitialSize
__________________
Reply With Quote