You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@subversion.apache.org by "Julian Foad (Jira)" <ji...@apache.org> on 2022/06/08 11:38:00 UTC

[jira] [Commented] (SVN-4832) Authz perf regression 1.9 -> 1.10

    [ https://issues.apache.org/jira/browse/SVN-4832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17551570#comment-17551570 ] 

Julian Foad commented on SVN-4832:
----------------------------------

I did some profiling. My debugging patch is attached as "[^svn-4832-authz-perf-debug-1.patch]".

Nearly all the time is used by svn_authz__parse() calling update_user_rights() this many times:

  (total number of ACLs in the authz file) x (total number of "concrete users" mentioned in the authz file).

Example run:
{code:none}
$ time obj-dir/tools/server-side/svnauthz validate acl.anon
DBG: authz_parse.c:1409: t=1654686460.478467 pass1
DBG: authz_parse.c:1421: t=1654686460.497999 pass1.6847
DBG: authz_parse.c:1444: t=1654686460.498020 pass2
DBG: authz_parse.c:1453: t=1654686460.619711 pass2b
DBG: authz_parse.c:1480: part3: iter expand_acl_callback x 91 parsed_acls
DBG: authz_parse.c:1317: t=1654686460.619794 expand_acl_callback
DBG: authz_parse.c:1364: t=1654686460.619803 expand_acl_callback 2
DBG: authz_parse.c:1371: t=1654686460.629368 iter update_user_rights x 35473 -> 9553 µs
DBG: authz_parse.c:1372:   update_user_rights: 2395 2972
DBG: authz_parse.c:1317: t=1654686460.629386 expand_acl_callback
DBG: authz_parse.c:1364: t=1654686460.629393 expand_acl_callback 2
DBG: authz_parse.c:1371: t=1654686460.645667 iter update_user_rights x 35473 -> 16266 µs
DBG: authz_parse.c:1372:   update_user_rights: 3035 8126
[...]
DBG: authz_parse.c:1317: t=1654686461.941102 expand_acl_callback
DBG: authz_parse.c:1364: t=1654686461.941106 expand_acl_callback 2
DBG: authz_parse.c:1371: t=1654686461.955318 iter update_user_rights x 35473 -> 14206 µs
DBG: authz_parse.c:1372:   update_user_rights: 2992 6293 
DBG: authz_parse.c:1488: t=1654686461.955472 done

real  0m1.518s
user  0m1.487s
sys   0m0.034s
{code}

The authz file "[^acl.anon]" has 91 ACLs and 35473 distinct users; 91×35473 = 3,228,043; parse time about 1 second (on my machine).

I have seen another case where an authz file used in SvnParentPath configuration for a group of over 100 repositories had a total of 15774 ACLs and 4873 distinct users; 15774 × 4873 = 76,866,702; parse time about 12 seconds (on my machine).

> Authz perf regression 1.9 -> 1.10
> ---------------------------------
>
>                 Key: SVN-4832
>                 URL: https://issues.apache.org/jira/browse/SVN-4832
>             Project: Subversion
>          Issue Type: Bug
>    Affects Versions: 1.10.x
>            Reporter: Julian Foad
>            Priority: Major
>         Attachments: acl.anon, svn-4832-authz-perf-debug-1.patch
>
>
> TLDR since 1.10 subversion loading acl file ~15x times slower, which leads in performance regression in tunnel mode used with svn+ssh scheme.
> Email thread on dev@: "Authz perf regression 1.9 -> 1.10", 2019-09-11, Sam Toliman. [https://svn.haxx.se/dev/archive-2019-09/0033.shtml] or [https://lists.apache.org/thread/4vzo7tddyv556vs372kxb4hz83lomcdr]



--
This message was sent by Atlassian Jira
(v8.20.7#820007)