posted 16 years ago
Hi
Please correct me if I am wrong.
When I choose a buffer size, I am considering the following
1- How much physical memory I have. Ask "Is the machine is dedicated only for this operation?"
2- How much Sequential Physical memory I have, because buffer will need sequntial place. "I think buffers never swapped to hard-disk, what is the point of it if it is swapped, and also it always implemented as arrays, so I need a sequential place" , please correct that if needed.
3- What is the max amount of incoming data.
for some cases, I only need 4 KB, and I am sure it will be fine.
if you have a server of 4 GB of ram, there is uploading messages will reach 250 MB(s), what buffer size you choose ? Do you think that a buffer of 256 MB(s) is a good choice?
if we are talking about PC with 1 GB(s) of RAM, I always make the upper limit of the buffer size 2 MB(s), because there is a possibility that another programs are running beside my program. What do you think? Is this a good estimation.
Is there a known way to estimate your buffer size?
Thanks