From: Matthew Sakai <msakai@redhat.com>
To: June Park <june@pythonplayer123.dev>, dm-devel@lists.linux.dev
Subject: Re: [PATCH 1/2] vdo: add zstd compression support
Date: Fri, 7 Aug 2026 21:37:57 -0400 [thread overview]
Message-ID: <25a53d68-e1ab-4262-9ee4-36dac5980fa0@redhat.com> (raw)
In-Reply-To: <012e81d2-dd6e-4977-b385-d7ac890be2a2@pythonplayer123.dev>
On 7/27/26 9:43 AM, June Park wrote:
> Hello! Thank you for the thoughtful comments.
Thank you for your patience. This took me longer to get to than I had hoped.
>> I have to ask, what is the motivation for this change? Do you have a workload that shows some kind of improvement from this proposal?
>
> My initial testing in QEMU, storing files from the kernel source tree, showed noticeable improvements in compression ratio (around 2.4 to 3.5), even though vdo uses small block sizes. However, I did notice that certain types of data (such as long synthetic streams of repeating bytes) showed far less improvement with zstd, at the expense of more CPU cycles. I had concluded that it could outperform LZ4 in some workloads in terms of compression ratio, for more CPU, a trade-off that could be made on a case-by-case basis.
If you have data handy from these experiments, it would be interesting
to see it. This is the sort of information that would go well in a cover
letter explaining what you want to do, and why. At any rate, if you have
cases that seem to benefit from this, we can certainly revisit whether
this is worth adding.
Another thing to consider is that we originally chose the LZ4 algorithm
because it is fairly cheap to compute. If you can, it's worth trying to
quantify what the extra computational load does to vdo throughput,
especially with fast storage. The throughput for a vdo volume will often
lag the raw storage speed significantly (due to the deduplication
machinery) and it's worth knowing if changing the algorithm will make
that worse.
> The discussion you linked to proposes the ability to swap the algorithm without reformatting. My current implementation tries to reduce breaking changes as much as possible, so I had decided on storing the compression algorithm directly in the volume geometry, instead of for every block. This has the downside of requiring reformatting, but since the focus of vdo is deduplication, I don't think the large amounts of additional machinery needed to support live changes is justified.
I appreciate that you're attempting to minimize disruption. I admit that
it is simpler, in terms of pure implementation, to make this a
format-time choice. However, imagine what happen next: Long-time vdo
users will inquire whether they can use this new feature, and we will
have to tell them no. For new users, I think they may not know all the
data they will store on a volume up front, but they will be locked into
their first choice. Given the case-by-case variability of the tradeoff,
I expect users will appreciate being able to change this setting to fit
their current needs.
In short, doing this as a format-only option looks like implementing
half a feature to me, and I think we would be better off starting with
full flexibility. Also remember that every version of this feature that
we expose to users is a feature we will have to maintain for the
lifetime of the dm-vdo driver, and I would rather not have to support
both versions.
(I believe the difference in complexity is also not that large, but
that's a bit more subjective. Setting the algorithm as a run-time option
means extending the compressed block format, but adding a format-time
option involves more work updating the user space tools, including the
formatter. Both options also require updating the table line and the
super block format, so there's also considerable overlap.)
So anyway. If you can show there is utility in doing this, we can look
at adding it. I will probably want to do it by building on what we did
last year, though. You can look at what I've already done on the branch
feature/allow-compression-configuration in the vdo-devel project. I
haven't rebased the branch in a while, but you can get an idea of how I
was planning the table line and super block changes, at least.
> June
>
Matt
next prev parent reply other threads:[~2026-08-08 1:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 16:13 [PATCH 1/2] vdo: add zstd compression support Rhajune Park
2026-07-23 16:13 ` [PATCH 2/2] Documentation: device-mapper: document VDO zstd Rhajune Park
2026-07-23 16:18 ` Matthew Sakai
2026-07-23 16:21 ` Matthew Sakai
2026-07-24 1:28 ` [PATCH 1/2] vdo: add zstd compression support Matthew Sakai
2026-07-27 13:43 ` June Park
2026-08-05 0:37 ` Matthew Sakai
2026-08-08 1:37 ` Matthew Sakai [this message]
2026-08-10 1:20 ` June Park
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=25a53d68-e1ab-4262-9ee4-36dac5980fa0@redhat.com \
--to=msakai@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=june@pythonplayer123.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.