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

Authz perf regression 1.9 -> 1.10

From: Sam Toliman <ivansduck_at_gmail.com>
Date: Wed, 11 Sep 2019 19:34:38 +0300

Greetings,

TLDR since 1.10 subversion loading acl file ~15x times slower, which leads
in performance regression in tunnel mode used with svn+ssh scheme.

https://subversion.apache.org/docs/release-notes/1.10#authzperf says that
performance was improved, but we have discovered regression using large
access files (>2Mb) (depersonalized:
https://drive.google.com/file/d/1PP5n9BJkCs1Ssn47mHkI9dADPbo7DasJ/view).

Problem can be localized and reproduced using svnauthz-validate
(/usr/bin/time -v):

stats for https://github.com/apache/subversion/archive/1.9.12.tar.gz:
  Command being timed:
"subversion-1.9.12/tools/server-side/svnauthz-validate acl.anon"
  User time (seconds): 0.02
  System time (seconds): 0.00
  Percent of CPU this job got: 80%
  Elapsed (wall clock) time (h:mm:ss or m:ss): *0:00.02*
  Maximum resident set size (kbytes): *7656*
  Minor (reclaiming a frame) page faults: *2812*
  Voluntary context switches: 32
  Involuntary context switches: 7

stats for https://github.com/apache/subversion/archive/1.10.6.tar.gz:
  Command being timed:
"subversion-1.10.6/tools/server-side/svnauthz-validate acl.anon"
  User time (seconds): 0.50
  System time (seconds): 0.02
  Percent of CPU this job got: 98%
  Elapsed (wall clock) time (h:mm:ss or m:ss): *0:00.53*
  Maximum resident set size (kbytes): *48704*
  Minor (reclaiming a frame) page faults: *13103*
  Voluntary context switches: 31
  Involuntary context switches: 9

Last release still contains regression.
stats for https://github.com/apache/subversion/archive/1.12.2.tar.gz
  Command being timed:
"subversion-1.12.2/tools/server-side/svnauthz-validate acl.anon"
  User time (seconds): 0.48
  System time (seconds): 0.02
  Percent of CPU this job got: 98%
  Elapsed (wall clock) time (h:mm:ss or m:ss): *0:00.52*
  Maximum resident set size (kbytes): *49004*
  Minor (reclaiming a frame) page faults: *13095*
  Voluntary context switches: 32
  Involuntary context switches: 11

Most of the time svnauthz-validate spends in the function svn_authz__parse (
https://github.com/apache/subversion/blob/f91051c82d38a732b546a84f4ead491514e81010/subversion/libsvn_repos/authz_parse.c#L1369).

It seems that in the tunnel mode redundantly parse all groups and all users
- it should be done only for tunnel_user.

Some host info:
>> lsb_release -r
Release: 16.04
>> uname -a
Linux host 4.4.171-70.1 #1 SMP Thu Jan 31 10:46:27 UTC 2019 x86_64 x86_64
x86_64 GNU/Linux
>> gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609

How subversion was built:
>> ./autogen.sh
>> ./configure
>> make

Thanks
Received on 2019-09-11 19:10:30 CEST

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