This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: performance degradation because of sparse file handling in cygwin
- From: Larry Hall <cygwin-lh at cygwin dot com>
- To: Vinay Kumar <kvinay at denver dot india dot mentorg dot com>, cygwin at cygwin dot com
- Date: Mon, 12 Apr 2004 09:50:49 -0400
- Subject: Re: performance degradation because of sparse file handling in cygwin
- References: <Pine.LNX.4.10.10403081511450.27648-100000@denver.india.mentorg.com>
- Reply-to: Cygwin List <cygwin at cygwin dot com>
At 11:37 AM 4/12/2004, you wrote:
>Hi,
> I have some questions about handling of sparse file in cygwin 1.5.5
>onwards. cygwin makes a file as a sparse if there is a write request
>beyond 128 KB from file end. I am not sure whether it is a heuristic or
>some statistical fact governs the use of 128 KB. Please clarify.
<http://www.google.com/search?as_q=&num=10&hl=en&ie=UTF-8&oe=UTF-8&btnG=Google+Search&as_epq=sparse+file&as_oq=&as_eq=&lr=&as_ft=i&as_filetype=&as_qdr=all&as_nlo=&as_nhi=&as_occt=any&as_dt=i&as_sitesearch=cygwin.com&safe=images>
>The code of fhandler_base::write in fhandler.cc suggest that the check for
>sparse file runs if there has been a seek before write request. The code
>performs fine when dealing with local file. For files on network (netapps
>or samba) write performance degrades because of this code. If a testcase
>performs seek followed by write then each time code checks whether the
>file is sparse or not. In that case GetFileSize gets called each time
>write is performed, which takes good amount of time on network.
>Is there any alternative to GetFileSize which
>does not take much time? I searched in MSDN and found none faster than
>GetFileSize.
I can't speak to that. I suppose one option is to just conditionalize
sparse files to local drives. Others may have better ideas though.
--
Larry Hall http://www.rfk.com
RFK Partners, Inc. (508) 893-9779 - RFK Office
838 Washington Street (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/