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.
Bug 1000597 - introduce thin provisioning profiles for "performance" and "many snapshots"
Summary: introduce thin provisioning profiles for "performance" and "many snapshots"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-23 19:32 UTC by Mike Snitzer
Modified: 2021-09-08 20:28 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.103-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 10:59:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike Snitzer 2013-08-23 19:32:55 UTC
Description of problem:
We need 2 profiles that provide a heuristic for establishing a reaosnable default for the targeted usecase:
1) performance
2) many snapshots

These profiles will be exposed to users when configuring thinp at install time via anaconda selection.  If on the commandline the user can use: lvcreate --profile ...

Additional info:
The specifics of what the corresponding heuristics should be are TBD.

BUT, initial thoughts are:
1) performance - if pool's data device's 'optimal_io_size' is >= 512K use it.
Otherwise, use some default like 512K.
2) many snapshots - if pool's data device's 'minimun_io_size' is >= 64K use it.
Otherwise, use some default like 64K.

SO this speaks to the need to factor out and/or expose lvm2's code that looks up a device's IO hints (minimum_io_size and optimal_io_size).

Comment 2 Peter Rajnoha 2013-09-18 15:07:22 UTC
(In reply to Mike Snitzer from comment #0)
> BUT, initial thoughts are:
> 1) performance - if pool's data device's 'optimal_io_size' is >= 512K use it.

Mike, what if there are more devices with different IO hints that make the pool's data device? I guess the least common multiple of those values should be used then, right?

Comment 3 Peter Rajnoha 2013-09-25 14:15:23 UTC
Initial patchset in upstream now:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=8bf425005c8a25e9b99a617a6cf7d9d826ad5f6a

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=cc9e65c391f9070c4b06a94a0ffdb9c61cf89c13

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=78cba8eb3fa262c2c4e1a5c5a3db3e4e0d7e6900

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=78cba8eb3fa262c2c4e1a5c5a3db3e4e0d7e6900

There's a new lvm.conf option "thin_pool_chunk_size_calculation":

+ # Specify chunk size calculation method for thin pool volumes.
+ # Possible options are:
+ # "default" - if thin_pool_chunk_size is defined, use it.
+ # Otherwise, calcucate the chunk size based on
+ # estimation and device hints exposed in sysfs:
+ # the minimum_io_size. The chunk size is always
+ # at least 64KiB.
+ #
+ # "performance" - if thin_pool_chunk_size is defined, use it.
+ # Otherwise, calculate the chunk size for
+ # performance based on device hints exposed in
+ # sysfs: the optimal_io_size. The chunk size is
+ # always at least 512KiB.
+ # thin_pool_chunk_size_calculation = "default"

This is then used in "thin-performance.profile" (together with allocation/thin_pool_zero=0). More tunables that will be set in this profile may follow...

To use the profile, just use "--profile thin-performance" with vgcreate/lvcreate command.

Comment 4 Peter Rajnoha 2013-09-25 14:18:42 UTC
(In reply to Peter Rajnoha from comment #3)
> Initial patchset in upstream now:
> 
> https://git.fedorahosted.org/cgit/lvm2.git/commit/
> ?id=8bf425005c8a25e9b99a617a6cf7d9d826ad5f6a
> 
> https://git.fedorahosted.org/cgit/lvm2.git/commit/
> ?id=cc9e65c391f9070c4b06a94a0ffdb9c61cf89c13
> 
> https://git.fedorahosted.org/cgit/lvm2.git/commit/
> ?id=78cba8eb3fa262c2c4e1a5c5a3db3e4e0d7e6900

+

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=dd796d6a9485287973e61c427ee45694965203a0

Comment 6 Peter Rajnoha 2014-04-01 13:54:20 UTC
Upstream test script - similar/same logic can be used to test this BZ:

https://git.fedorahosted.org/cgit/lvm2.git/commit/?id=504c328e3d2c0a8b6b946fe7d323e1f28887e285

Comment 7 Peter Rajnoha 2014-04-01 14:00:32 UTC
The "many-snapshots" profile in the summary is the default behaviour without any profile defined, which is this configuration exactly at the moment:
  allocation/chunk_size_calculation_policy="generic"
  allocation/thin_pool_zero="1"

The "performance" profile is the "thin-performance.profile" found in /etc/lvm/profile dir and it's this configuration:
  allocation/chunk_size_calculation_policy="performance"
  allocation/thin_pool_zero="0"

Comment 9 Corey Marthaler 2014-04-15 15:39:58 UTC
Marking verified in the latest rpms.

3.10.0-116.el7.x86_64
lvm2-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
lvm2-libs-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
lvm2-cluster-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-libs-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-event-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-event-libs-1.02.84-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014
device-mapper-persistent-data-0.3.0-1.el7    BUILT: Fri Mar 28 07:42:24 CDT 2014
cmirror-2.02.105-14.el7    BUILT: Wed Mar 26 08:29:41 CDT 2014

Comment 10 Ludek Smid 2014-06-13 10:59:10 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


Note You need to log in before you can comment on or make changes to this bug.