git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* is commitGraph useful on the server side?
@ 2019-10-22 16:51 Konstantin Ryabitsev
  2019-10-22 19:44 ` Derrick Stolee
  0 siblings, 1 reply; 5+ messages in thread
From: Konstantin Ryabitsev @ 2019-10-22 16:51 UTC (permalink / raw)
  To: git

Hi, all:

I've read the docs on commitGraph and it's not 100% clear to me if 
turning it on and generating commit graphs would be useful on the 
server-side. I know it's going to be enabled by default and 
automatically generated whenever "git gc" runs, so I'm trying to figure 
out if it'll be useful for git-daemon operations.

Thanks in advance for your help.

Best,
-K

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is commitGraph useful on the server side?
  2019-10-22 16:51 is commitGraph useful on the server side? Konstantin Ryabitsev
@ 2019-10-22 19:44 ` Derrick Stolee
  2019-10-22 20:06   ` Jeff King
  2019-10-22 20:07   ` Jeff King
  0 siblings, 2 replies; 5+ messages in thread
From: Derrick Stolee @ 2019-10-22 19:44 UTC (permalink / raw)
  To: git, Taylor Blau

On 10/22/2019 12:51 PM, Konstantin Ryabitsev wrote:
> Hi, all:
> 
> I've read the docs on commitGraph and it's not 100% clear to me if turning it on and generating commit graphs would be useful on the server-side. I know it's going to be enabled by default and automatically generated whenever "git gc" runs, so I'm trying to figure out if it'll be useful for git-daemon operations.
> 
> Thanks in advance for your help.

I've CC'd Taylor Blau for more information here.

I'm biased, but I think the commit-graph is generally really good to have
in almost all cases. I actually do not know of a good reason to _not_ have
it.

If you are managing reachability bitmaps, then most of the server-side
stuff will use the bitmaps instead. However, creating those bitmaps will
be slightly faster with the commit-graph.

If you don't use bitmaps, then the commit-graph will help fetch negotiation
and many other commit-walk experiences.

If you have a lot of machinery around your server maintenance, then you
can schedule commit-graph updates more frequently than bitmap computations,
and you would get benefit by parsing commits faster in the zone "above" the
bitmaps.

Thanks,
-Stolee

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is commitGraph useful on the server side?
  2019-10-22 19:44 ` Derrick Stolee
@ 2019-10-22 20:06   ` Jeff King
  2019-10-22 20:39     ` Konstantin Ryabitsev
  2019-10-22 20:07   ` Jeff King
  1 sibling, 1 reply; 5+ messages in thread
From: Jeff King @ 2019-10-22 20:06 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: git, Taylor Blau

On Tue, Oct 22, 2019 at 03:44:28PM -0400, Derrick Stolee wrote:

> I'm biased, but I think the commit-graph is generally really good to have
> in almost all cases. I actually do not know of a good reason to _not_ have
> it.

A lot depends on how much you do on the server. If you're serving a web
interface that runs things like `rev-list`, or `for-each-ref
--contains`, etc, then you should see a big improvement.

If you're _just_ serving fetches with `upload-pack`, you might see some
small improvement during fetch negotiation. But I suspect it would be
dwarfed by the cost of actually generating packs. Likewise, the
traversal there will be dominated by accessing trees (and if that is
expensive, then you ought to be using reachability bitmaps).

But I agree that there's no reason _not_ to use them.

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is commitGraph useful on the server side?
  2019-10-22 19:44 ` Derrick Stolee
  2019-10-22 20:06   ` Jeff King
@ 2019-10-22 20:07   ` Jeff King
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff King @ 2019-10-22 20:07 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: Konstantin Ryabitsev, git, Taylor Blau

[resending, looks like we lost Konstantin from the cc]

On Tue, Oct 22, 2019 at 03:44:28PM -0400, Derrick Stolee wrote:

> I'm biased, but I think the commit-graph is generally really good to have
> in almost all cases. I actually do not know of a good reason to _not_ have
> it.

A lot depends on how much you do on the server. If you're serving a web
interface that runs things like `rev-list`, or `for-each-ref
--contains`, etc, then you should see a big improvement.

If you're _just_ serving fetches with `upload-pack`, you might see some
small improvement during fetch negotiation. But I suspect it would be
dwarfed by the cost of actually generating packs. Likewise, the
traversal there will be dominated by accessing trees (and if that is
expensive, then you ought to be using reachability bitmaps).

But I agree that there's no reason _not_ to use them.

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: is commitGraph useful on the server side?
  2019-10-22 20:06   ` Jeff King
@ 2019-10-22 20:39     ` Konstantin Ryabitsev
  0 siblings, 0 replies; 5+ messages in thread
From: Konstantin Ryabitsev @ 2019-10-22 20:39 UTC (permalink / raw)
  To: Jeff King; +Cc: Derrick Stolee, git, Taylor Blau

On Tue, Oct 22, 2019 at 04:06:16PM -0400, Jeff King wrote:
>> I'm biased, but I think the commit-graph is generally really good to 
>> have
>> in almost all cases. I actually do not know of a good reason to _not_ have
>> it.
>
>A lot depends on how much you do on the server. If you're serving a web
>interface that runs things like `rev-list`, or `for-each-ref
>--contains`, etc, then you should see a big improvement.

Ah, good to know, so something like cgit would see an improvement if 
there are commit graphs generated for the repos it serves.

>If you're _just_ serving fetches with `upload-pack`, you might see some
>small improvement during fetch negotiation. But I suspect it would be
>dwarfed by the cost of actually generating packs. Likewise, the
>traversal there will be dominated by accessing trees (and if that is
>expensive, then you ought to be using reachability bitmaps).

We do generate bitmaps on a routine basis.

OK, I think I'm convinced that enabling commitgraph and generating them 
regularly is going to be a net win.

Thanks, everyone.

-K


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-10-22 20:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22 16:51 is commitGraph useful on the server side? Konstantin Ryabitsev
2019-10-22 19:44 ` Derrick Stolee
2019-10-22 20:06   ` Jeff King
2019-10-22 20:39     ` Konstantin Ryabitsev
2019-10-22 20:07   ` Jeff King

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).