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: High CPU usage on posix_fallocate call - CVS version


I found on MSDN that Windows has the capfilealloc function in all Windows OS
versions.  This function was designed to create a preallocated capture file
of a specified size.  It seems like this would accomplish what cygwin needs
with the posix_fallocate function?  I'm sure it is more complicated than
that but thought it may provide a way to quickly preallocate the file.

Rob

-----Original Message-----
From: Rob Bosch [mailto:robbosch@msn.com] 
Sent: Thursday, November 01, 2007 5:27 PM
To: 'cygwin@cygwin.com'
Subject: High CPU usage on posix_fallocate call - CVS version

When my compiled version of rsync is using the posix_fallocate function I?m
getting significant CPU usage.? The machine is a dual-core processor and I?m
getting 20%-25% CPU utilization during the posix_fallocate call.? Machine
stats ? Windows Server 2003 x64 R2, 4GB RAM (over 2.0GB free), fiber
connected SATA RAID.? I?m wondering if the CPU spike should be expected??
The file size I?m creating is 77GB is size. ?The call is a simple
posix_fallocate(fd, 0, total_size) where the fd is the file pointer and the
total_size is the 77GB value from the file being copied.

?It also takes 20 minutes for the file to be created using this call.? When
the same file is copied under native Windows I?m not getting the same CPU
spike or the length of time to create the file even though Windows is
?pre-allocating? the file.? I state this not as criticism, just for
reference. 

cygwin version is CVS from roughly 10 days ago.? I compiled the cygwin
components following the FAQ instructions?no special settings.

Rob






--
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]