Thread (10 messages) flat view 10 messages, 5 authors, 2016-06-15

Re: oprofile on svn import

From: Eric Wong <hidden>
Date: 2016-06-15 22:42:29

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

Jon Smirl [off-list ref] wrote:
On 6/13/06, Eric Wong [off-list ref] wrote:
quoted
Jon Smirl [off-list ref] wrote:
quoted
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.
quoted
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
	([ref])

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)
	[ref]
Subject: [PATCH 0/13] git-svn: better branch support, SVN:: lib usage, feature additions
	[ref]

-- 
Eric Wong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help