From: MikkelFJ Date: 2002-11-19T09:48:02+09:00 Subject: Re: Not really a ruby question, but this is a smart group. Win32 file.write timing. "MetalOne" wrote in message news:92c59a2c.0211171917.8e4e118@posting.google.com... > I forgot. > But when I looked at the C++ code, the write buffer was stored on the stack. > Surely that is in physical ram? I was perhaps assuming you were stressing the system more than you are. Physical RAM is btw. only part of the deal. Physical RAM outside the processor cache may also be an issue - although I don't know that much about how the filesystem driver might bypass processor cache using DMA. My general unscientific impression is that Windows NT, NTFS is rather fast at dumping data to a file if the conditions right such as perfectly cached data and no fragmentation problems etc. But then you are concerned with the worst case to which I can only say that I doubt it takes 150ms to write 150K perfectly cached data in a system that is in no way stressed. BTW: NT writes in 64K blocks whether you have modified 1 byte or 64K byte of the block. There may also be issues with flushing. It could be that you are measuring a number of very fast writes and then suddenly find yourself measring the time where flushing happens for much more data than you expect. Mikkel