[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH]: Increase size of FSFS dir cache

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-11-07 05:00:41 CET

On Sun, 2005-11-06 at 22:15 -0500, Daniel Berlin wrote:
> 2. svn_stream_readline to read the hash tables for directories and
> revprops, again and again and again and again (still, because every
> svnserve instance it). On gcc.gnu.org, this is actually cpu bound, but
> still wastes about >20% of the cpu time per session, which is quite
> high. When it *does* hit the disk, it's ridiculously slow, because it
> uses a 1 byte buffer.

The 1 byte buffer issue is a one-line fix, if you can figure out where
the file is opened and add APR_BUFFERED.

> For 1.4, I think we need to do something about the serialized
> hashtables. Trivially, you could just prepend an encoded integer to
> each line instead of using something that goes searching for newline.

I'm a little confused. If I remember right, the format of a serialized
hash table is a succession of:

  K <n>\n<n bytes of data>\n
  V <m>\n<m bytes of data>\n

I might have picked a slightly different format, but I don't see how you
can improve the intrinsic efficiency much. Punt the readline calls and
read character-by-character, and you should get the same efficiency as
you'd get with those prepended integers.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 7 05:02:43 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.