Speaker: Matt Kennedy, Solution Architect: Big Data at Fusion.io
YouTube: http://www.youtube.com/watch?v=xu_4TAQlY2U&list=PLqcm6qE9lgKLoYaakl3YwIWP4hmGsHm5e&index=21
Flash Memory technology, deployed as server-side PCIe or solid state disks (SSDs), is emerging as a critical tool for performance and efficiency in data centers of all scales. This presentation will discuss how the use of Flash impacts Cassandra deployments in terms of configuration, DRAM requirements and performance expectations. Ideas on leveraging C*'s cutting-edge data-center awareness to blend flash and disk storage nodes for cost and workload efficiency will also be shared. Flash media itself will be examined from a physical perspective to understand endurance issues. Data on write amplification under bulk-load and operational workload conditions will be presented to explain the impact to Flash of C*'s Log Structured Merge Tree architecture and the associated compactions. Finally, we will examine strategies to make Cassandra more Flash-aware using both conventional techniques as well as emerging Non-volatile memory (NVM) programming capabilities. Lessons learned from real-world customer deployments will be shared to complete this presentation.
2. What is this talk about?
▸ Efficiency
• Definition:
noun 1. The state or quality of being efficient.
▸ Efficient
• Definition:
adjective 1. (especially of a system of machine) achieving maximum
productivity with minimum wasted effort or expense
2
#CassandraEU
3. Flash vs Disk Cost Efficiency
▸ Capacity
3TB
▸ IOPS
150
200,000
▸ Cost per IOP
3
4TB
$$$$
¢¢¢¢
#CassandraEU
5. NAND Flash Memory
Source
Line
Word Line
Control Gate
Bit
Line
Float Gate
N
P
N
Flash is a persistent memory technology invented by
Dr. Fujio Masuoka at Toshiba in 1980.
5
#CassandraEU
8. Direct Cut Through Architecture
FUSION DIRECT APPROACH
LEGACY APPROACH
Host
CPU
App
OS
DRAM
DRAM
SAS
SC
Super
Capacitors
App
PCIe
RAID
Controller
OS
PCIe
Host
CPU
Data path
Controller
NAND
Goal of every I/O operation to move data to/from DRAM and flash.
8
#CassandraEU
14. When do we scale out?
▸ A typical server…
CPU Cores: 32 with HT
Memory: 128 GB
…is your working set > 128GB?
14
#CassandraEU
15. Is there a better way?
▸ With NoSQL Databases, we tend to scale out for
DRAM
Combined Resources
CPU Cores: 192
Memory: 768 GB
• Low CPU utilization
• High Utility cost
15
#CassandraEU
15
16. Flash Offers A New Architectural Choice
CPU Cache DRAM
Server-based Flash
Disk Drives
Milliseconds 10-3
16
#CassandraEU
Microseconds 10-6
Nanoseconds 10-9
17. How can we use
flash in Cassandra?
17
#CassandraEU
18. Four Deployment Options
1. All Flash
2. Data Placement (CASSANDRA-2749)
3. Use Logical Data Centers
4. Cache Layer
18
#CassandraEU
19. Cassandra with All-Flash Storage
Step 1: Mount ioMemory at /var/lib/cassandra
Step 2:
19
#CassandraEU
20. Data Placement
▸ https://issues.apache.org/jira/browse/CASSANDRA-2749
• Thanks Marcus!
▸ Takes advantage of filesystem hierarchy
▸ Use mount points to pin Keyspaces or Column
Families to flash:
• /var/lib/cassandra/data/{Keyspace}/{CF}
▸ Use flash for high performance needs, disk for
capacity needs
20
#CassandraEU
21. Data Centers for Storage Control
Cassandra cluster
DC1
(Interactive requests)
HIGH
MEDIUM
21
#CassandraEU
DC2
(Hadoop MR Jobs)
P E R F O R M AN C E
C APAC I T Y / N O D E
DC3
(High density replicas)
LOW
HIGH
22. Flash Caching
▸ Use Flash to cache blocks from spinning disk
• Larger cheaper caches than DRAM
• Helps stabilize performance during compaction
▸ Open-Source & Commercial options:
• Flashcache: FB developed write-through/back/around cache
▸ Kernel patch
▸ https://github.com/facebook/flashcache/
• bcache: write-through/back/around cache
▸ Kernel patch
▸ http://bcache.evilpiepirate.org/
• Fusion ioTurbine: write-through, commercially supported
22
#CassandraEU
29. Real-World Cassandra on Fusion
• 3-4x consolidation factor
• 3-6x reduction in latency
• 2.2x ROI
29
#CassandraEU
30. Efficiency: Performance or Consolidation?
Cassandra @ ~100,000 ops/sec (mixed workload)
x
4
x
4
x
4
x
4
x
4
x
4
x
4
x
4
vs.
x
4
x
4
Memory/Disk
ioMemory
http://www.fusionio.com/white-papers/accelerate-cassandra-without-the-cluster-crawl/
30
#CassandraEU