Click here to Skip to main content
15,915,336 members
Home / Discussions / C#
   

C#

 
AnswerRe: MDI Background image. Pin
Ed.Poore15-May-08 12:48
Ed.Poore15-May-08 12:48 
QuestionFile copy buffer size? Pin
MicealG15-May-08 6:15
MicealG15-May-08 6:15 
AnswerRe: File copy buffer size? Pin
led mike15-May-08 6:23
led mike15-May-08 6:23 
GeneralRe: File copy buffer size? Pin
MicealG15-May-08 6:31
MicealG15-May-08 6:31 
GeneralRe: File copy buffer size? Pin
led mike15-May-08 6:51
led mike15-May-08 6:51 
AnswerRe: File copy buffer size? Pin
Guffa15-May-08 7:41
Guffa15-May-08 7:41 
GeneralRe: File copy buffer size? Pin
led mike15-May-08 9:15
led mike15-May-08 9:15 
AnswerRe: File copy buffer size? Pin
The Nightcoder15-May-08 11:44
The Nightcoder15-May-08 11:44 
What the others have said is true - it depends on many things.

However - even though an optimal buffer size can only be determined by implementing a complex (and thus error-prone - just look at Vista) self-tuning algorithm of some kind, I guess you're just asking for an arbitrary but "reasonable" value. Correct?

I've used 64K (65536) bytes for the last five years or so. Equals the maximum stripe size of popular RAID controllers, the maximum block size of popular tape devices and the default maximum window size of the Windows TCP stack (pre-RSS).

The world is changing, though, so I'm considering reconsidering that. Whenever I have a budget allowing finer points, I make buffer sizes configurable (still with a 64K default, though).

On occasion I've experimented with 256K or 512K and it seems to work OK as well. Being old enough to remember computers with less RAM than that, it always gives me an eerie feeling - but given the RAM in computers of today, 512KB is really not a lot of memory to set aside for a buffer.

In any case: Like someone said, powers of two still feel like the right thing to use. Actually moot when it comes to network traffic (TCP couldn't care less), but disks still stick to that for block sizes, allocation units and stripe sizes.

Later,

--
Peter

GeneralRe: File copy buffer size? Pin
Guffa15-May-08 13:01
Guffa15-May-08 13:01 
GeneralRe: File copy buffer size? Pin
The Nightcoder16-May-08 12:10
The Nightcoder16-May-08 12:10 
GeneralRe: File copy buffer size? Pin
MicealG15-May-08 23:14
MicealG15-May-08 23:14 
QuestionStoring data in an array Pin
Brad Wick15-May-08 6:03
Brad Wick15-May-08 6:03 
AnswerRe: Storing data in an array Pin
led mike15-May-08 6:19
led mike15-May-08 6:19 
GeneralRe: Storing data in an array Pin
Brad Wick15-May-08 6:45
Brad Wick15-May-08 6:45 
GeneralRe: Storing data in an array Pin
led mike15-May-08 6:51
led mike15-May-08 6:51 
AnswerRe: Storing data in an array Pin
Bert delaVega15-May-08 6:47
Bert delaVega15-May-08 6:47 
GeneralRe: Storing data in an array Pin
Brad Wick15-May-08 7:11
Brad Wick15-May-08 7:11 
GeneralRe: Storing data in an array Pin
Bert delaVega15-May-08 7:28
Bert delaVega15-May-08 7:28 
AnswerRe: Storing data in an array Pin
DaveyM6916-May-08 2:36
professionalDaveyM6916-May-08 2:36 
QuestionArray.resize Pin
C++NewBe15-May-08 5:55
C++NewBe15-May-08 5:55 
AnswerRe: Array.resize Pin
led mike15-May-08 6:13
led mike15-May-08 6:13 
GeneralRe: Array.resize Pin
Dave Doknjas15-May-08 15:30
Dave Doknjas15-May-08 15:30 
GeneralRe: Array.resize Pin
led mike16-May-08 5:15
led mike16-May-08 5:15 
AnswerRe: Array.resize Pin
#realJSOP15-May-08 6:30
professional#realJSOP15-May-08 6:30 
QuestionInstance Failure Error Pin
Banjo Ayorinde15-May-08 5:22
Banjo Ayorinde15-May-08 5:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.