SlideShare a Scribd company logo
1 of 28
Bcache
and
Aerospike
LSPE
Dec 20, 2014
Anshu Prateek
Devops, Aerospike
Agenda
● Bcache
● What is bcache?
– Features
● Why bcache?
● How to use bcache?
● Why bcache with Aerospike?
● Anshu Prateek
● Aerospike Devops Lead
● Ex - Yahoo! Search Operations
● http://about.me/anshuprateek
● anshu@aerospike.com
bcache
● Block – cache
● cache in the Linux kernel's block layer
● Starting Kernel >=3.10 (June 2013)
bcache?
● Kent Overstreet
● http://bcache.evilpiepirate.org
● https://github.com/g2p/bcache-tools.git
● GNU General Public License (GPL)
What is bcache?
● creates hybrid volumes and provides
performance improvements
● one or more fast storage devices, such as
flash-based solid-state drives (SSDs), to act as
a cache for one or more slower storage
devices, such as hard disk drives
What is bcache?
Caching methods
● Write-through [default]
● Write-pass
● Write-around
Features
● A single cache device can be used to cache an
arbitrary number of backing devices, and
backing devices can be attached and detached
at runtime, while mounted and in use (they run
in passthrough mode when they don't have a
cache).
● (But not multiple caching device for a single
backing device)
Features
● Recovers from unclean shutdown - writes are
not completed until the cache is consistent with
respect to the backing device (Internally,
bcache doesn't distinguish between clean and
unclean shutdown).
● Detects and bypasses sequential IO (with a
configurable threshold, and can be disabled).
Features
● Throttles traffic to the SSD if it becomes
congested, detected by latency to the SSD
exceeding a configurable threshold (useful if
you've got one SSD for many disks).
● Readahead on cache miss (disabled by
default).
Features
● Highly efficient writeback implementation; dirty
data is always written out in sorted order, and if
writeback_percent is enabled background
writeback is smoothly throttled with a PD
controller to keep around that percentage of the
cache dirty.
● Very high performance b+ tree - bcache is
capable of around 1M iops on random reads, if
your hardware is fast enough.
Why bcache?
● BIG HDD
– But slow
● Fast SSD
– Smaller, comparatively costlier..
– But cheaper than RAM!
Why bcache?
● Cloud providers
– AWS – Direct attached ephemeral SSD
– GCE – Local attached SSD (ephemeral)
– Persistent
● AWS EBS
● GCE SSD
Why bcache?
● Persistence (in cloud)
- Is network attached
- hence, slower compared to direct attached
● Desktop / laptop / servers
Why bcache?
● Performance of direct attached (ephemeral)
+
● Persistence of storage
How to..?
● Kernel >=3.10
– Fedora, Ubuntu, Amazon Linux
● SSD
– Direct attached is better
● Bigger/slower HDD/Network SSD
How to..?
● Install bcache tools
● Unmount caching and backing device
● Wipe existing FS (backup!)
– wipefs -a /dev/xvdb
● make-bcache -B /dev/xvdf -C /dev/xvdb
● Done!
How to..?
● /sys/fs/bcache
● /sys/block/bcache0
How to w/ Aerospike?
● Caching Mode
Default Write through
● Caching device
– 2 or more
● Backing device
– Same size as caching device
How to w/ Aerospike?
● Tuning
● By default, bcache does not cache sequential
IO, just the random reads and writes that SSDs
excel at. For Aerospike, we recommend
enabling caching of sequential IO as well.
● Disable congestion throttling on bcache to
avoid cache misses.
How to w/ Aerospike?
●
We recommend using a one to one mapping between backing and caching
devices to avoid cache misses. Avoid configuring a single caching device with
multiple backing devices.
●
Though bcache documentation shows way of creating and attaching caching
and backing devices in a single command (make-bcache -B /dev/backing -C
/dev/caching), we have seen problems when using this single command in
cloud providers due to known bugs. Hence, we suggest not using this currently
and instead use two invocations to setup the backing device and the caching
device. These bugs have been fixed in the latest bcache but the fixed kernel is
not available for all distros yet.
How to w/ Aerospike?
● http://www.aerospike.com/docs/operations/plan/
ssd/bcache/asbcache/
Why w/ Aerospike?
● Cloud providers
– No persistence w/ performance
● So far..
– In-memory backed with persistence
– Costly!
● Bcache provides persistence w/ performance
– At upto 80% the cost saving!!
Why w/ Aerospike?
Why w/ Aerospike?
Why w/ Aerospike?
Questions..?

More Related Content

What's hot

Ceph Day Taipei - How ARM Microserver Cluster Performs in Ceph
Ceph Day Taipei - How ARM Microserver Cluster Performs in CephCeph Day Taipei - How ARM Microserver Cluster Performs in Ceph
Ceph Day Taipei - How ARM Microserver Cluster Performs in Ceph
Ceph Community
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
pittmantony
 
Vm13 vnx mixed workloads
Vm13 vnx mixed workloadsVm13 vnx mixed workloads
Vm13 vnx mixed workloads
pittmantony
 
NGENSTOR_ODA_HPDA
NGENSTOR_ODA_HPDANGENSTOR_ODA_HPDA
NGENSTOR_ODA_HPDA
UniFabric
 

What's hot (20)

Ceph Day Taipei - How ARM Microserver Cluster Performs in Ceph
Ceph Day Taipei - How ARM Microserver Cluster Performs in CephCeph Day Taipei - How ARM Microserver Cluster Performs in Ceph
Ceph Day Taipei - How ARM Microserver Cluster Performs in Ceph
 
Windows Azure Virtual Machines And Virtual Networks
Windows Azure Virtual Machines And Virtual NetworksWindows Azure Virtual Machines And Virtual Networks
Windows Azure Virtual Machines And Virtual Networks
 
Windows Azure Caching
Windows Azure CachingWindows Azure Caching
Windows Azure Caching
 
Sql saturday azure storage by Anton Vidishchev
Sql saturday azure storage by Anton VidishchevSql saturday azure storage by Anton Vidishchev
Sql saturday azure storage by Anton Vidishchev
 
Varrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentationVarrow madness 2013 virtualizing sql presentation
Varrow madness 2013 virtualizing sql presentation
 
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
 
Ceph Day San Jose - Ceph at Salesforce
Ceph Day San Jose - Ceph at Salesforce Ceph Day San Jose - Ceph at Salesforce
Ceph Day San Jose - Ceph at Salesforce
 
Windows Azure Virtual Machines
Windows Azure Virtual MachinesWindows Azure Virtual Machines
Windows Azure Virtual Machines
 
Vm13 vnx mixed workloads
Vm13 vnx mixed workloadsVm13 vnx mixed workloads
Vm13 vnx mixed workloads
 
Ceph Day Tokyo - Bring Ceph to Enterprise
Ceph Day Tokyo - Bring Ceph to Enterprise Ceph Day Tokyo - Bring Ceph to Enterprise
Ceph Day Tokyo - Bring Ceph to Enterprise
 
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
Ceph Day San Jose - All-Flahs Ceph on NUMA-Balanced Server
 
Windows Azure Blob Storage
Windows Azure Blob StorageWindows Azure Blob Storage
Windows Azure Blob Storage
 
Running Microsoft and Oracle Stacks on Elastic Block Store (STG303) | AWS re:...
Running Microsoft and Oracle Stacks on Elastic Block Store (STG303) | AWS re:...Running Microsoft and Oracle Stacks on Elastic Block Store (STG303) | AWS re:...
Running Microsoft and Oracle Stacks on Elastic Block Store (STG303) | AWS re:...
 
Scaling drupal on amazon web services dr
Scaling drupal on amazon web services drScaling drupal on amazon web services dr
Scaling drupal on amazon web services dr
 
NGENSTOR_ODA_HPDA
NGENSTOR_ODA_HPDANGENSTOR_ODA_HPDA
NGENSTOR_ODA_HPDA
 
Ceph Day San Jose - Object Storage for Big Data
Ceph Day San Jose - Object Storage for Big Data Ceph Day San Jose - Object Storage for Big Data
Ceph Day San Jose - Object Storage for Big Data
 
SM16 - Can i move my stuff to openstack
SM16 - Can i move my stuff to openstackSM16 - Can i move my stuff to openstack
SM16 - Can i move my stuff to openstack
 
Integrating On-premises Enterprise Storage Workloads with AWS (ENT301) | AWS ...
Integrating On-premises Enterprise Storage Workloads with AWS (ENT301) | AWS ...Integrating On-premises Enterprise Storage Workloads with AWS (ENT301) | AWS ...
Integrating On-premises Enterprise Storage Workloads with AWS (ENT301) | AWS ...
 
Apache Tajo - BWC 2014
Apache Tajo - BWC 2014Apache Tajo - BWC 2014
Apache Tajo - BWC 2014
 
Azure IaaS
Azure IaaSAzure IaaS
Azure IaaS
 

Similar to Bcache and Aerospike

My sql innovation work -innosql
My sql innovation work -innosqlMy sql innovation work -innosql
My sql innovation work -innosql
thinkinlamp
 
Storage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, WhiptailStorage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, Whiptail
Internet World
 
Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetes
DoKC
 

Similar to Bcache and Aerospike (20)

Improve your storage with bcachefs
Improve your storage with bcachefsImprove your storage with bcachefs
Improve your storage with bcachefs
 
Open Source Data Deduplication
Open Source Data DeduplicationOpen Source Data Deduplication
Open Source Data Deduplication
 
Ceph Performance: Projects Leading up to Jewel
Ceph Performance: Projects Leading up to JewelCeph Performance: Projects Leading up to Jewel
Ceph Performance: Projects Leading up to Jewel
 
Ceph Performance: Projects Leading Up to Jewel
Ceph Performance: Projects Leading Up to JewelCeph Performance: Projects Leading Up to Jewel
Ceph Performance: Projects Leading Up to Jewel
 
Veeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and TricksVeeam Backup & Replication Tips and Tricks
Veeam Backup & Replication Tips and Tricks
 
Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems Kafka on ZFS: Better Living Through Filesystems
Kafka on ZFS: Better Living Through Filesystems
 
What is the average rotational latency of this disk drive What seek.docx
 What is the average rotational latency of this disk drive  What seek.docx What is the average rotational latency of this disk drive  What seek.docx
What is the average rotational latency of this disk drive What seek.docx
 
My sql innovation work -innosql
My sql innovation work -innosqlMy sql innovation work -innosql
My sql innovation work -innosql
 
Shootout at the AWS Corral
Shootout at the AWS CorralShootout at the AWS Corral
Shootout at the AWS Corral
 
Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology Red Hat Ceph Storage Acceleration Utilizing Flash Technology
Red Hat Ceph Storage Acceleration Utilizing Flash Technology
 
SSD-Bondi.pptx
SSD-Bondi.pptxSSD-Bondi.pptx
SSD-Bondi.pptx
 
Achieving the ultimate performance with KVM
Achieving the ultimate performance with KVMAchieving the ultimate performance with KVM
Achieving the ultimate performance with KVM
 
Tuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy WorkloadTuning Linux Windows and Firebird for Heavy Workload
Tuning Linux Windows and Firebird for Heavy Workload
 
Storage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, WhiptailStorage and performance- Batch processing, Whiptail
Storage and performance- Batch processing, Whiptail
 
Benchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetesBenchmarking for postgresql workloads in kubernetes
Benchmarking for postgresql workloads in kubernetes
 
Getting The Most Out Of Your Flash/SSDs
Getting The Most Out Of Your Flash/SSDsGetting The Most Out Of Your Flash/SSDs
Getting The Most Out Of Your Flash/SSDs
 
Experience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's ViewExperience In Building Scalable Web Sites Through Infrastructure's View
Experience In Building Scalable Web Sites Through Infrastructure's View
 
Percona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and ImprovementsPercona XtraBackup - New Features and Improvements
Percona XtraBackup - New Features and Improvements
 
ceph-barcelona-v-1.2
ceph-barcelona-v-1.2ceph-barcelona-v-1.2
ceph-barcelona-v-1.2
 
Ceph barcelona-v-1.2
Ceph barcelona-v-1.2Ceph barcelona-v-1.2
Ceph barcelona-v-1.2
 

More from Anshu Prateek (8)

20 Shades of Blue
20 Shades of Blue20 Shades of Blue
20 Shades of Blue
 
Openstack - getting it all up magically - and when the magic fails.
Openstack - getting it all up magically - and when the magic fails.Openstack - getting it all up magically - and when the magic fails.
Openstack - getting it all up magically - and when the magic fails.
 
Deep Dark Web - How to get inside?
Deep Dark Web - How to get inside?Deep Dark Web - How to get inside?
Deep Dark Web - How to get inside?
 
Scaling up with Aerospike!
Scaling up with Aerospike!Scaling up with Aerospike!
Scaling up with Aerospike!
 
what/why/how of IPv6 || 2002:3239:43c3::1
what/why/how of IPv6 || 2002:3239:43c3::1what/why/how of IPv6 || 2002:3239:43c3::1
what/why/how of IPv6 || 2002:3239:43c3::1
 
Hacking up location aware apps
Hacking up location aware appsHacking up location aware apps
Hacking up location aware apps
 
Yql hacku iitd_2012
Yql hacku iitd_2012Yql hacku iitd_2012
Yql hacku iitd_2012
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
 

Recently uploaded

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 

Recently uploaded (20)

WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 

Bcache and Aerospike

  • 2. Agenda ● Bcache ● What is bcache? – Features ● Why bcache? ● How to use bcache? ● Why bcache with Aerospike?
  • 3. ● Anshu Prateek ● Aerospike Devops Lead ● Ex - Yahoo! Search Operations ● http://about.me/anshuprateek ● anshu@aerospike.com
  • 4. bcache ● Block – cache ● cache in the Linux kernel's block layer ● Starting Kernel >=3.10 (June 2013)
  • 5. bcache? ● Kent Overstreet ● http://bcache.evilpiepirate.org ● https://github.com/g2p/bcache-tools.git ● GNU General Public License (GPL)
  • 6. What is bcache? ● creates hybrid volumes and provides performance improvements ● one or more fast storage devices, such as flash-based solid-state drives (SSDs), to act as a cache for one or more slower storage devices, such as hard disk drives
  • 8. Caching methods ● Write-through [default] ● Write-pass ● Write-around
  • 9. Features ● A single cache device can be used to cache an arbitrary number of backing devices, and backing devices can be attached and detached at runtime, while mounted and in use (they run in passthrough mode when they don't have a cache). ● (But not multiple caching device for a single backing device)
  • 10. Features ● Recovers from unclean shutdown - writes are not completed until the cache is consistent with respect to the backing device (Internally, bcache doesn't distinguish between clean and unclean shutdown). ● Detects and bypasses sequential IO (with a configurable threshold, and can be disabled).
  • 11. Features ● Throttles traffic to the SSD if it becomes congested, detected by latency to the SSD exceeding a configurable threshold (useful if you've got one SSD for many disks). ● Readahead on cache miss (disabled by default).
  • 12. Features ● Highly efficient writeback implementation; dirty data is always written out in sorted order, and if writeback_percent is enabled background writeback is smoothly throttled with a PD controller to keep around that percentage of the cache dirty. ● Very high performance b+ tree - bcache is capable of around 1M iops on random reads, if your hardware is fast enough.
  • 13. Why bcache? ● BIG HDD – But slow ● Fast SSD – Smaller, comparatively costlier.. – But cheaper than RAM!
  • 14. Why bcache? ● Cloud providers – AWS – Direct attached ephemeral SSD – GCE – Local attached SSD (ephemeral) – Persistent ● AWS EBS ● GCE SSD
  • 15. Why bcache? ● Persistence (in cloud) - Is network attached - hence, slower compared to direct attached ● Desktop / laptop / servers
  • 16. Why bcache? ● Performance of direct attached (ephemeral) + ● Persistence of storage
  • 17. How to..? ● Kernel >=3.10 – Fedora, Ubuntu, Amazon Linux ● SSD – Direct attached is better ● Bigger/slower HDD/Network SSD
  • 18. How to..? ● Install bcache tools ● Unmount caching and backing device ● Wipe existing FS (backup!) – wipefs -a /dev/xvdb ● make-bcache -B /dev/xvdf -C /dev/xvdb ● Done!
  • 19. How to..? ● /sys/fs/bcache ● /sys/block/bcache0
  • 20. How to w/ Aerospike? ● Caching Mode Default Write through ● Caching device – 2 or more ● Backing device – Same size as caching device
  • 21. How to w/ Aerospike? ● Tuning ● By default, bcache does not cache sequential IO, just the random reads and writes that SSDs excel at. For Aerospike, we recommend enabling caching of sequential IO as well. ● Disable congestion throttling on bcache to avoid cache misses.
  • 22. How to w/ Aerospike? ● We recommend using a one to one mapping between backing and caching devices to avoid cache misses. Avoid configuring a single caching device with multiple backing devices. ● Though bcache documentation shows way of creating and attaching caching and backing devices in a single command (make-bcache -B /dev/backing -C /dev/caching), we have seen problems when using this single command in cloud providers due to known bugs. Hence, we suggest not using this currently and instead use two invocations to setup the backing device and the caching device. These bugs have been fixed in the latest bcache but the fixed kernel is not available for all distros yet.
  • 23. How to w/ Aerospike? ● http://www.aerospike.com/docs/operations/plan/ ssd/bcache/asbcache/
  • 24. Why w/ Aerospike? ● Cloud providers – No persistence w/ performance ● So far.. – In-memory backed with persistence – Costly! ● Bcache provides persistence w/ performance – At upto 80% the cost saving!!