X-Spam-Check-By: sourceware.org Message-ID: <44D14D27.10809@cygwin.com> Date: Wed, 02 Aug 2006 21:11:03 -0400 From: "Larry Hall (Cygwin)" Reply-To: cygwin AT cygwin DOT com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20060112 Fedora/1.5-1.fc4.remi Thunderbird/1.5 Mnenhy/0.7.4.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: NTFS fragmentation References: <004401c6b688$a2ffd300$020aa8c0 AT DFW5RB41> <200608021946 DOT 07978 DOT vdergachev AT rcgardis DOT com> In-Reply-To: <200608021946.07978.vdergachev@rcgardis.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Vladimir Dergachev wrote: > Hi Gary and Larry, > > Thank you for your comments, replies below: > > On Wednesday 02 August 2006 7:08 pm, you wrote: >>> Any suggestions and comments would be greatly >>> appreciated. >>> Please CC me - I am not on the list. >>> >>> thank you very much >>> >>> Vladimir Dergachev >> I'll try your test case when I get a chance, but my WAG is that you're >> seeing the effects of Cygwin's creation of sparse files by default for any >> file beyond a certain size. I unfortunately do not recall what that size >> is. What happens as you change FILE_SIZE and/or BUFFER_SIZE in your >> script, to maybe a small multiple of your cluster size? > > I tried buffer_size of 10K, 100K, 1M and 10M - no big difference, except a > small decrease in number of fragments for 10M value - could be noise.. > > I also tried a smaller file size - 3M, the number of fragments decreased to > 33, roughly proportionally to size. > > Unfortunately, I do not know what cluster size is. > > With regard to sparse files the intent here is to open a file, write data to > it and the close. No seeks involved, much less void regions. I do understand > that internally cygwin could do something different. > > I have not found a utility to identify a sparse file yet - if you happen to > have a link I would greatly appreciate it. > > Also, I tried the following experiment - found a 17 MB file in ibiblio.org and > downloaded it with FireFox. The file ended up fragmented into more than 200 > pieces. Tried the same file with IE - no fragmentation. > > It could be, of course, that Firefox is compiled with cygwin, but I have not > found cygwin.dll anywhere in its installation directory. If you pulled it from Mozilla.org, it ain't Cygwin-based. That would point to a more general, non-Cygwin problem. > PS I'll try writing a C program when time permits - any suggestions on what > API besides regular open/write/close to use ? I would recommend making a POSIX API version and a straight Win32 version. But if what you said about Firefox is true, you should see a similar problem even using MinGW (www.mingw.org) or the '-mno-cygwin'. Again, that would point to this being a non-Cygwin problem, though still quite an annoying one. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/