Red Hat Bugzilla – Bug 1000597
introduce thin provisioning profiles for "performance" and "many snapshots"
Last modified: 2014-06-17 21:19:31 EDT
Description of problem:
We need 2 profiles that provide a heuristic for establishing a reaosnable default for the targeted usecase:
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 ...
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).
(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?
Initial patchset in upstream now:
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.
(In reply to Peter Rajnoha from comment #3)
> Initial patchset in upstream now:
Upstream test script - similar/same logic can be used to test this BZ:
The "many-snapshots" profile in the summary is the default behaviour without any profile defined, which is this configuration exactly at the moment:
The "performance" profile is the "thin-performance.profile" found in /etc/lvm/profile dir and it's this configuration:
Marking verified in the latest rpms.
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
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.