Mercurial Crashing: Out of Memory

Matt Mackall mpm at selenic.com
Fri Sep 28 22:35:20 UTC 2012


On Fri, 2012-09-28 at 18:19 +0000, Jensen, Aaron wrote:
> > Just as a point of clarity, what you describe is not a 'crash', which is an uncontrolled failure. 
> 
> Thank you, yes.
> 
> 
> > Does enabling a few gig of swap help?
> 
> I'll talk to our operations group about that.  They manage the servers where we're getting RAM errors.
> 
> 
> > I would expect that to work even on a 32-bit system (which has a maximum of 2G of address space). Mercurial's delta algorithm chunks based on linefeed 
> > bytes, does this file have lots of very short lines?
> 
> Yes.  The files are exports of database tables.  Each line is a row.  This file has 1,814,885 rows, each between 115 and 158 bytes.  

So the answer is actually no. It has longer-than-a-typical-line-of-text
lines, and thus fewer lines lines than you would expect for a file of
its size.

If it had, say, lots of 2-character lines, then there could be 50x as
many lines, and 50x as much overhead associated with tracking lines
(which might start to dominate memory usage).

Please send the output of

$ hg debugrevlog .hg/store/data/path/to/my/file.i

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list