From Fedora Project Wiki
 
(53 intermediate revisions by 3 users not shown)
Line 1: Line 1:
= SSDcache =
= SSD cache (bcache) =
This page originally covered SSD caching in general targeted for Fedora 20, including both dm-cache and bcache. In the processes it became clear that introducing basic bcache support was feasable for Fedora 20 and dm-cache had te be postponed until later.


== Summary ==
== Summary ==
Using recent kernel (3.9 and later) features for (fast) SSD caching of (slow) ordinary hard disks.
Using recent kernel (3.9 and later) features for (fast) SSD caching of (slow) ordinary hard disks. Currently two kinds of SSD caching are available in the Linux kernel: bcache and dm-cache. In Fedora 20 basic bcache support is provided by the "bcache-tools" package, with small changes in util-linux, dracut and lvm2 as well. This page now provides suggestions on how to move forward in Fedora 22.


== Owner ==
The Change described on this page is to implement bcache support in Anaconda, which allows easy installation of Fedora on "bcached" root-FS and support for existing (root or non-root) bcache partitions during Fedora installation.
 
Moving forward with dm-cache is not covered by this page, because the LVM team already plans to integrate dm-cache support in LVM2. See http://www.redhat.com/archives/dm-devel/2014-January/msg00072.html
 
== Owners ==


* Name: [[User:rolffokkens|Rolf Fokkens]]
* Name: [[User:rolffokkens|Rolf Fokkens]]
* Email: rolf@rolffokkens.nl
* Email: rolf@rolffokkens.nl
* Name: [[User:dlehman|Dave Lehman]]
* Email: dlehman AT fedoraproject
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> -->
* Release notes owner: <!--- To be assigned by docs team [[User:FASAccountName| Release notes owner name]] <email address> -->
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
Line 14: Line 21:


== Current status ==
== Current status ==
* Targeted release: [[Releases/20|Fedora 20]]  
* Targeted release: [[Releases/22|Fedora 22]]  
* Last updated: 2013-06-25
* Last updated: 2014-03-16
<!-- After the change proposal is accepted by FESCo, tracking bug is created in Bugzilla and linked to this page  
<!-- After the change proposal is accepted by FESCo, tracking bug is created in Bugzilla and linked to this page  
Bugzilla states meaning as usual:
Bugzilla states meaning as usual:
Line 24: Line 31:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=998543 #998543]


== Detailed Description ==
== Detailed Description ==
Recent Linux kernels support the use of Solid State Drives as caches for rotational hard disks. Because the high cost per GB for SSD devices this feature may bring the best of both: fast end big yet affordable storage capacity. Linux kernel 3.9 introduced dm-cache, kernel 3.10 introduces bcache.
Recent Linux kernels support the use of Solid State Drives as caches for rotational hard disks. Because the high cost per GB for SSD devices this feature may bring the best of both: fast end big yet affordable storage capacity. Linux kernel 3.9 introduced dm-cache, kernel 3.10 introduces bcache.
The introduction of bcache-tools in Fedora 20, and minor changes to util-linux, dracut and lvm2 allowed users to create SSD-cached block devices on which they could create bcache filesystems and/or LVM volumes. Creating a bcache root FS is possible using bcache-tools, but complicated because bcache requires a "fresh" block device destroying all data currently on it. Solving this involves adding bcache support in Anaconda. This covers both support for "manually created" (bcache-tools) bcached filesystems, and support for creating a bcached root FS. (Implementing bcache support in Anaconda can't be done by me, and needs to be done by the Anaconda team, hence I consider this a suggestion. Discussions on this topic with dlehman indicated an estimated effort of 1-2 weeks to implement).
Moving forward with dm-cache is not covered by this page because the LVM team already plans to integrate dm-cache support in LVM2. See http://www.redhat.com/archives/dm-devel/2014-January/msg00072.html. It should be noted that (in contrast to bcache) dm-cache support may not require Anaconda changes because it'll be an integral part of lvm2.
Related Bugzilla's:
* https://bugzilla.redhat.com/show_bug.cgi?id=1003208
* https://bugzilla.redhat.com/show_bug.cgi?id=1019442


== Benefit to Fedora ==
== Benefit to Fedora ==
<!-- What is the benefit to the platform?  If this is a major capability update, what has changed?  If this is a new functionality, what capabilities does it bring? Why will Fedora become a better distribution or project because of this proposal?-->
The availability of bcache-tools in Fedora 20 already brought the speed of SSD's to Fedora users, while also bringing the capacity of HDD's. This was limited however to expert Fedora users who feel comfortable using te command line.
 
The SSD caching support in Fedora 20 will become available to more Fedora users when Anaconda will support this in Fedora 22.


== Scope ==
== Scope ==


* Proposal owners: Enable caching features in new kernels
* Proposal owners: build and test blocks package (or include blocks in bcache-tools), support Anaconda team when needed, test Anaconda.


* Other developers: Support the caching features in their respective packages. Special focus should be on making the system boot from a cached root FS.
* Other developers: Build bcache support in Anaconda (by Anaconda team)


* Release engineering: All packages should operate in close harmony te make this work. Only a rebuild of the relevant packages is required.
* Release engineering:  


* Policies and guidelines: No changes I think.
* Policies and guidelines:


== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->
All existing Fedora functionality remains as is.
 
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)


