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

Re: Why does SVN + apache try to close non existing file descriptors?

From: Jon Bendtsen <jbendtsen_at_laerdal.dk>
Date: Thu, 13 Mar 2008 11:54:51 +0100

On 12/03/2008, at 17.44, Erik Huelsmann wrote:

> On 3/12/08, Jon Bendtsen <jbendtsen_at_laerdal.dk> wrote:
>> Hi
>>
>> I have a problem with SVN and/or apache which does not apply to
>> svnserve.
>> I use svn log to test this, but my users complain that any SVN
>> command
>> is slow.
>>
>> Using svnserve directly it takes less than a second to get an output
>> of svn log.
>> Using SVN through apache it takes about 28 minutes to get a log.
>>
>> So i used strace on apache and it turns out it tries to close
>> 1024*1024 file descriptors
>> more than once. Every time takes almost a minute. It starts 41 times,
>> but for some reason
>> it does not count to 1024*1024 every time. But it does count to
>> 1024*1024 22 times,
>> and some times only to some hundred thousand times. The error message
>> is like this
>> 13:47:17 close(227260) = -1 EBADF (Bad file descriptor)
>> Most of the times the processes only have a few files open, so
>> anything after 2 or 3
>> gets an error message. This means i get a strace file with 1024 *
>> 1024
>> error lines.
>>
>> Q) why brute force close all files?
>
> I think this is an apache or APR question: I can't think of any reason
> why Subversion would be closing file handles. I *can* see reasons why
> Apache would do that when starting a client to handle a request. Which
> MPM did you configure for your Apache? mpm_worker? mpm_prefork?

ii apache2-mpm-prefork 2.0.54-5sarge2
traditional model for Apache2

Will mpm_worker be faster?

>
>> a) ask the kernel to close all my open files
>> b) ask the kernel which files do I have open and then close
>> only those
>> c) remember what files i have open and then close only those
>
> I think this would have been implemented by the Apache folks if it
> could be done reliably: they're very keen on performance. Maybe you
> could try the same question with them?

Yes, i can try that.

JonB

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-13 16:25:31 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.