apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Collins-Sussman <suss...@newton.ch.collab.net>
Subject Re: disk i/o problems
Date Tue, 27 Mar 2001 14:37:49 GMT
Jeff Trawick <trawickj@bellsouth.net> writes:
 
> On apr_file_open(), specify APR_BUFFERED.  This causes the file I/O
> support to act like the C Standard Library stdio routines, in that it
> will minimize system calls.
> 
> On the first read it grabs a bunch of data in one syscall, continues
> to service read operations from that bunch of data until exhausted, at
> which point it does another syscall.


Ah!  I'll give that a try.  Doing a Subversion checkout or update is
very similar to CVS:  lots of little files being read and written in
the administrative SVN/ directory.  We're calling expat over and over
again to read the 'entries' file into memory, change a struct, then
writing the XML back out again.  We're also doing lots of
copying/reading/deleting of files in SVN/tmp/ behind the scenes, to
ensure crash-safety.

My problem is quite embarrassing.  My cohorts (who run Redhat and
Debian) look over my shoulder at my FreeBSD system(s) and admire the
elegance of the /usr/ports/ system.  But then it takes me 15 seconds
to check out a sample subversion working copy (while my disk
*thrashes*), while it takes them not even .5 seconds to do the same
task!

I'll experiment with the APR_BUFFERED flag and let you know what
happens.

Thanks,

Ben

Mime
View raw message