Re: oprofile on svn import

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Linus: I hope I'm right on [1] (the stuff about fork).

Jon Smirl <jonsmirl@xxxxxxxxx> wrote:
> On 6/13/06, Eric Wong <normalperson@xxxxxxxx> wrote:
> >Jon Smirl <jonsmirl@xxxxxxxxx> wrote:
> >> I'm going back to cvsimport tomorrow. My svn import that had been
> >> running for five days got killed this morning when the city decided to
> >> move the telephone pole that provides my electricty.
> >>
> >> Some oprofile data, this doesn't make a lot of sense to me. Why is it
> >> in libcypto so much?
> >
> >The sha1 calculation is done in libcrypto, afaik.
> 
> That make sense, but it's eating up 14% of my CPU in a long sample.
> 
> >Anybody want to see how my latest patches to git-svn (and using SVN perl
> >libraries) stacks up against the mozilla repo?  Speedwise, I don't
> >expect git-svn to be too different than git-svnimport, but it should use
> >much less memory (I'll probably port the hacks to git-svnimport, too).
> 
> Can svnimport be rewritten to avoid calling fork? If I am reading the
> oprofiles correctly that fork is very expensive especially when the
> svnimport task grows to 600MB.

I think the problem is the process growing to 600MB, and not the fork :)
git-svn avoids process growth pretty well from my tests with the gcc
repo.

See the fetch_lib() function in this patch on how I avoid process
growth by _using_ fork():

Subject: [PATCH 12/13] git-svn: add support for Perl SVN::* libraries
	(<115022175180-git-send-email-normalperson@xxxxxxxx>)

Perl processes (at least on my machines (5.8.x, Linux x86) don't like to
release memory back to the OS when they're done using it (although it
can reuse the memory within the process itself).  This is why SVN::Pool
isn't very effective in many cases.

fork() will only duplicate memory for the pages that are changed by the
child, not the entire process[1].  So I fork children that run temporarily
to avoid accumulating memory usage inside the process.

This technique should probably be added to git-svnimport as well.

> I have an import running but post your code when it is ready and I can
> try it on the next run. They always seem to fail so there will
> probably be another run.

I've posted a two series of patches the past few days that have yet
to be merged by Junio:

Subject: [PATCH] git-svn: bug fixes (some resends)
	<11500094252972-git-send-email-normalperson@xxxxxxxx>
Subject: [PATCH 0/13] git-svn: better branch support, SVN:: lib usage, feature additions
	<11502217352245-git-send-email-normalperson@xxxxxxxx>

-- 
Eric Wong
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]