You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Juanma Barranquero <jm...@laley.wke.es> on 2003/11/28 09:45:54 UTC

Big memory use after update

Using:
  - svn-win32-0.33.1*.zip
  - Apache 2.0.48
  - Windows 2K SP4

I have a repository with just a project. The working copy is about 118 MB
in size (it's a VisualStudio project). I access the repository through
Apache and mod_dav_svn.

I had originally imported the full project, but afterwards I decided to
delete myproject.ncb and myproject.opt from the repository (i.e., have
the files unmanaged by SVN) and svn:ignore them because they change each
time you exit VisualStudio, even if you've done nothing.

"svn delete" didn't work because the files were modified, so I decided
to do a "svn update" first (I should have done "svn revert", but I
goofed).

Memory for the Apache process went straight up from 270 MB to ~900 MB!
And it didn't go down after the update and the rest of operations
(delete the files, commit, status, etc.). I've had to manually restart
Apache.

Is that normal/expected?


                                                                Juanma



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Jan Hendrik <ja...@bigfoot.com>.
Concerning Re: Big memory use after update
Juanma Barranquero wrote on 28 Nov 2003, 13:53, at least in part:

> 
> On Fri, 28 Nov 2003 12:02:13 +0100
> Sander Striker <st...@apache.org> wrote:
> 
> > But after the operation, the memory should shrink back if you have a
> > MaxMemFree directive in you httpd.conf.
> 
> No, I don't have one.
> 
> But I do svn update a lot of times and the memory doesn't grow. So
> *something* happened this one time. I'm sorry I don't have more
> accurate information.

Exactly as here - maybe 30 or 40 or even more operations with 
barely any noticeable impact on memory and then up up ...

Jan Hednrik

---------------------------------------
Freedom quote:

     As a man is said to have a right to his property,
     he may be equally said to have a property in his rights.
     Where an excess of power prevails,
     property of no sort is duly respected.
     No man is safe in his opinions, his person,
     his faculties, or his possessions.
                -- James Madison, National Gazzette, 1792


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Juanma Barranquero <jm...@laley.wke.es>.
On Mon, 1 Dec 2003 04:57:42 -0600 
"Leeuw van der, Tim" <ti...@nl.unisys.com> wrote:

> It happened on a commit, didn't it?

I did

  svn delete xxx
  svn delete yyy
  svn commit
  # Uh? Ahhhh, they're modified!
  svn revert
  svn status
  # What the h...??

more or less, so I'm not entirely sure whether it happened on the commit.

> So perhaps a dump/reload of that entire
> repository might trigger it on re-committing that revision?

Worth a try, if it is posible to do that.


                                                                Juanma



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2003-11-28 at 06:53, Juanma Barranquero wrote:

> But I do svn update a lot of times and the memory doesn't grow. So
> *something* happened this one time. I'm sorry I don't have more accurate
> information.

It's frustrating, since we just spent the last two months fixing memory
scalability bugs, and nobody can come up with a reliable reproduction
recipe for this.  We thought it was a win32-only glitch, but it seems
that's not even true.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Juanma Barranquero <jm...@laley.wke.es>.
On Fri, 28 Nov 2003 12:02:13 +0100
Sander Striker <st...@apache.org> wrote:

> But after the operation, the memory should shrink back if you have a
> MaxMemFree directive in you httpd.conf.

No, I don't have one.

But I do svn update a lot of times and the memory doesn't grow. So
*something* happened this one time. I'm sorry I don't have more accurate
information.

                                                                Juanma



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Jan Hendrik <ja...@bigfoot.com>.
Concerning Re: Big memory use after update
Sander Striker wrote on 28 Nov 2003, 12:02, at least in part:

> On Fri, 2003-11-28 at 10:45, Juanma Barranquero wrote:

> > Using:
> >   - svn-win32-0.33.1*.zip
> >   - Apache 2.0.48
> >   - Windows 2K SP4

> > Memory for the Apache process went straight up from 270 MB to ~900
> > MB! And it didn't go down after the update and the rest of
> > operations (delete the files, commit, status, etc.). I've had to
> > manually restart Apache.
> > 
> > Is that normal/expected?
> 
> Seems a bit excessive...
> 
> But after the operation, the memory should shrink back if you have a
> MaxMemFree directive in you httpd.conf.

... but not available under Windows as far as I can see from the 
default httpd.conf, the manual (2.0.48) and a quick search with 
Google. It seems there is a patch under way though, useful at the 
moment only for those who can compile Apache themselves of 
course.

Best regards

Jan Hendrik

---------------------------------------
Freedom quote:

     The more freedom, the less equality;
     the more equality, the less freedom.
                -- Max Horkheimer


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Sander Striker <st...@apache.org>.
On Fri, 2003-11-28 at 10:45, Juanma Barranquero wrote:
> Using:
>   - svn-win32-0.33.1*.zip
>   - Apache 2.0.48
>   - Windows 2K SP4
> 
> I have a repository with just a project. The working copy is about 118 MB
> in size (it's a VisualStudio project). I access the repository through
> Apache and mod_dav_svn.
> 
> I had originally imported the full project, but afterwards I decided to
> delete myproject.ncb and myproject.opt from the repository (i.e., have
> the files unmanaged by SVN) and svn:ignore them because they change each
> time you exit VisualStudio, even if you've done nothing.
> 
> "svn delete" didn't work because the files were modified, so I decided
> to do a "svn update" first (I should have done "svn revert", but I
> goofed).
> 
> Memory for the Apache process went straight up from 270 MB to ~900 MB!
> And it didn't go down after the update and the rest of operations
> (delete the files, commit, status, etc.). I've had to manually restart
> Apache.
> 
> Is that normal/expected?

Seems a bit excessive...

But after the operation, the memory should shrink back if you have a
MaxMemFree directive in you httpd.conf.


Sander

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Jan Hendrik <ja...@bigfoot.com>.
Concerning Re: Big memory use after update
Roland Schwingel wrote on 28 Nov 2003, 11:10, at least in part:

> > Memory for the Apache process went straight up from 270 MB to ~900
> > MB! And it didn't go down after the update and the rest of
> > operations (delete the files, commit, status, etc.). I've had to
> > manually restart Apache.
> >
> > Is that normal/expected?
> I am making similar observations since 0.29.0 (ok, maybe I haven't 
> checked that earlier). I made a test last weekend. Normally I do have
> eg. php also in apache and I did not knew whether this might be
> related to this additional software or not.

[text is snipped]
 
> On monday morning I made similiar observations. Memory grew to ~800MB.
> And I needed 4 apachectl stop calls to get rid of all running httpds.
> After one apachectl start everything is fine for me again. But just
> for about 24 hours.
> 
> I do this stopping and starting apache every day since about 3 weeks.
> As of the fact I couldn't find any reports for this problem on the
> list I was thinking it is a home made problem. But now, it does not
> seem so...
> 
> Affected environment for my weekend thing:
> server: apache 2.0.48, bdb 4.0.14, svn 0.33.1, linux 2.4.20
> client: apache 2.0.48 (without svn), svn 0.33.0, linux 2.4.20
> 
> So it appears there might be some leaking...

Interesting that you observe this on Linux, too. It sounds very 
similar to what I observed on W2K, only that I had not that much 
RAM. But the scenario was quite the same: sudden upsurge of 
memory usage with every svn command, Apache had to be 
stopped (and repos to be recovered what really may be because of 
memory consumption reached the ceiling here for in rare cases I 
could kill Apache soon during its upsurge and then the repos 
remained ok.) It was said here on the list to be a memory problem 
(just 148 MB RAM) and a Windows problem of swapping itself to 
death when memory is short. However, since long I suspected that 
this upsurge may happen with virtually any amount of RAM (and 
the P4 Dell Dimension 4300 box is limited to 512MB anyway).

Best regards

Jan Hendrik


---------------------------------------
Freedom quote:

     We who live in free market societies believe
     that growth, prosperity and ultimately human fulfillment,
     are created from the bottom up, not the government down.
     Only when the human spirit is allowed to invent and create,
     only when individuals are given a personal stake
     in deciding economic policies and benefiting from their success --
     only then can societies remain economically alive, dynamic,
     progressive, and free. Trust the people.
     This is the one irrefutable lesson of the entire postwar period
     contradicting the notion that rigid government controls
     are essential to economic development.
                -- Ronald Reagan, September 29, 1981


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by geoff <ot...@0x29a.org.uk>.
On Thu, 04 Dec 2003 13:40:31 -0800, Ben Collins-Sussman
<su...@collab.net> wrote:

>On Thu, 2003-12-04 at 12:28, geoff wrote:
>
>> >>I'm not an Apache expert but this looks like Apache keeping buffers on
>> >>the grounds you might need them again rather than a leak.
>> 
>> Which if it were true in 0.31 is presumably doubly true in 0.34. 
>> 
>> So *does* anybody know or will I ask my annoyingly niave questions on
>> the Apache list?
>
>Yes, this is the way apache works, a deliberate design.  If an httpd
>process suddenly needs 100 megs of memory to get a task done, it will
>not release the memory after the request is finished.  It holds onto it,
>because it "might be needed" for future requests.
>
>So the real issue here is prevention:  no subversion request should
>*ever* require a huge amount of memory.  There should be no leaks in the
>first place.

Oh, okay. Thanks. When I get round to an upgrade I'll look out for
changed behaviour.
--
best,
geoff

regrettably the email address above will bounce


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2003-12-04 at 12:28, geoff wrote:

> >>I'm not an Apache expert but this looks like Apache keeping buffers on
> >>the grounds you might need them again rather than a leak.
> 
> Which if it were true in 0.31 is presumably doubly true in 0.34. 
> 
> So *does* anybody know or will I ask my annoyingly niave questions on
> the Apache list?

Yes, this is the way apache works, a deliberate design.  If an httpd
process suddenly needs 100 megs of memory to get a task done, it will
not release the memory after the request is finished.  It holds onto it,
because it "might be needed" for future requests.

So the real issue here is prevention:  no subversion request should
*ever* require a huge amount of memory.  There should be no leaks in the
first place.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by geoff <ot...@0x29a.org.uk>.
On Thu, 04 Dec 2003 11:09:54 -0800, Ben Collins-Sussman
<su...@collab.net> wrote:

>On Thu, 2003-12-04 at 10:42, geoff wrote:
>
>> Subversion 0.31
>> Apache 2.0.47
>> Berkeley-db 2.0.14
>> kernel 2.4.19 SMP
>> SuSe 8.2
>> 
>
>Many, many memory leaks were fixed since Subversion 0.31.  Please
>upgrade to apache 2.0.48, db 4.2, and subversion 0.34.  Let us know if
>you still have these problems.  It's a waste of time to hunt leaks on
>software that's 2 months old.

Thanks for the software, Ben, it's transforming the way I work.

Regrettably if I kept up with Subversion I'd have no time to do the
things I want to keep in it, some of which have deadlines looming. 

You snipped:
>>I'm not an Apache expert but this looks like Apache keeping buffers on
>>the grounds you might need them again rather than a leak.

Which if it were true in 0.31 is presumably doubly true in 0.34. 

So *does* anybody know or will I ask my annoyingly niave questions on
the Apache list?

--
best,
geoff

regrettably the email address above will bounce


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2003-12-04 at 10:42, geoff wrote:

> Subversion 0.31
> Apache 2.0.47
> Berkeley-db 2.0.14
> kernel 2.4.19 SMP
> SuSe 8.2
> 

Many, many memory leaks were fixed since Subversion 0.31.  Please
upgrade to apache 2.0.48, db 4.2, and subversion 0.34.  Let us know if
you still have these problems.  It's a waste of time to hunt leaks on
software that's 2 months old.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by geoff <ot...@0x29a.org.uk>.
On Fri, 28 Nov 2003 11:10:45 +0100, Roland Schwingel
<Ro...@onevision.de> wrote:

>
>Hi...
>
>> Memory for the Apache process went straight up from 270 MB to ~900 MB!
>> And it didn't go down after the update and the rest of operations
>> (delete the files, commit, status, etc.). I've had to manually restart
>> Apache.
>>
>> Is that normal/expected?
>I am making similar observations since 0.29.0 (ok, maybe I haven't  checked
>that earlier).
>I made a test last weekend. Normally I do have eg. php also in apache and I
>did
>not knew whether this might be related to this additional software or not.
>
>I removed anything from apache except svn and restarted apache to get back
>memory
>on my server. On weekend there where 6 complete checkouts of my repos from
>one
>certain client, and just 2 very small checkins (everything script
>controlled).
>Besides that no svn usage in the network.
>
>On monday morning I made similiar observations. Memory grew to ~800MB. And
>I
>needed 4 apachectl stop calls to get rid of all running httpds. After one
>apachectl start everything is fine for me again. But just for about 24
>hours.
>
>I do this stopping and starting apache every day since about 3 weeks. As of
>the fact
>I couldn't find any reports for this problem on the list I was thinking it
>is a home made
>problem. But now, it does not seem so...
>
>Affected environment for my weekend thing:
>server: apache 2.0.48, bdb 4.0.14, svn 0.33.1, linux 2.4.20
>client: apache 2.0.48 (without svn), svn 0.33.0, linux 2.4.20
>
>So it appears there might be some leaking...

Subversion 0.31
Apache 2.0.47
Berkeley-db 2.0.14
kernel 2.4.19 SMP
SuSe 8.2

This system is a single-user archive. I've been using it for some
medium-sized projects (<3000 files) and I notice that some of my seven
httpd processes balloon up to 14Mb RSS as reported by top after remote
svn operations involving a commit of most of the files.

It's hard to tell which part of the operation causes the memory use. I
can see httpd processes consuming cpu without apparently growing in
size. 

This looks scary, huh? However while the processes sometimes get
bigger than 14Mb (I've seen up to 25) they fall back to 14 almost
immediately. Even more interestingly, after a ~24 hours they're all
back to 8000-3000.

I'm not an Apache expert but this looks like Apache keeping buffers on
the grounds you might need them again rather than a leak.

I tried MaxMemFree as suggested by Sander in
<10...@localhost.localdomain> at the global level
but it seemed to make no difference.

Any Apache experts know for sure what's going on here? Would the same
thing happen in W32?

--
best,
geoff

regrettably the email address above will bounce


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Juanma Barranquero <jm...@laley.wke.es>.
On Fri, 28 Nov 2003 14:23:42 +0100
Timothee Besset <tt...@idsoftware.com> wrote:

> Big memory usage looks a lot like what I've been getting with the 
> 'stalling checkouts' on my server.
[snip]
> When I look, I only have 2 running 
> processes, and the load is caused by httpd eating a lot of memory usage 
> and causing kernel swapping.

I've taken a look at the bug report and it doesn't seem related to what
happened to me (though it is hard to say, as I've had just but one
occurrence of the problem).

In my case, Apache used up ~900 MB RAM, but I'd say it was just a leak;
the update was not unordinately slow (perhaps just a bit slower than
usual), and there was no thrashing, even if the total physical memory in
my system is 512 MB, so it's more like mod_dav_svn used up a lot of
virtual memory and never reused it (nor freed it).

                                 Juanma



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Timothee Besset <tt...@idsoftware.com>.
Big memory usage looks a lot like what I've been getting with the 
'stalling checkouts' on my server. I used to have to shutdown apache 
before running hot-backup.py to avoid the machine going crazy. With 
0.33.1 and svnadmin hotcopy, I don't shutdown anymore, but I see the 
load on my server grow to 10 during the svn backup, and I see no reason 
a single process could cause that. When I look, I only have 2 running 
processes, and the load is caused by httpd eating a lot of memory usage 
and causing kernel swapping. Though httpd and svnadmin hotcopy should be 
independant?

For more details, see:
http://subversion.tigris.org/issues/show_bug.cgi?id=1563

TTimo

Roland Schwingel wrote:

>
>
>Hi...
>
>Juanma Barranquero <jm...@laley.wke.es> wrote on 28.11.2003
>13:52:17:
>  
>
>>>So it appears there might be some leaking...
>>>      
>>>
>>Is some kind of bug, but perhaps nothing as easy as a leaking. In my
>>environment, the bug is not easily repeatable (i.e., I do lots of svn
>>updates without a glitch).
>>    
>>
>I have this issue every day. I restart apache everyday in the morning,
>at present manually, because I (yet) cannot automatically detect when
>the svn service is "idle" and do it scheduled once a day. Not even in
>the night I can guarantee that is idle at eg. 3AM or whatever date.
>
>Roland
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: users-help@subversion.tigris.org
>
>
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Roland Schwingel <Ro...@onevision.de>.



Hi...

Juanma Barranquero <jm...@laley.wke.es> wrote on 28.11.2003
13:52:17:
> > So it appears there might be some leaking...
>
> Is some kind of bug, but perhaps nothing as easy as a leaking. In my
> environment, the bug is not easily repeatable (i.e., I do lots of svn
> updates without a glitch).
I have this issue every day. I restart apache everyday in the morning,
at present manually, because I (yet) cannot automatically detect when
the svn service is "idle" and do it scheduled once a day. Not even in
the night I can guarantee that is idle at eg. 3AM or whatever date.

Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Juanma Barranquero <jm...@laley.wke.es>.
On Fri, 28 Nov 2003 11:10:45 +0100
Roland Schwingel <Ro...@onevision.de> wrote:

> Normally I do have eg. php also in apache and I did
> not knew whether this might be related to this additional software or not.

My Apache has mod_perl and mod_python, but they're not used (the Apache
is in my own computer and there's no other users but me).

> And I needed 4 apachectl stop calls to get rid of all running httpds.

Well, my problem was easier to deal with (just one click on the Apache2
/ Restart menu of the Apache Service Monitor).

> So it appears there might be some leaking...

Is some kind of bug, but perhaps nothing as easy as a leaking. In my
environment, the bug is not easily repeatable (i.e., I do lots of svn
updates without a glitch).

                                                                Juanma



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Big memory use after update

Posted by Roland Schwingel <Ro...@onevision.de>.



Hi...

> Memory for the Apache process went straight up from 270 MB to ~900 MB!
> And it didn't go down after the update and the rest of operations
> (delete the files, commit, status, etc.). I've had to manually restart
> Apache.
>
> Is that normal/expected?
I am making similar observations since 0.29.0 (ok, maybe I haven't  checked
that earlier).
I made a test last weekend. Normally I do have eg. php also in apache and I
did
not knew whether this might be related to this additional software or not.

I removed anything from apache except svn and restarted apache to get back
memory
on my server. On weekend there where 6 complete checkouts of my repos from
one
certain client, and just 2 very small checkins (everything script
controlled).
Besides that no svn usage in the network.

On monday morning I made similiar observations. Memory grew to ~800MB. And
I
needed 4 apachectl stop calls to get rid of all running httpds. After one
apachectl start everything is fine for me again. But just for about 24
hours.

I do this stopping and starting apache every day since about 3 weeks. As of
the fact
I couldn't find any reports for this problem on the list I was thinking it
is a home made
problem. But now, it does not seem so...

Affected environment for my weekend thing:
server: apache 2.0.48, bdb 4.0.14, svn 0.33.1, linux 2.4.20
client: apache 2.0.48 (without svn), svn 0.33.0, linux 2.4.20

So it appears there might be some leaking...

Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org