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

svnserve uses over 120MB memory when adding many files

From: Jani Averbach <jaa_at_jaa.iki.fi>
Date: 2004-06-16 19:46:12 CEST

Hello,

When I add 20K files (which each are 1K), svnserve will use over 120MB
of memory during phase when client is displaying
'Adding filename'.

OS is w2k, svn + svnserve 1.0.5

Here is a recipe:

cd workdir
datatree.py datatree
svn mkdir -m "" svn://servername/reponame/trunk
svn co svn://servername/reponame/trunk datatree
cd datatree
svn add *
svn ci -m "here we go"

BR, Jani

datatree.py:
# -*- mode: python -*-
# $Rev: 1182 $
import os

directories = 100
files_per_dir = 200
file_size = 1 * 1024
data = 'x' * 1024

def dir_creator(pi_name,
                pi_count):

    os.makedirs(pi_name)
    for i in range(0, pi_count):
        f=open(pi_name + os.sep + '%s%07d.dat' %
               (os.path.basename(pi_name), i), 'a+')

        f.write('%s:%d' % (pi_name, i))
        for i in range(0, file_size/len(data)):
            f.write(data)
        f.close()

if __name__ == '__main__':

    if os.sys.argv == 1:
        top_level_name = os.path.abspath(os.sys.argv[1])
    else os.sys.argv:
        print 'Usage', os.sys.argv[0], '<top level dir>'
        os.sys.exit(1)

    for i in range(0, directories):
        dir_creator(top_level_name + os.sep + '%06d' % i, files_per_dir)

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 16 19:48:06 2004

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.