From: Corey Thompson <cmtptr@gmail.com>
To: Luke Diamand <luke@diamand.org>
Cc: Pete Wyckoff <pw@padd.com>, git@vger.kernel.org
Subject: Re: git-p4 out of memory for very large repository
Date: Fri, 6 Sep 2013 15:03:45 -0400 [thread overview]
Message-ID: <20130906190345.GA3239@jerec> (raw)
In-Reply-To: <5224EA2C.7090001@diamand.org>
On Mon, Sep 02, 2013 at 08:42:36PM +0100, Luke Diamand wrote:
> I guess you could try changing the OOM score for git-fast-import.
>
> change /proc/<pid>/oomadj.
>
> I think a value of -31 would make it very unlikely to be killed.
>
> On 29/08/13 23:46, Pete Wyckoff wrote:
> >I usually just do "git p4 sync @505859". The error message below
> >crops up when things get confused. Usually after a previous
> >error. I tend to destroy the repo and try again. Sorry I don't
> >can't explain better what's happening here. It's not a memory
> >issue; it reports only 24 MB used.
> >
> >Bizarre. There is no good explanation why memory usage would go
> >up to 32 GB (?) within one top interval (3 sec ?). My theory
> >about one gigantic object is debunked: you have only the 118 MB
> >one. Perhaps there's some container or process memory limit, as
> >Luke guessed, but it's not obvious here.
> >
> >The other big hammer is "strace". If you're still interested in
> >playing with this, you could do:
> >
> > strace -vf -tt -s 200 -o /tmp/strace.out git p4 clone ....
> >
> >and hours later, see if something suggests itself toward the
> >end of that output file.
> >
> > -- Pete
>
Finally, I claim success! Unfortunately I did not try either of the OOM
score or strace suggestions - sorry! After spending so much time on
this, I've gotten to the point that I'm more interested in getting it to
work than in figuring out why the direct approach isn't working; it
sounds like you're both pretty confident that git is working as it
should, and I don't maintain the system I'm doing this on so I don't
doubt that there might be some artificial limit or other quirk here that
we just aren't seeing.
Anyway, what I found is that Pete's incremental method does work, I just
have to know how to do it properly! This is what I WAS doing to
generate the error message I pasted several posts ago:
git clone //path/to/branch@<begin>,<stage1>
cd branch
git sync //path/to/branch@<stage2>
# ERROR!
# (I also tried //path/to/branch@<stage1+1>,<stage2>, same error)
Eventually what happened is that I downloaded the free 20-user p4d, set
up a very small repository with only 4 changes, and started some old
fashioned trial-and-error. Here's what I should have been doing all
along:
git clone //path/to/branch@<begin>,<stage1>
cd branch
git sync //path/to/branch@<begin>,<stage2>
git sync //path/to/branch@<begin>,<stage3>
# and so on...
And syncing a few thousand changes every day over the course of the past
week, my git repo is finally up to the Perforce HEAD. So I suppose
ultimately this was my own misunderstanding, partly because when you
begin your range at the original first change number the output looks
suspiciously like it's importing changes again that it's already
imported. Maybe this is all documented somewhere, and if it is I just
failed to find it.
Thanks to both of you for all your help!
Corey
next prev parent reply other threads:[~2013-09-06 19:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-23 1:12 git-p4 out of memory for very large repository Corey Thompson
2013-08-23 7:16 ` Luke Diamand
2013-08-23 11:48 ` Corey Thompson
2013-08-23 11:59 ` Corey Thompson
2013-08-23 19:42 ` Luke Diamand
2013-08-24 0:56 ` Corey Thompson
2013-08-25 15:50 ` Pete Wyckoff
2013-08-26 13:47 ` Corey Thompson
2013-08-28 15:41 ` Corey Thompson
2013-08-29 22:46 ` Pete Wyckoff
2013-09-02 19:42 ` Luke Diamand
2013-09-06 19:03 ` Corey Thompson [this message]
2013-09-07 8:19 ` Pete Wyckoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130906190345.GA3239@jerec \
--to=cmtptr@gmail.com \
--cc=git@vger.kernel.org \
--cc=luke@diamand.org \
--cc=pw@padd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).