Re: Why is the performance of my lvmthin snapshot so poor
Demi Marie Obenour <[email protected]>
| Newsgroups | gmane.linux.lvm.general |
|---|---|
| Message-ID | <Yqrhmwwbp5KfiEWb@itl-email> |
On Wed, Jun 15, 2022 at 03:42:17PM +0800, Zhiyong Ye wrote: > > > 在 6/14/22 10:54 PM, Gionatan Danti 写道: > > Il 2022-06-14 15:29 Zhiyong Ye ha scritto: > > > The reason for this may be that when the volume creates a snapshot, > > > each write to an existing block will cause a COW (Copy-on-write), and > > > the COW is a copy of the entire data block in chunksize, for example, > > > when the chunksize is 64k, even if only 4k of data is written, the > > > entire 64k data block will be copied. I'm not sure if I understand > > > this correctly. > > > > Yes, in your case, the added copies are lowering total available IOPs. > > But note how the decrease is sub-linear (from 64K to 1M you have a 16x > > increase in chunk size but "only" a 10x hit in IOPs): this is due to the > > lowered metadata overhead. > > It seems that the consumption of COW copies when sending 4k requests is much > greater than the loss from metadata. > > > A last try: if you can, please regenerate your thin volume with 64K > > chunks and set fio to execute 64K requests. Lets see if LVM is at least > > smart enough to avoid coping a to-be-completely-overwritten chunks. > > I regenerated the thin volume with the chunksize of 64K and the random write > performance data tested with fio 64k requests is as follows: > case iops > thin lv 9381 > snapshotted thin lv 8307 That seems reasonable. My conclusion is that dm-thin (which is what LVM uses) is not a good fit for workloads with a lot of small random writes and frequent snapshots, due to the 64k minimum chunk size. This also explains why dm-thin does not allow smaller blocks: not only would it only support very small thin pools, it would also have massive metadata write overhead. Hopefully dm-thin v2 will improve the situation. -- Sincerely, Demi Marie Obenour (she/her/hers) Invisible Things Lab _______________________________________________ linux-lvm mailing list [email protected] https://listman.redhat.com/mailman/listinfo/linux-lvm read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdodNnxM2uiJZBxxxsoi1X/+cIsEFAmKq4ZsACgkQsoi1X/+c IsGrmRAApbxwR1U0Iew155alybvuypqJr7yEeTF+w7a6PU5NgO+IFaLLj9N1QZb4 PtfL8kCE/0GANJsmrGPiB1okVxT6BXeKwgDq8qS3vYKBlwoAQ6onXcCFBSSE9dY8 NOi3RTZ0FXiBD00IkMBp3IsD7NuaqU/8apCSbjRhGeHR0q1twHtbt8VeQiDHvoXm XpRjW5UQG26lTwPJjppzmcNN0B6o9jtKKO/2z6u2KAYeQpwCCxHBKQk9xMgIuHRi f/OL2j4Cak+92OihMwhn2IUz5yJ1Y78XhZXibHXbcf+pR+QAq06+dCbxfG2Bzig2 KX4dKRnVeJGTp3iW5ewXo5Gya0edjhLBJrCaRpcccMln8ech7INTAQA2BA6a9YXu Hsy9VoYptoL7m8c2WosE1FwFhYuCb2u5Je7kqe6APDwFNXHzt8Eua9jmaj8Xmq8p 2UI698esi3zaBYN2nLMJTIH/3HCV+BABMU1QKiee5k/sgQO8e3E0LahgNaNcjVef c6D6k0dAqSkU+IKlCflV0X14bDkt6iZNQEcqlPjZCNTG9VsCuKPKB3Ij1zrc9iQ7 QEqGoQpBxpRZVmMbV7E/2LQR0/1qMA5E3opUhqlszPSPH6fmVmIXeXRJ1L7XTJDu i5vHM/CML0mAe+Nb2UfbyGvvZ5pmSPTJgQrY1WIMsmwSMfIKYEk= =7VGx -----END PGP SIGNATURE-----