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

Re: [PATCH] Improve single byte read stream performance

From: Johan Corveleyn <jcorvel_at_gmail.com>
Date: Mon, 15 Mar 2010 22:40:12 +0100

On Mon, Mar 15, 2010 at 9:56 PM, Johan Corveleyn <jcorvel_at_gmail.com> wrote:
> On Mon, Mar 15, 2010 at 6:18 PM, Ivan Zhakov <ivan_at_visualsvn.com> wrote:
>> On Mon, Mar 15, 2010 at 17:01, C. Michael Pilato <cmpilato_at_collab.net> wrote:
>>> Philip Martin wrote:
>>>> Johan Corveleyn <jcorvel_at_gmail.com> writes:
>>>>
>>>>> On Tue, Mar 9, 2010 at 8:04 PM, Julian Foad <julian.foad_at_wandisco.com> wrote:
>>>>>> On Sun, 2010-03-07, Stefan Fuhrman wrote:
>>>>>>> Speed up input stream processing in config parser and
>>>>>>> others that read single bytes from a stream.
>>>>>>>
>>>>>>> * subversion/libsvn_subr/subst.c
>>>>>>>   (translated_stream_read): Add an optimized code path
>>>>>>>     for single byte read requests.
>>>>>>>
>>>>>>> Patch by: Stefan Fuhrmann <stefanfuhrmann{_AT_}alice-dsl.de>
>>>>>> Committed in r921057.
>>>>> Any chance this could be backported to 1.6.x?
>>>>>
>>>>> This seems like a nice performance improvement with low impact on the
>>>>> rest of the code. Would be nice if this could be put out there as
>>>>> quickly as possible (i.e. not having to wait for 1.7) for users to
>>>>> enjoy ...
>>>>
>>>> Can you quantify the improvement?  I don't suppose a GUI like
>>>> TortoiseSVN reads config files very often.  Any improvement is lost in
>>>> the noise when I run the command line client on Linux.  It doesn't
>>>> change the number of system calls reported by 'strace -c'.
>>>
>>> Do our servers (mod_dav_svn and svnserve) parse authz files using this
>>> codepath?
>> Yes, they use the same code.
>>
>>> How often?  On a per-connection basis?
>> mod_dav_svn caches authz file per connection.
>
> I just tested with svnserve x fsfs. For every connection it uses this
> code to read:
> - fsfs.conf (from within find_repos -> svn_repos_open)
> - svnserve.conf and authz (from within find_repos -> load_configs).
> There's no caching whatsoever, these files are read everytime a client
> requests something.
>
> I have no idea of the real performance impact, but maybe I'll do some
> measurements later tonight ...

Hm, I can't find a measurable performance difference for reading these
conf files on the server. That is, with a default fsfs.conf,
svnserve.conf, and a quite small authz file.

Putting an apr_time_now at the start and the end of
svn_config__parse_file in config_file.c yields exactly the same time
at the start and the end. Both with and without Stefan Fuhrmann's
change.

I guess this was to be expected, since both fsfs.conf and
svnserve.conf are quite small. For authz I also used a nearly empty
config (just containing the default comments and one *=r rule). Maybe
someone should try this with a very large authz file to see if it
makes a difference?

Johan
Received on 2010-03-15 22:40:39 CET

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.