You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vincent Lefevre <vi...@vinc17.net> on 2016/07/27 00:36:26 UTC

svnserve takes too much memory for "svn blame"

When I do "svn blame" on some file (36972 lines), svnserve takes
more than 800 MB on the server (and is killed due to lack of
memory). So, it seems that svnserve is inefficient in terms of
memory usage (that's at least 22 KB per line!).

svnserve, version 1.8.8 (r1568071)
   compiled Aug 20 2015, 12:51:30 on x86_64-pc-linux-gnu

-- 
Vincent Lefvre <vi...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Re: svnserve takes too much memory for "svn blame"

Posted by Stefan Hett <st...@egosoft.com>.
On 7/28/2016 2:06 PM, Vincent Lefevre wrote:
> On 2016-07-27 11:12:47 +0200, Stefan Hett wrote:
>> Hi Vincent,
>> On 7/27/2016 2:36 AM, Vincent Lefevre wrote:
>>> When I do "svn blame" on some file (36972 lines), svnserve takes
>>> more than 800 MB on the server (and is killed due to lack of
>>> memory). So, it seems that svnserve is inefficient in terms of
>>> memory usage (that's at least 22 KB per line!).
>>>
>>> svnserve, version 1.8.8 (r1568071)
>>>      compiled Aug 20 2015, 12:51:30 on x86_64-pc-linux-gnu
>>>
>> Can you try to bump your svnserve version to at least 1.8.15?
> The machine is an Ubuntu 14.04 LTS, and 1.8.8 is the latest version
> in this distribution. But I plan to upgrade it to 16.04 LTS in a few
> days.
An alternative might be to use the packages provided by Wandisco: 
https://www.wandisco.com/subversion/os/downloads


-- 
Regards,
Stefan Hett


Re: svnserve takes too much memory for "svn blame"

Posted by Vincent Lefevre <vi...@vinc17.net>.
On 2016-07-28 14:06:10 +0200, Vincent Lefevre wrote:
> On 2016-07-27 11:12:47 +0200, Stefan Hett wrote:
> > Hi Vincent,
> > On 7/27/2016 2:36 AM, Vincent Lefevre wrote:
> > > When I do "svn blame" on some file (36972 lines), svnserve takes
> > > more than 800 MB on the server (and is killed due to lack of
> > > memory). So, it seems that svnserve is inefficient in terms of
> > > memory usage (that's at least 22 KB per line!).
> > > 
> > > svnserve, version 1.8.8 (r1568071)
> > >     compiled Aug 20 2015, 12:51:30 on x86_64-pc-linux-gnu
> > > 
> > Can you try to bump your svnserve version to at least 1.8.15?
> 
> The machine is an Ubuntu 14.04 LTS, and 1.8.8 is the latest version
> in this distribution. But I plan to upgrade it to 16.04 LTS in a few
> days.

I forgot that I had kept a very recent copy of the repository
(obtained with dump + load) on a Debian/unstable machine (the goal
was to do some tests before the server upgrade). So, I could test
with it, still using svn+ssh (but here, localhost). An "svn blame"
on the same file takes a small memory footprint for both the svn
client and svnserve (around 16 - 30 MB for resident memory, around
250 MB for virtual memory).

So, I suppose that the memory problem was a bug in 1.8.8.

-- 
Vincent Lefvre <vi...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Re: svnserve takes too much memory for "svn blame"

Posted by Vincent Lefevre <vi...@vinc17.net>.
On 2016-07-27 11:12:47 +0200, Stefan Hett wrote:
> Hi Vincent,
> On 7/27/2016 2:36 AM, Vincent Lefevre wrote:
> > When I do "svn blame" on some file (36972 lines), svnserve takes
> > more than 800 MB on the server (and is killed due to lack of
> > memory). So, it seems that svnserve is inefficient in terms of
> > memory usage (that's at least 22 KB per line!).
> > 
> > svnserve, version 1.8.8 (r1568071)
> >     compiled Aug 20 2015, 12:51:30 on x86_64-pc-linux-gnu
> > 
> Can you try to bump your svnserve version to at least 1.8.15?

The machine is an Ubuntu 14.04 LTS, and 1.8.8 is the latest version
in this distribution. But I plan to upgrade it to 16.04 LTS in a few
days.

-- 
Vincent Lefvre <vi...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

Re: svnserve takes too much memory for "svn blame"

Posted by Stefan Hett <st...@egosoft.com>.
Hi Vincent,
On 7/27/2016 2:36 AM, Vincent Lefevre wrote:
> When I do "svn blame" on some file (36972 lines), svnserve takes
> more than 800 MB on the server (and is killed due to lack of
> memory). So, it seems that svnserve is inefficient in terms of
> memory usage (that's at least 22 KB per line!).
>
> svnserve, version 1.8.8 (r1568071)
>     compiled Aug 20 2015, 12:51:30 on x86_64-pc-linux-gnu
>
Can you try to bump your svnserve version to at least 1.8.15?
Skimming through the changelog suggests several memory related 
tweaks/fixes got in between your 1.8.8 version and the current one (not 
sure whether your particular case has been fixed already, though).

-- 
Regards,
Stefan Hett


Re: svnserve takes too much memory for "svn blame"

Posted by Vincent Lefevre <vi...@vinc17.net>.
On 2016-07-27 17:36:14 +0200, Bert Huijben wrote:
> 'svn blame' downloads all versions of the file (via binary diffs between the
> revisions that contain actual changes), so the number of lines in the file
> is not a number that really relates to what the server has to do.
> 
> The number of relevant revisions is far more interesting... as is how much
> really changed in the file.

There are 1831 revisions. But once a diff has been sent, I suppose
that it doesn't need to be in the server's memory any longer.

For each new revision, not much is changed in the file: just some
added lines (20 in average), and 1 or 2 modified lines in general
(always the same ones).

-- 
Vincent Lefvre <vi...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

RE: svnserve takes too much memory for "svn blame"

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Vincent Lefevre [mailto:vincent-svn@vinc17.net]
> Sent: woensdag 27 juli 2016 02:36
> To: users@subversion.apache.org
> Subject: svnserve takes too much memory for "svn blame"
> 
> When I do "svn blame" on some file (36972 lines), svnserve takes
> more than 800 MB on the server (and is killed due to lack of
> memory). So, it seems that svnserve is inefficient in terms of
> memory usage (that's at least 22 KB per line!).
> 
> svnserve, version 1.8.8 (r1568071)
>    compiled Aug 20 2015, 12:51:30 on x86_64-pc-linux-gnu

'svn blame' downloads all versions of the file (via binary diffs between the
revisions that contain actual changes), so the number of lines in the file
is not a number that really relates to what the server has to do. 

The number of relevant revisions is far more interesting... as is how much
really changed in the file.

	Bert