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

Re: Potential regression: high server-side memory consumption during import

From: Philip Martin <philip_at_codematters.co.uk>
Date: Fri, 02 Mar 2018 18:20:48 +0000

Stefan Sperling <stsp_at_elego.de> writes:

> Hmmm. Does this help? The authz_tests pass with it.
>
> Index: subversion/mod_authz_svn/mod_authz_svn.c
> ===================================================================
> --- subversion/mod_authz_svn/mod_authz_svn.c (revision 1825730)
> +++ subversion/mod_authz_svn/mod_authz_svn.c (working copy)
> @@ -395,10 +395,11 @@ resolve_repos_relative_url(const char **path, cons
> }
>
> /*
> - * Get the, possibly cached, svn_authz_t for this request.
> + * Get the svn_authz_t for this request.
> */
> static svn_authz_t *
> get_access_conf(request_rec *r, authz_svn_config_rec *conf,
> + apr_pool_t *result_pool,
> apr_pool_t *scratch_pool)
> {
> const char *access_file;
> @@ -467,7 +468,7 @@ get_access_conf(request_rec *r, authz_svn_config_r
> svn_err = svn_repos_authz_read3(&access_conf,
> access_file, groups_file,
> TRUE, NULL,
> - r->connection->pool, scratch_pool);
> + result_pool, scratch_pool);
>
> if (svn_err)
> {
> @@ -687,7 +688,7 @@ req_check_access(request_rec *r,
> }
>
> /* Retrieve/cache authorization file */
> - access_conf = get_access_conf(r,conf, r->pool);
> + access_conf = get_access_conf(r,conf, r->pool, r->pool);
> if (access_conf == NULL)
> return DECLINED;
>
> @@ -804,7 +805,7 @@ subreq_bypass2(request_rec *r,
> }
>
> /* Retrieve authorization file */
> - access_conf = get_access_conf(r, conf, scratch_pool);
> + access_conf = get_access_conf(r, conf, scratch_pool, scratch_pool);
> if (access_conf == NULL)
> return HTTP_FORBIDDEN;

Yes, that solves the memory use problem. There is still a time penalty:

Your patch:

 $ time svn log -q http://localhost:8888/repo/asf/subversion > /dev/null

 real 0m7.695s
 user 0m0.429s
 sys 0m0.283s

 apache httpd cpu: 7.30

Revert r1779188,1778923

 $ time svn log -q http://localhost:8888/repo/asf/subversion > /dev/null

 real 0m5.102s
 user 0m0.460s
 sys 0m0.250s

 apache httpd cpu: 5.10

-- 
Philip
Received on 2018-03-02 19:21:05 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.