This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: performance degradation because of sparse file handling in cygwin


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]