🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7948

Re: Missing data from network writes (Win2K client and server)

#7948
From: Andrue Cope [TeamB]
Date: Thu, 09 Dec 2004 10:38
39 lines
2647 bytes
Use of FILE_WRITE_THROUGH does so far seem to be the answer.
Unfortunately it has a major impact on throughput. We have a source
device that returns generated data so can eliminate some overhead by
using that.

In our tests we are creating a 488MB file using that source device.

Without FILE_WRITE_THROUGH it takes between two and three minutes (ten
runs tried) but produces slightly truncated (between .5MB and 1.5MB)
output approx. two thirds of the time.

With FILE_WRITE_THROUGH we get no truncation but it takes around 11
minutes to produce the output.

With today's disk drives imaging already averages an hour per disk so
applying this fix is going to seriously impact our labs (and our
customers). It strongly suggests that we shouldn't use this flag unless
we really have to.

My next step is to find some way to detect file truncation. Then we can
at least provide a warning and suggest use of this option.

As for FlushFileBuffers() - well that just further confuses the issue.
Calling it adds a noticeable delay (a second or so) to file closure
/but doesn't prevent truncation/. I think that all FlushFileBuffers()
is doing is flushing out data that would have been written anyway. The
missing data is just being lost. Since we can read it back after
writing it it must be arriving at the cache but then...?

..and then we have the mystery of the code I posted yesterday. It is
only example code and the SetFilePointer() was just used in an attempt
to replicate our actualy I/O patterns but...it hardly ever truncates.
Last night I left it to generate a 300GB file and it generated it
successfully.

-- 
Andrue Cope [TeamB]
[Bicester, Uk]
http://info.borland.com/newsgroups/guide.html
Technical Details
Message-ID: <41b82b4f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <41b6de1f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,99122155c7605386
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Andrue Cope [TeamB]" <no.spam@not.a.valid.address>
Subject: Re: Missing data from network writes (Win2K client and server)
Newsgroups: borland.public.cppbuilder.nativeapi
References: <41b6de1f$1@newsgroups.borland.com>
Date: Thu, 9 Dec 2004 10:38:52 +0000
User-Agent: XanaNews/1.16.5.2
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: 217.207.223.34
Message-ID: <41b82b4f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1102588751 217.207.223.34 (9 Dec 2004 02:39:11 -0800)
Lines: 39
X-Authenticated-User: acope
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail