Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
When larger dm-writecache devices are created, memory usage may be excessive and unexpected. Requesting some calculation at lvcreate time to say "warning, this will take up x memory, if you have less than y total memory, you may need to think about adding additional ram". This is just a suggestion, other warning ideas may be better.
Also requesting the presence of the large memory footprint be added to the lvm documentation.
Version-Release number of selected component (if applicable):
lvm2-2.03.12-10.el8.
How reproducible:
Every time
Steps to Reproduce:
Create large dm-writecache device. Observe memory use.
Actual results:
Large memory use.
Expected results:
If large memory use is expected, there should be a warning at lvcreate and also a mention in the documentation.
(Moving this to RHEL9 as a new feature which can then be backported to RHEL8.)
This same thing was requested by Corey in bug 1855038 (which was autoclosed.)
When setting up writecache, if the cachevol size is > 50% of main memory, I'll have it print:
WARNING: writecache will use X GiB of system memory (Y GiB).
And if the cachevol size is > 90% of memory, I'll follow this warning with a confirmation prompt:
Continue to use writecache? [y/n]
I've already added the following to lvmcache(7) man page:
dm-writecache memory usage
The amount of main system memory used by dm-writecache can be a factor
when selecting the writecache cachevol size and the writecache block
size.
• writecache block size 4096: each 100 GiB of writecache cachevol uses
slighly over 2 GiB of system memory.
• writecache block size 512: each 100 GiB of writecache cachevol uses a
little over 16 GiB of system memory.
Marking Verified:Tested in the latest rpms.
# RHEL9.1
kernel-5.14.0-127.el9 BUILT: Sat Jul 9 06:54:36 AM CDT 2022
lvm2-2.03.16-2.el9 BUILT: Thu Jul 14 11:45:18 AM CDT 2022
lvm2-libs-2.03.16-2.el9 BUILT: Thu Jul 14 11:45:18 AM CDT 2022
dm-writecache memory usage
The amount of main system memory used by dm-writecache can be a factor when selecting the writecache cachevol size and the writecache block size.
⢠writecache block size 4096: each 100 GiB of writecache cachevol uses slighly over 2 GiB of system memory.
⢠writecache block size 512: each 100 GiB of writecache cachevol uses a little over 16 GiB of system memory.
[root@hayes-03 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
wc_lv vdo_sanity -wi-a----- 2.00t /dev/sdi1(142467)
wc_lv vdo_sanity -wi-a----- 2.00t /dev/sde1(0)
wc_lv vdo_sanity -wi-a----- 2.00t /dev/sdd1(0)
write vdo_sanity -wi------- 6.00t /dev/sdf1(0)
write vdo_sanity -wi------- 6.00t /dev/sdg1(0)
write vdo_sanity -wi------- 6.00t /dev/sdh1(0)
write vdo_sanity -wi------- 6.00t /dev/sdi1(0)
[root@hayes-03 ~]# lvconvert --yes --type writecache --cachevol vdo_sanity/write vdo_sanity/wc_lv
Using writecache block size 4096 for unknown file system block size, logical block size 512, physical block size 4096.
WARNING: unable to detect a file system block size on vdo_sanity/wc_lv
WARNING: using a writecache block size larger than the file system block size may corrupt the file system.
WARNING: writecache size 6.00 TiB will use 132 GiB of system memory (251 GiB).
Logical volume vdo_sanity/wc_lv now has writecache.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:8358