From: fork0@t-online.de (Alex Riesen)
To: Junio C Hamano <junkio@cox.net>
Cc: Linus Torvalds <torvalds@osdl.org>, git@vger.kernel.org
Subject: Re: [PATCH] Speedup recursive by flushing index only once for all entries
Date: Thu, 11 Jan 2007 23:10:53 +0100 [thread overview]
Message-ID: <20070111221053.GD6058@steel.home> (raw)
In-Reply-To: <7vfyah48j2.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano, Thu, Jan 11, 2007 21:23:45 +0100:
> > That said, I think we actually have another problem entirely:
> >
> > Look at "write_cache()", Junio: isn't it leaking memory like mad?
> >
> > Shouldn't we have something like this?
> >
> > It's entirely possible that the _real_ problem with the "flush the index
> > all the time" was that it just caused this bug: tons and tons of lost
> > memory, causing git-merge-recursive to grow explosively (~6MB per
> > cache flush, and a _lot_ of cache flushes), which on a 384MB machine
> > quickly uses up memory and causes totally unnecessary swapping.
>
> You are right -- there is absolutely no reason to retain this
> memory. It is a serialized representation of cache-tree data
> only to be stored in the index, and no other user of this data
> exists. Thanks for spotting this.
>
> Writing out 6MB per every path changed in a merge would still be
> an unnecessary overhead over the one in 'next', so there is no
> reason to replace 'next' with this single liner of yours, but I
> am interested in seeing how much of the 20-minute vs 1-minute
> difference is attributable to this leak, just out of curiosity.
>
> Alex, if you have a chance, could you apply Linus's single-liner
> on top of 'master', without either of the merge-recursive
> patches in 'next', and see what kind of numbers you would get?
With regard to speed: not noticable on the cygwin machine. The
384Mb-laptop liked it: moved into 40-50 sec range (it had real
problems (minutes) doing that merge without at least my first patch.
Because of the leak, as we now understand).
It must have been large leak, as I really have seen the memory usage
dropping down significantly.
next prev parent reply other threads:[~2007-01-11 22:11 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-04 10:47 [PATCH] Speedup recursive by flushing index only once for all entries Alex Riesen
2007-01-04 12:33 ` Johannes Schindelin
2007-01-04 12:47 ` Alex Riesen
2007-01-04 20:22 ` Junio C Hamano
2007-01-05 11:22 ` Alex Riesen
2007-01-07 16:31 ` Alex Riesen
2007-01-10 18:06 ` Junio C Hamano
2007-01-10 19:28 ` Junio C Hamano
2007-01-10 22:11 ` Junio C Hamano
2007-01-10 23:07 ` Alex Riesen
2007-01-10 23:23 ` Linus Torvalds
2007-01-11 8:14 ` Johannes Schindelin
2007-01-11 9:03 ` Alex Riesen
2007-01-11 12:11 ` Alex Riesen
2007-01-11 20:37 ` Junio C Hamano
2007-01-11 9:02 ` Alex Riesen
2007-01-11 16:38 ` Linus Torvalds
2007-01-11 17:43 ` Alex Riesen
2007-01-11 18:02 ` Linus Torvalds
2007-01-11 21:48 ` Alex Riesen
2007-01-11 20:23 ` Junio C Hamano
2007-01-11 22:10 ` Alex Riesen [this message]
2007-01-11 22:28 ` Linus Torvalds
2007-01-11 23:53 ` Junio C Hamano
2007-01-12 0:18 ` Alex Riesen
2007-01-11 0:34 ` Junio C Hamano
2007-01-11 8:15 ` Johannes Schindelin
2007-01-12 15:48 ` Sergey Vlasov
2007-01-12 17:38 ` Alex Riesen
2007-01-12 20:37 ` Sergey Vlasov
2007-01-12 18:23 ` Junio C Hamano
2007-01-12 20:09 ` [PATCH] merge-recursive: do not report the resulting tree object name Junio C Hamano
2007-01-12 23:36 ` Johannes Schindelin
2007-01-13 0:32 ` Junio C Hamano
2007-01-13 0:57 ` Jakub Narebski
2007-01-13 11:01 ` Johannes Schindelin
2007-01-13 5:14 ` Shawn O. Pearce
2007-01-13 7:03 ` Junio C Hamano
2007-01-12 20:30 ` [PATCH] Speedup recursive by flushing index only once for all entries Alex Riesen
2007-01-12 21:07 ` Sergey Vlasov
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=20070111221053.GD6058@steel.home \
--to=fork0@t-online.de \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@gmail.com \
--cc=torvalds@osdl.org \
/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).