== How To Test ==
== How To Test ==
Implementing a caching root FS requires a reinstall for sure, because caching cannot be added to existing volumes!
Testing involves doing a clean install of Fedora, while configuring in anaconda a cached root FS. After the installation the cache state should be checked (if it is operational or not.
Testing involves doing a clean install of Fedora, while configuring in anaconda a cached root FS. After the installation the cache state should be checked (if it is operational or not.


Line 59: Line 72:


== User Experience ==
== User Experience ==
<!-- If this change proposal is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
Users should experience improved storage performance after easy installation of Fedora in bcache devices.
<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
N/A (not a System Wide Change)


== Dependencies ==
== Dependencies ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this change depends?  In other words, completion of another change owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel change)? -->
Anaconda will depend on bcache tools


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
== Contingency Plan ==
N/A (not a System Wide Change)


== Contingency Plan ==
* Contingency mechanism: Revert bcache changes in Anaconda, revoke the blocks package.
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* Contingency deadline: beta freeze
* Contingency mechanism: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Blocks release? No
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Contingency deadline: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? N/A (not a System Wide Change), Yes/No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->


== Documentation ==
== Documentation ==
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/bcache.txt


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
https://github.com/g2p/bcache-tools
N/A (not a System Wide Change)


== Release Notes ==
== Release Notes ==
Line 91: Line 96:


[[Category:ChangePageIncomplete]]
[[Category:ChangePageIncomplete]]
<!-- When your change proposal page is completed and ready for review and announcement -->
[[Category:SelfContainedChange]]
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- The Wrangler announces the Change to the devel-announce list and changes the category to Category:ChangeAnnounced (no action required) -->
<!-- After review, the Wrangler will move your page to Category:ChangeReadyForFesco... if it still needs more work it will move back to Category:ChangePageIncomplete-->
 
<!-- Select proper category, default is Self Contained Change -->
<!-- [[Category:SelfContainedChange]] -->
[[Category:SystemWideChange]]

Latest revision as of 19:40, 9 April 2014

SSD cache (bcache)

This page originally covered SSD caching in general targeted for Fedora 20, including both dm-cache and bcache. In the processes it became clear that introducing basic bcache support was feasable for Fedora 20 and dm-cache had te be postponed until later.

Summary

Using recent kernel (3.9 and later) features for (fast) SSD caching of (slow) ordinary hard disks. Currently two kinds of SSD caching are available in the Linux kernel: bcache and dm-cache. In Fedora 20 basic bcache support is provided by the "bcache-tools" package, with small changes in util-linux, dracut and lvm2 as well. This page now provides suggestions on how to move forward in Fedora 22.

The Change described on this page is to implement bcache support in Anaconda, which allows easy installation of Fedora on "bcached" root-FS and support for existing (root or non-root) bcache partitions during Fedora installation.

Moving forward with dm-cache is not covered by this page, because the LVM team already plans to integrate dm-cache support in LVM2. See http://www.redhat.com/archives/dm-devel/2014-January/msg00072.html

Owners

  • Name: Rolf Fokkens
  • Email: rolf@rolffokkens.nl
  • Name: Dave Lehman
  • Email: dlehman AT fedoraproject
  • Release notes owner:

Current status

Detailed Description

Recent Linux kernels support the use of Solid State Drives as caches for rotational hard disks. Because the high cost per GB for SSD devices this feature may bring the best of both: fast end big yet affordable storage capacity. Linux kernel 3.9 introduced dm-cache, kernel 3.10 introduces bcache.

The introduction of bcache-tools in Fedora 20, and minor changes to util-linux, dracut and lvm2 allowed users to create SSD-cached block devices on which they could create bcache filesystems and/or LVM volumes. Creating a bcache root FS is possible using bcache-tools, but complicated because bcache requires a "fresh" block device destroying all data currently on it. Solving this involves adding bcache support in Anaconda. This covers both support for "manually created" (bcache-tools) bcached filesystems, and support for creating a bcached root FS. (Implementing bcache support in Anaconda can't be done by me, and needs to be done by the Anaconda team, hence I consider this a suggestion. Discussions on this topic with dlehman indicated an estimated effort of 1-2 weeks to implement).


Moving forward with dm-cache is not covered by this page because the LVM team already plans to integrate dm-cache support in LVM2. See http://www.redhat.com/archives/dm-devel/2014-January/msg00072.html. It should be noted that (in contrast to bcache) dm-cache support may not require Anaconda changes because it'll be an integral part of lvm2.

Related Bugzilla's:

Benefit to Fedora

The availability of bcache-tools in Fedora 20 already brought the speed of SSD's to Fedora users, while also bringing the capacity of HDD's. This was limited however to expert Fedora users who feel comfortable using te command line.

The SSD caching support in Fedora 20 will become available to more Fedora users when Anaconda will support this in Fedora 22.

Scope

  • Proposal owners: build and test blocks package (or include blocks in bcache-tools), support Anaconda team when needed, test Anaconda.
  • Other developers: Build bcache support in Anaconda (by Anaconda team)
  • Release engineering:
  • Policies and guidelines:

Upgrade/compatibility impact

All existing Fedora functionality remains as is.

How To Test

Testing involves doing a clean install of Fedora, while configuring in anaconda a cached root FS. After the installation the cache state should be checked (if it is operational or not.

Additional tests:

  • run benchmarks (see performance improvement over non cached storage)
  • update the kernel (see if dracut builds a functional initramfs including caching
  • ...

User Experience

Users should experience improved storage performance after easy installation of Fedora in bcache devices.

Dependencies

Anaconda will depend on bcache tools

Contingency Plan

  • Contingency mechanism: Revert bcache changes in Anaconda, revoke the blocks package.
  • Contingency deadline: beta freeze
  • Blocks release? No

Documentation

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/bcache.txt

https://github.com/g2p/bcache-tools

Release Notes