From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: revisiting zstd timings
Date: Mon, 24 Oct 2016 14:36:31 -0700 [thread overview]
Message-ID: <xmqqh981too0.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20161023080552.lma2v6zxmyaiiqz5@sigill.intra.peff.net> (Jeff King's message of "Sun, 23 Oct 2016 04:05:52 -0400")
Jeff King <peff@peff.net> writes:
> If we were designing git today, it seems like a no-brainer to use zstd
> over zlib. But given backwards-compatibility issues, I'm not sure.
> 10-20% speedup on reading is awfully nice, but I don't think there's a
> good way to gracefully transition, because zlib is part of the
> on-the-wire format for serving objects. We could re-compress on the fly,
> but that gets expensive (in existing cases, we can quite often serve the
> zlib content straight from disk, but this would require an extra
> inflate/deflate. At least we wouldn't have to reconstitute objects from
> deltas, though).
>
> A transition would probably look something like:
>
> 0. The patch below, or something like it, to teach git to read both
> zlib and zstd, and optionally write zstd. We'd probably want to
> make this an unconditional requirement like zlib, because the point
> is for it to be available everywhere (I assume the zstd code is
> pretty portable, but I haven't put it to the test).
>
> 1. Another patch to add a "zstd" capability to the protocol. This
> would require teaching pack-objects an option to convert zstd back
> to zlib on the fly.
>
> Servers which handle a limited number of updated clients can switch
> to zstd immediately to get the benefit, and their clients can
> handle it directly. Likewise, clients of older servers may wish to
> repack locally using zstd to get the benefit. They'll have to
> recompress on the fly during push, but pushes are rare than other
> operations (and often limited by bandwidth anyway).
>
> 2. After a while, eventually flip the default to zstd=5.
>
> 3. If "a while" is long enough, perhaps add a patch to let servers
> tell clients "go upgrade" rather than recompressing on the fly.
>
> I don't have immediate plans for any of that, but maybe something to
> think about.
Thanks for a write-up. This is quite interesting.
Thanks to d98b46f8d, this does not have to impact the object naming
;-)
prev parent reply other threads:[~2016-10-24 21:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-23 8:05 revisiting zstd timings Jeff King
2016-10-24 21:36 ` Junio C Hamano [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqh981too0.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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.
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).