SlideShare a Scribd company logo
Cache & Concurrency & Consistency 
      considerations for Cassandra



SriSatish Ambati
Principal Engineer, DataStax (formerly, Riptano)
Apache Cassandra 
OpenJDK/JVM 
Twitter: @srisatish
srisatish.ambati@gmail.com
                              
Trail ahead
Elements of Cache Performance
  Metrics, Monitors
JVM goes to BigData Land!
Examples
 Lucandra, Twissandra
Cassandra Performance with JVM 
  Commentary
   Runtime Views
   Non Blocking HashMap
   Locking: concurrency
   Garbage Collection
A feather in the CAP
●   Eventual Consistency
    –   Levels
    –   Doesn’t mean data loss 
        (journaled)
●   SEDA 
    –   Partitioning, Cluster & 
        Failure detection, 
        Storage engine mod
    –   Event driven & non­
        blocking io
    –   Pure Java
Which is the most popular eventually 
   consistent system out there?
DNS
State machines as way to 
    visualize distributed systems
In a distributed system 
●   sometimes impossible to say that one of  
    two events occurred first. 
●   The relation “happened before” → is only a 
    partial ordering of event
    For any events a, b and Clock C:
    –   If a → b then C(a) < C(b)
                            ­ Leslie Lamport.
client side consistency
●   A writes. B & C read after time t. Inconsistency Window
●   Types of “eventual consistency”
●   Causal Consistency
         –   A in a causal B sees consistent data
●   Read­your­Writes
         –   A only sees updated valuse of data
●   Session Consistency
         –   In the context of a session
●   Monotonic read
         –   If a process sees a new value:everyone else 
                 guaranteed to see update.
●   Monotonic Write
Server side consistency: 
              R + W > N
●   N ­ the number of nodes that store replicas of the 
    data (RF)
●   W ­ the number of replicas that need to 
    acknowledge the receipt of the update before the 
    update completes
●   R ­ the number of replicas that are contacted 
    when a data object is accessed through a read 
    operation 
    T is the number of nodes.
Quorum
●   R + W > N
        –   R=1, W=2, N=2 (primary­backup, rdbms)
●   Fault­tolerance
        –   R=2, W=2, N=3
●   Read performance:
        –   R=1, Lots of nodes. Even 100s.
        –   R=1, N=W. High consistency
●   Fast write: 
        –   W=1, N=R 
Count what is countable, measure what is
    measurable, and what is not measurable,
    make measurable

                              -Galileo




                      
Elements of Cache Performance:
                Metrics
    ●   Operations: 
        –   Ops/s: Puts/sec, Gets/sec, updates/sec
        –   Latencies, percentiles
        –   Indexing
    ●   # of nodes – scale, elasticity
    ●   Replication
        –   Synchronous, Asynchronous (fast writes)
    ●   Tuneable Consistency
    ●   Durability/Persistence
    ●   Size & Number of Objects, Size of Cache 
    ●   # of user clients
                                  
Elements of Cache Performance: 
                  “Think Locality”
       ●   Hot or Not: The 80/20 rule.
            –   A small set of objects are very popular!
            –   What is the most RT tweet?
       ●   Hit or Miss: Hit Ratio
            –   How effective is your cache?
            –   LRU, LFU, FIFO.. Expiration
       ●   Long­lived objects lead to better locality.
       ●   Spikes happen
            –   Cascading events 
            –   Cache Thrash: full table scans


                                      
Real World Performance
    ●   Facebook Inbox
         –   Writes:0.12ms, Reads:15ms @ 50GB data
    ●   Twitter performance
         –   Twissandra (simulation)
    ●   Cassandra for Search & Portals
         –   Lucandra, solandra (simulation)
    ●   ycbs/PNUTS benchmarks
         –   5ms read/writes @ 5k ops/s (50/50 Update heavy)
         –   8ms reads/5ms writes @ 5k ops/s (95/5 read heavy)
    ●   Lab environment
         –   ~5k writes per sec per node, <5ms latencies
         –   ~10k reads per sec per node, <5ms latencies
    ●   Performance has improved in newer versions


                                        
yahoo cloud store 
       benchmark
      50/50 – Update Heavy




              
yahoo cloud store 
       benchmark
       95/5 – read heavy




             
   JVM in BigData Land!
    Limits for scale
     ●
       Locks : synchronized
         –   Can’t use all my multi­cores!
         –   java.util.collections also hold locks
         –   Use non­blocking collections!
    ●   (de)Serialization is expensive
         –   Hampers object portability
         –   Use avro, thrift!
    ●   Object overhead
         –   average enterprise collection has 3 elements!
         –   Use byte[ ], primitives where possible!
    ●   Garbage Collection 
         –   Can’t throw memory at the problem!
         –   Mitigate, Monitor, Measure foot print


                                           
Tools
    ●   What is the JVM doing:
        –   dtrace, hprof, introscope, jconsole, 
            visualvm, yourkit, azul zvision
    ●   Invasive JVM observation tools
        –   bci, jvmti, jvmdi/pi agents, jmx, logging
    ●   What is the OS doing:
        –   dtrace, oprofile, vtune
    ●   What is the network disk doing:
        –   Ganglia, iostat, lsof, netstat, nagios

                                
furiously fast writes
                        n2            l y  t o  
                                   app ry
client                                    o
issues                              mem
                              n1
write         find  n o d e

                              commit log
          partitioner
  ●
      Append only writes 
       –  Sequential disk access
  ●
      No locks in critical path
  ●
      Key based atomicity
furiously fast writes
    ●   Use separate disks for commitlog
        –   Don’t forget to size them well
        –   Isolation difficult in the cloud..
    ●   Memtable/SSTable sizes 
        – Delicately balanced with GC
    ●   memtable_throughput_in_mb




                                
Cassandra on EC2 cloud




             *Corey Hulen, EC2
              
Cassandra on EC2 cloud




              
     
Compactions
                                                 K2 < Serialized data >                    K4 < Serialized data >
           K1 < Serialized data >
                                                 K10 < Serialized data >                   K5 < Serialized data >
           K2 < Serialized data >
                                                 K30 < Serialized data >                   K10 < Serialized data >
           K3 < Serialized data >



                                    D E L E T E D
                                                 ­­                                        ­­
           ­­
                                    Sorted       ­­                               Sorted   ­­
Sorted     ­­
                                                 ­­                                        ­­
           ­­




                                        MERGE  SORT


           Index File
                                                        K1 < Serialized data >
         Loaded in memory                               K2 < Serialized data >
                                                        K3 < Serialized data >
                K1   Offset
                                                        K4 < Serialized data >
                K5  Offset                   Sorted
                                                        K5 < Serialized data >
                K30  Offset
                                                        K10 < Serialized data >
                Bloom Filter
                                                        K30 < Serialized data >

                                                      Data File
                                                                   
Compactions
        ●   Intense disk io & mem churn
        ●   Triggers GC for tombstones
        ●   Minor/Major Compactions
        ●   Reduce priority for better reads

    Relevant Parameters 
    Co m p a c t io n Ma n a g e r.
            m in im u m Co m p a c t io n Th re s h o ld = xxxx
     


                                  
Example: compaction in 
     realworld, cloudkick




              
reads design




         
reads performance
    ●   BloomFilter used to identify the right file
    ●   Maintain column indices to look up columns
         –   Which can span different SSTables
    ●   Less io than typical b­tree
    ●   Cold read: Two seeks
         –   One for Key lookup, another row lookup
    ●   Key Cache
         –   Optimized in latest cassandra
    ●   Row Cache
         –   Improves read performance
         –   GC sensitive for large rows.
    ●   Most (google) applications require single row 
        transactions* 
                                             *Sanjay G, BigTable Design, Google.
                                    
Client Performance
       Marshal Arts:
    Ser/Deserialization
       ●   Clients dominated by Thrift, Avro
           –   Hector, Pelops
       ●   Thrift: upgrade to latest: 0.5, 0.4
       ●   No news: java.io.Serializable is S.L..O.…W
       ●   Use “transient”
       ●   avro, thrift, proto­buf 
       ●   Common Patterns of Doom:
           –   Death by a million gets




                                   
Serialization + 
    ●
          Deserialization uBench
        http://code.google.com/p/thrift­protobuf­compare/wiki/BenchmarkingV2




                                         
Adding Nodes 
●
    New nodes 
     – Add themselves to busiest node 

     – And then Split its Range
●
    Busy Node starts transmit to new node
●
    Bootstrap logic initiated from any node, cli, web
●
    Each node capable of ~40MB/s 
     – Multiple replicas to parallelize bootstrap
●
    UDP for control messages
●
    TCP for request routing
inter­node comm
    ●   Gossip Protocol
        –   It’s exponential 
        –   (epidemic algorithm)
    ●   Failure Detector 
        –   Accrual rate phi
    ●   Anti­Entropy 
        –   Bringing replicas to uptodate


                            
Bloom Filter: in full bloom
●   “constant” time
●   size:compact
●   false positives
●   Single lookup 
    for key in file
●   Deletion 
●   Improve
     – Counting BF

     – Bloomier filters
Birthdays, Collisions &
               Hashing functions
    ●   Birthday Paradox
        For the N=21 people in this room 
        Probability that at least 2 of them share same birthday is 
           ~0.47
    ●   Collisions are real!
    ●   An unbalanced HashMap behaves like a list O(n) retrieval
    ●   Chaining & Linear probing
    ●   Performance Degrades 
    ●    with 80% table density

    ●




                                 
the devil’s in the details




                
CFS
    ●   All in the 
        family!
    ●   denormalize




                       
Memtable
    ●   In­memory
    ●   ColumnFamily specific
    ●   throughput determines 
        size before flush
    ●   Larger memtables can 
        improve reads




                        
SSTable
    ●   MemTable “flushes” to 
        a SSTable 
    ●   Immutable after
    ●   Read: Multiple 
        SSTable lookups 
        possible
    ●   Chief Execs:
        –   SSTableWriter
        –   SSTableReader




                               
Write: Runtime threads




              
Writes: runtime mem




             
Example: Java Overheads




               
writes: monitors




           
     U U I D
    ●  java.util.UUID is slow
        – static use leads to contention
    SecureRandom
     ● Uses /dev/urandom for seed initialization
        -Djava.security.egd=file:/dev/urandom
     ● PRNG without file is atleast 20%­40% better.
     ● Use TimeUUIDs where possible – much faster
     ● JUG – java.uuid.generator

    ●   http://github.com/cowtowncoder/java­uuid­generator 
    ●   http://jug.safehaus.org/ 
    ●   http://johannburkard.de/blog/programming/java/Java­UUID­generators­compared.html




                                                   
synchronized
    ●   Coarse grained locks
    ●   io under lock
    ●   Stop signal on a highway
    ●   java.util.concurrent does not mean no 
        locks
    ●   Non Blocking, Lock free, Wait free 
        collections

                        
Scalable Lock­Free Coding Style
    ●   Big Array to hold Data
    ●   Concurrent writes via: CAS & Finite State 
        Machine
        –   No locks, no volatile
        –   Much faster than locking under heavy load
        –   Directly reach main data array in 1 step
    ●   Resize as needed
        –   Copy Array to a larger Array on demand
        –   Use State Machine to help copy
        –   “ Mark” old Array words to avoid missing late updates




                                  
Non­Blocking HashMap
                Azul Vega2 – 768 cpus

                                1K Table                                                        1M Table
                1200                                                     1200



                1000
                                               NB­99                     1000



                 800                                                     800




                                                             M­ops/sec
                                              CHM­99
    M­ops/sec




                 600                                                     600



                 400                                                     400                                            NB
                                         NB­75
                 200                                                     200
                                               CHM­75
                                                                                                                    CHM
                  0                                                         0
                       0   100 200 300 400 500 600 700 800                      0   100   200   300   400   500   600   700   800
                                    Threads                                                      Threads
                                                        
Cassandra uses High Scale 
        Non­Blocking Hashmap 
    public class BinaryMemtable implements IFlushable
    {
    …
      private final Map<DecoratedKey,byte[]> columnFamilies =
       new NonBlockingHashMap<DecoratedKey, byte[]>();
    /* Lock and Condition for notifying new clients about Memtable
       switches */
      private final Lock lock = new ReentrantLock(); Condition condition;
    …
    }
    public class Table
    {
    …
      private static final Map<String, Table> instances = new
       NonBlockingHashMap<String, Table>();
    …
    }




                                   
GC­sensitive elements 
           within Cassandra
    ●   Compaction triggers System.gc()
        –   Tombstones from files
    ●   “GCInspector”
    ●   Memtable Threshold, sizes
    ●   SSTable sizes
    ●   Low overhead collection choices



                           
Garbage Collection
    ●   Pause Times
        if stop_the_word_FullGC > ttl_of_node
         => failed requests; failure accrual & node repair.
    ●   Allocation Rate
        –   New object creation, insertion rate
    ●   Live Objects (residency) 
        –   if residency in heap > 50%
        –   GC overheads dominate.
    ●   Overhead 
        –   space, cpu cycles spent GC
    ●   64­bit not addressing pause times
        –   Bigger is not better!

                                
Memory Fragmentation
    ●   Fragmentation 
        –   Performance degrades over time
        –   Inducing “Full GC” makes problem go away
        –   Free memory that cannot be used
    ●   Reduce occurrence
        –   Use a compacting collector
        –   Promote less often
        –   Use uniform sized objects
    ●   Solution – unsolved
        –   Use latest CMS with CR:6631166
        –    Azul’s Zing JVM & Pauseless GC


                              
CASSANDRA­1014




          
Best Practices:
                Garbage Collection
     ●   GC Logs are cheap even in production
       ­Xloggc:/var/log/cassandra/gc.log 
        ­XX:+PrintGCDetails 
        ­XX:+PrintGCTimeStamps ­XX:+PrintTenuringDistribution 
       ­XX:+PrintHeapAtGC
     ●   Slightly expensive ones:
      ­XX:PrintFLSStatistics=2 ­XX:CMSStatistics=1
       ­XX:CMSInitiationStatistics




                                      
Sizing: Young 
              Generation
    ●   Should we set –Xms == ­Xmx ?
    ●   Use –Xmn (fixed eden)

              allocations {new Object();} 
                                                 survivor ratio

             eden              survivor spaces
                                                   Tenuring   
                    promotion
                                                   Threshold

                                          allocation by jvm
               old generation
                            
Tuning CMS
    ●   Don’t promote too often!
         –   Frequent promotion causes fragmentation
    ●   Size the generations
         –   Min GC times are a function of Live Set
         –   Old Gen should host steady state comfortably
    ●   Parallelize on multicores: 
         –   ­XX:ParallelCMSThreads=4 
         –   ­XX:ParallelGCThreads=4
    ●   Avoid CMS Initiating heuristic
         –   ­XX:+UseCMSInitiationOccupanyOnly
    ●   Use Concurrent for System.gc()
         –   ­XX:+ExplicitGCInvokesConcurrent




                                    
  Summary
    Design & Implementation of Cassandra takes advantages
    of strengths while avoiding common JVM issues.
      ●   Locks:
            – Avoids locks in critical path
            – Uses non­blocking collections, TimeUUIDs!
            – Still Can’t use all my multi­cores..? 
              >> Other bottlenecks to find!
      ●   De/Serialization:
            – Uses avro, thrift!
      ●   Object overhead
            – Uses mostly byte[ ], primitives where possible!
      ●   Garbage Collection 
            – Mitigate: Monitor, Measure foot print.
            – Work in progress by all jvm vendors!
    Cassandra starts from a great footing from a JVM standpoint
                          and will reap the benefits of the platform!
                                   
References                         Q&A
●   Leslie Lamport, “Time, Clocks and the Ordering of Events in a Distributed 
    System”
●   Verner Wogels, Eventually Consistent 
    http://www.allthingsdistributed.com/2008/12/eventually_consistent.html
●   Bloom, Burton H. (1970), "Space/time trade­offs in hash coding with 
    allowable errors"
●   Avinash Lakshman, http://static.last.fm/johan/nosql­
    20090611/cassandra_nosql.pdf
●   Eric Brewer, CAP 
    http://www.cs.berkeley.edu/~brewer/cs262b­2004/PODC­keynote.pdf
●   Tony Printzeis, Charlie Hunt, Javaone Talk 
    http://www.scribd.com/doc/36090475/GC­Tuning­in­the­Java 
●   http://github.com/digitalreasoning/PyStratus/wiki/Documentation
●   http://www.cs.cornell.edu/home/rvr/papers/flowgossip.pdf 
●   Cassandra on Cloud, http://www.coreyhulen.org/?p=326
●   Cliff Click’s, Non­blocking HashMap http://sourceforge.net/projects/high­scale­
    lib/
●   Brian F. Cooper., Yahoo Cloud Storage Benchmark, 
    http://www.brianfrankcooper.net/pubs/ycsb­v4.pdf
DataModel: 
         Know your use patterns
     
    Alternative Twitter DataModel:


    <Keyspace Name="Multiblog"> 
      <ColumnFamily CompareWith="TimeUUIDType" Name="Blogs" /> 
      <ColumnFamily CompareWith="TimeUUIDType" Name="Comments"/>
    </Keyspace> 




                                      

More Related Content

What's hot

Cassandra presentation at NoSQL
Cassandra presentation at NoSQLCassandra presentation at NoSQL
Cassandra presentation at NoSQL
Evan Weaver
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
Vladislav Gangan
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres OpenPostgresOpen
 
How to collect Big Data into Hadoop
How to collect Big Data into HadoopHow to collect Big Data into Hadoop
How to collect Big Data into Hadoop
Sadayuki Furuhashi
 
Scalar DB: A library that makes non-ACID databases ACID-compliant
Scalar DB: A library that makes non-ACID databases ACID-compliantScalar DB: A library that makes non-ACID databases ACID-compliant
Scalar DB: A library that makes non-ACID databases ACID-compliant
Scalar, Inc.
 
Getting the-best-out-of-d3 d12
Getting the-best-out-of-d3 d12Getting the-best-out-of-d3 d12
Getting the-best-out-of-d3 d12
mistercteam
 
Tokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo TyrantTokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo Tyrant
輝 子安
 
Oracle Real Application Cluster ( RAC )
Oracle Real Application Cluster ( RAC )Oracle Real Application Cluster ( RAC )
Oracle Real Application Cluster ( RAC )varasteh65
 
Java10 and Java11 at JJUG CCC 2018 Spr
Java10 and Java11 at JJUG CCC 2018 SprJava10 and Java11 at JJUG CCC 2018 Spr
Java10 and Java11 at JJUG CCC 2018 Spr
なおき きしだ
 
JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011
Kris Mok
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
Redge Technologies
 
What's New and Upcoming in HDFS - the Hadoop Distributed File System
What's New and Upcoming in HDFS - the Hadoop Distributed File SystemWhat's New and Upcoming in HDFS - the Hadoop Distributed File System
What's New and Upcoming in HDFS - the Hadoop Distributed File System
Cloudera, Inc.
 
Ben Coverston - The Apache Cassandra Project
Ben Coverston - The Apache Cassandra ProjectBen Coverston - The Apache Cassandra Project
Ben Coverston - The Apache Cassandra Project
Morningstar Tech Talks
 
Crawlware
CrawlwareCrawlware
Crawlware
kidrane
 
Couchbase Performance Benchmarking
Couchbase Performance BenchmarkingCouchbase Performance Benchmarking
Couchbase Performance Benchmarking
Renat Khasanshyn
 
DataStax: Extreme Cassandra Optimization: The Sequel
DataStax: Extreme Cassandra Optimization: The SequelDataStax: Extreme Cassandra Optimization: The Sequel
DataStax: Extreme Cassandra Optimization: The Sequel
DataStax Academy
 
Cluster Computing with Dryad
Cluster Computing with DryadCluster Computing with Dryad
Cluster Computing with Dryadbutest
 

What's hot (20)

Cassandra presentation at NoSQL
Cassandra presentation at NoSQLCassandra presentation at NoSQL
Cassandra presentation at NoSQL
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres OpenKoichi Suzuki - Postgres-XC Dynamic Cluster  Management @ Postgres Open
Koichi Suzuki - Postgres-XC Dynamic Cluster Management @ Postgres Open
 
Hadoop, Taming Elephants
Hadoop, Taming ElephantsHadoop, Taming Elephants
Hadoop, Taming Elephants
 
How to collect Big Data into Hadoop
How to collect Big Data into HadoopHow to collect Big Data into Hadoop
How to collect Big Data into Hadoop
 
Scalar DB: A library that makes non-ACID databases ACID-compliant
Scalar DB: A library that makes non-ACID databases ACID-compliantScalar DB: A library that makes non-ACID databases ACID-compliant
Scalar DB: A library that makes non-ACID databases ACID-compliant
 
Getting the-best-out-of-d3 d12
Getting the-best-out-of-d3 d12Getting the-best-out-of-d3 d12
Getting the-best-out-of-d3 d12
 
Tokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo TyrantTokyo Cabinet & Tokyo Tyrant
Tokyo Cabinet & Tokyo Tyrant
 
optimizing_ceph_flash
optimizing_ceph_flashoptimizing_ceph_flash
optimizing_ceph_flash
 
Oracle Real Application Cluster ( RAC )
Oracle Real Application Cluster ( RAC )Oracle Real Application Cluster ( RAC )
Oracle Real Application Cluster ( RAC )
 
Java10 and Java11 at JJUG CCC 2018 Spr
Java10 and Java11 at JJUG CCC 2018 SprJava10 and Java11 at JJUG CCC 2018 Spr
Java10 and Java11 at JJUG CCC 2018 Spr
 
JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011JVM @ Taobao - QCon Hangzhou 2011
JVM @ Taobao - QCon Hangzhou 2011
 
Methods of NoSQL database systems benchmarking
Methods of NoSQL database systems benchmarkingMethods of NoSQL database systems benchmarking
Methods of NoSQL database systems benchmarking
 
100 M pps on PC.
100 M pps on PC.100 M pps on PC.
100 M pps on PC.
 
What's New and Upcoming in HDFS - the Hadoop Distributed File System
What's New and Upcoming in HDFS - the Hadoop Distributed File SystemWhat's New and Upcoming in HDFS - the Hadoop Distributed File System
What's New and Upcoming in HDFS - the Hadoop Distributed File System
 
Ben Coverston - The Apache Cassandra Project
Ben Coverston - The Apache Cassandra ProjectBen Coverston - The Apache Cassandra Project
Ben Coverston - The Apache Cassandra Project
 
Crawlware
CrawlwareCrawlware
Crawlware
 
Couchbase Performance Benchmarking
Couchbase Performance BenchmarkingCouchbase Performance Benchmarking
Couchbase Performance Benchmarking
 
DataStax: Extreme Cassandra Optimization: The Sequel
DataStax: Extreme Cassandra Optimization: The SequelDataStax: Extreme Cassandra Optimization: The Sequel
DataStax: Extreme Cassandra Optimization: The Sequel
 
Cluster Computing with Dryad
Cluster Computing with DryadCluster Computing with Dryad
Cluster Computing with Dryad
 

Similar to Cacheconcurrencyconsistency cassandra svcc

Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
aspyker
 
Understanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLUnderstanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQL
Hyderabad Scalability Meetup
 
Scala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache sparkScala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache spark
Demi Ben-Ari
 
Linked in nosql_atnetflix_2012_v1
Linked in nosql_atnetflix_2012_v1Linked in nosql_atnetflix_2012_v1
Linked in nosql_atnetflix_2012_v1
Sid Anand
 
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
Codemotion
 
Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...
Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...
Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...
Chris Fregly
 
Solr on Windows: Does it Work? Does it Scale? - Teun Duynstee
Solr on Windows: Does it Work? Does it Scale? - Teun DuynsteeSolr on Windows: Does it Work? Does it Scale? - Teun Duynstee
Solr on Windows: Does it Work? Does it Scale? - Teun Duynstee
lucenerevolution
 
Erasure codes and storage tiers on gluster
Erasure codes and storage tiers on glusterErasure codes and storage tiers on gluster
Erasure codes and storage tiers on gluster
Red_Hat_Storage
 
Building a Database for the End of the World
Building a Database for the End of the WorldBuilding a Database for the End of the World
Building a Database for the End of the World
jhugg
 
Introduction to AWS Big Data
Introduction to AWS Big Data Introduction to AWS Big Data
Introduction to AWS Big Data
Omid Vahdaty
 
Apache Spark II (SparkSQL)
Apache Spark II (SparkSQL)Apache Spark II (SparkSQL)
Apache Spark II (SparkSQL)
Datio Big Data
 
Galaxy Big Data with MariaDB
Galaxy Big Data with MariaDBGalaxy Big Data with MariaDB
Galaxy Big Data with MariaDB
MariaDB Corporation
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden Microservice
Scott Mansfield
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
Wei Shan Ang
 
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersFrom HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
Databricks
 
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
Josef A. Habdank
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
Omid Vahdaty
 
Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
PostgreSQL Experts, Inc.
 
Scality S3 Server: Node js Meetup Presentation
Scality S3 Server: Node js Meetup PresentationScality S3 Server: Node js Meetup Presentation
Scality S3 Server: Node js Meetup Presentation
Scality
 
Experiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins
Ceph Community
 

Similar to Cacheconcurrencyconsistency cassandra svcc (20)

Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
Understanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQLUnderstanding and building big data Architectures - NoSQL
Understanding and building big data Architectures - NoSQL
 
Scala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache sparkScala like distributed collections - dumping time-series data with apache spark
Scala like distributed collections - dumping time-series data with apache spark
 
Linked in nosql_atnetflix_2012_v1
Linked in nosql_atnetflix_2012_v1Linked in nosql_atnetflix_2012_v1
Linked in nosql_atnetflix_2012_v1
 
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...S3, Cassandra or Outer Space? Dumping Time Series Data using Spark  - Demi Be...
S3, Cassandra or Outer Space? Dumping Time Series Data using Spark - Demi Be...
 
Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...
Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...
Global Big Data Conference Sept 2014 AWS Kinesis Spark Streaming Approximatio...
 
Solr on Windows: Does it Work? Does it Scale? - Teun Duynstee
Solr on Windows: Does it Work? Does it Scale? - Teun DuynsteeSolr on Windows: Does it Work? Does it Scale? - Teun Duynstee
Solr on Windows: Does it Work? Does it Scale? - Teun Duynstee
 
Erasure codes and storage tiers on gluster
Erasure codes and storage tiers on glusterErasure codes and storage tiers on gluster
Erasure codes and storage tiers on gluster
 
Building a Database for the End of the World
Building a Database for the End of the WorldBuilding a Database for the End of the World
Building a Database for the End of the World
 
Introduction to AWS Big Data
Introduction to AWS Big Data Introduction to AWS Big Data
Introduction to AWS Big Data
 
Apache Spark II (SparkSQL)
Apache Spark II (SparkSQL)Apache Spark II (SparkSQL)
Apache Spark II (SparkSQL)
 
Galaxy Big Data with MariaDB
Galaxy Big Data with MariaDBGalaxy Big Data with MariaDB
Galaxy Big Data with MariaDB
 
Application Caching: The Hidden Microservice
Application Caching: The Hidden MicroserviceApplication Caching: The Hidden Microservice
Application Caching: The Hidden Microservice
 
High performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodbHigh performance json- postgre sql vs. mongodb
High performance json- postgre sql vs. mongodb
 
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark ClustersFrom HDFS to S3: Migrate Pinterest Apache Spark Clusters
From HDFS to S3: Migrate Pinterest Apache Spark Clusters
 
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
Extreme Apache Spark: how in 3 months we created a pipeline that can process ...
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
Shootout at the PAAS Corral
Shootout at the PAAS CorralShootout at the PAAS Corral
Shootout at the PAAS Corral
 
Scality S3 Server: Node js Meetup Presentation
Scality S3 Server: Node js Meetup PresentationScality S3 Server: Node js Meetup Presentation
Scality S3 Server: Node js Meetup Presentation
 
Experiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah WatkinsExperiences building a distributed shared log on RADOS - Noah Watkins
Experiences building a distributed shared log on RADOS - Noah Watkins
 

More from srisatish ambati

H2O Open Dallas 2016 keynote for Business Transformation
H2O Open Dallas 2016 keynote for Business TransformationH2O Open Dallas 2016 keynote for Business Transformation
H2O Open Dallas 2016 keynote for Business Transformation
srisatish ambati
 
Digital Transformation with AI and Data - H2O.ai and Open Source
Digital Transformation with AI and Data - H2O.ai and Open SourceDigital Transformation with AI and Data - H2O.ai and Open Source
Digital Transformation with AI and Data - H2O.ai and Open Source
srisatish ambati
 
Top 10 Performance Gotchas for scaling in-memory Algorithms.
Top 10 Performance Gotchas for scaling in-memory Algorithms.Top 10 Performance Gotchas for scaling in-memory Algorithms.
Top 10 Performance Gotchas for scaling in-memory Algorithms.
srisatish ambati
 
Java one2011 brisk-and_high_order_bits_from_cassandra_and_hadoop
Java one2011 brisk-and_high_order_bits_from_cassandra_and_hadoopJava one2011 brisk-and_high_order_bits_from_cassandra_and_hadoop
Java one2011 brisk-and_high_order_bits_from_cassandra_and_hadoop
srisatish ambati
 
High order bits from cassandra & hadoop
High order bits from cassandra & hadoopHigh order bits from cassandra & hadoop
High order bits from cassandra & hadoopsrisatish ambati
 
High order bits from cassandra & hadoop
High order bits from cassandra & hadoopHigh order bits from cassandra & hadoop
High order bits from cassandra & hadoopsrisatish ambati
 
Cassandra at no_sql
Cassandra at no_sqlCassandra at no_sql
Cassandra at no_sql
srisatish ambati
 
Brisk hadoop june2011_sfjava
Brisk hadoop june2011_sfjavaBrisk hadoop june2011_sfjava
Brisk hadoop june2011_sfjava
srisatish ambati
 
Brisk hadoop june2011
Brisk hadoop june2011Brisk hadoop june2011
Brisk hadoop june2011
srisatish ambati
 
Jvm goes big_data_sfjava
Jvm goes big_data_sfjavaJvm goes big_data_sfjava
Jvm goes big_data_sfjava
srisatish ambati
 
jvm goes to big data
jvm goes to big datajvm goes to big data
jvm goes to big data
srisatish ambati
 
Svccg nosql 2011_sri-cassandra
Svccg nosql 2011_sri-cassandraSvccg nosql 2011_sri-cassandra
Svccg nosql 2011_sri-cassandra
srisatish ambati
 
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...
srisatish ambati
 
How to Stop Worrying and Start Caching in Java
How to Stop Worrying and Start Caching in JavaHow to Stop Worrying and Start Caching in Java
How to Stop Worrying and Start Caching in Java
srisatish ambati
 
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
srisatish ambati
 
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
srisatish ambati
 

More from srisatish ambati (16)

H2O Open Dallas 2016 keynote for Business Transformation
H2O Open Dallas 2016 keynote for Business TransformationH2O Open Dallas 2016 keynote for Business Transformation
H2O Open Dallas 2016 keynote for Business Transformation
 
Digital Transformation with AI and Data - H2O.ai and Open Source
Digital Transformation with AI and Data - H2O.ai and Open SourceDigital Transformation with AI and Data - H2O.ai and Open Source
Digital Transformation with AI and Data - H2O.ai and Open Source
 
Top 10 Performance Gotchas for scaling in-memory Algorithms.
Top 10 Performance Gotchas for scaling in-memory Algorithms.Top 10 Performance Gotchas for scaling in-memory Algorithms.
Top 10 Performance Gotchas for scaling in-memory Algorithms.
 
Java one2011 brisk-and_high_order_bits_from_cassandra_and_hadoop
Java one2011 brisk-and_high_order_bits_from_cassandra_and_hadoopJava one2011 brisk-and_high_order_bits_from_cassandra_and_hadoop
Java one2011 brisk-and_high_order_bits_from_cassandra_and_hadoop
 
High order bits from cassandra & hadoop
High order bits from cassandra & hadoopHigh order bits from cassandra & hadoop
High order bits from cassandra & hadoop
 
High order bits from cassandra & hadoop
High order bits from cassandra & hadoopHigh order bits from cassandra & hadoop
High order bits from cassandra & hadoop
 
Cassandra at no_sql
Cassandra at no_sqlCassandra at no_sql
Cassandra at no_sql
 
Brisk hadoop june2011_sfjava
Brisk hadoop june2011_sfjavaBrisk hadoop june2011_sfjava
Brisk hadoop june2011_sfjava
 
Brisk hadoop june2011
Brisk hadoop june2011Brisk hadoop june2011
Brisk hadoop june2011
 
Jvm goes big_data_sfjava
Jvm goes big_data_sfjavaJvm goes big_data_sfjava
Jvm goes big_data_sfjava
 
jvm goes to big data
jvm goes to big datajvm goes to big data
jvm goes to big data
 
Svccg nosql 2011_sri-cassandra
Svccg nosql 2011_sri-cassandraSvccg nosql 2011_sri-cassandra
Svccg nosql 2011_sri-cassandra
 
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...
Cache is King ( Or How To Stop Worrying And Start Caching in Java) at Chicago...
 
How to Stop Worrying and Start Caching in Java
How to Stop Worrying and Start Caching in JavaHow to Stop Worrying and Start Caching in Java
How to Stop Worrying and Start Caching in Java
 
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
JavaOne 2010: Top 10 Causes for Java Issues in Production and What to Do When...
 
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
ApacheCon2010: Cache & Concurrency Considerations in Cassandra (& limits of JVM)
 

Recently uploaded

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 

Recently uploaded (20)

State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

Cacheconcurrencyconsistency cassandra svcc

  • 1. Cache & Concurrency & Consistency  considerations for Cassandra SriSatish Ambati Principal Engineer, DataStax (formerly, Riptano) Apache Cassandra  OpenJDK/JVM  Twitter: @srisatish srisatish.ambati@gmail.com  
  • 3. A feather in the CAP ● Eventual Consistency – Levels – Doesn’t mean data loss  (journaled) ● SEDA  – Partitioning, Cluster &  Failure detection,  Storage engine mod – Event driven & non­ blocking io – Pure Java
  • 4. Which is the most popular eventually  consistent system out there?
  • 5. DNS
  • 6. State machines as way to  visualize distributed systems In a distributed system  ● sometimes impossible to say that one of   two events occurred first.  ● The relation “happened before” → is only a  partial ordering of event For any events a, b and Clock C: – If a → b then C(a) < C(b)    ­ Leslie Lamport.
  • 7. client side consistency ● A writes. B & C read after time t. Inconsistency Window ● Types of “eventual consistency” ● Causal Consistency – A in a causal B sees consistent data ● Read­your­Writes – A only sees updated valuse of data ● Session Consistency – In the context of a session ● Monotonic read – If a process sees a new value:everyone else  guaranteed to see update. ● Monotonic Write
  • 8. Server side consistency:  R + W > N ● N ­ the number of nodes that store replicas of the  data (RF) ● W ­ the number of replicas that need to  acknowledge the receipt of the update before the  update completes ● R ­ the number of replicas that are contacted  when a data object is accessed through a read  operation  T is the number of nodes.
  • 9. Quorum ● R + W > N – R=1, W=2, N=2 (primary­backup, rdbms) ● Fault­tolerance – R=2, W=2, N=3 ● Read performance: – R=1, Lots of nodes. Even 100s. – R=1, N=W. High consistency ● Fast write:  – W=1, N=R 
  • 10. Count what is countable, measure what is measurable, and what is not measurable, make measurable -Galileo    
  • 11. Elements of Cache Performance: Metrics ● Operations:  – Ops/s: Puts/sec, Gets/sec, updates/sec – Latencies, percentiles – Indexing ● # of nodes – scale, elasticity ● Replication – Synchronous, Asynchronous (fast writes) ● Tuneable Consistency ● Durability/Persistence ● Size & Number of Objects, Size of Cache  ● # of user clients    
  • 12. Elements of Cache Performance:                “Think Locality” ● Hot or Not: The 80/20 rule. – A small set of objects are very popular! – What is the most RT tweet? ● Hit or Miss: Hit Ratio – How effective is your cache? – LRU, LFU, FIFO.. Expiration ● Long­lived objects lead to better locality. ● Spikes happen – Cascading events  – Cache Thrash: full table scans    
  • 13. Real World Performance ● Facebook Inbox – Writes:0.12ms, Reads:15ms @ 50GB data ● Twitter performance – Twissandra (simulation) ● Cassandra for Search & Portals – Lucandra, solandra (simulation) ● ycbs/PNUTS benchmarks – 5ms read/writes @ 5k ops/s (50/50 Update heavy) – 8ms reads/5ms writes @ 5k ops/s (95/5 read heavy) ● Lab environment – ~5k writes per sec per node, <5ms latencies – ~10k reads per sec per node, <5ms latencies ● Performance has improved in newer versions    
  • 14. yahoo cloud store  benchmark 50/50 – Update Heavy    
  • 15. yahoo cloud store  benchmark 95/5 – read heavy    
  • 16.    JVM in BigData Land! Limits for scale ● Locks : synchronized – Can’t use all my multi­cores! – java.util.collections also hold locks – Use non­blocking collections! ● (de)Serialization is expensive – Hampers object portability – Use avro, thrift! ● Object overhead – average enterprise collection has 3 elements! – Use byte[ ], primitives where possible! ● Garbage Collection  – Can’t throw memory at the problem! – Mitigate, Monitor, Measure foot print    
  • 17. Tools ● What is the JVM doing: – dtrace, hprof, introscope, jconsole,  visualvm, yourkit, azul zvision ● Invasive JVM observation tools – bci, jvmti, jvmdi/pi agents, jmx, logging ● What is the OS doing: – dtrace, oprofile, vtune ● What is the network disk doing: – Ganglia, iostat, lsof, netstat, nagios    
  • 18. furiously fast writes n2 l y  t o   app ry client  o issues  mem n1 write find  n o d e commit log partitioner ● Append only writes  –  Sequential disk access ● No locks in critical path ● Key based atomicity
  • 19. furiously fast writes ● Use separate disks for commitlog – Don’t forget to size them well – Isolation difficult in the cloud.. ● Memtable/SSTable sizes  – Delicately balanced with GC ● memtable_throughput_in_mb    
  • 20. Cassandra on EC2 cloud *Corey Hulen, EC2    
  • 22.    
  • 23. Compactions K2 < Serialized data > K4 < Serialized data > K1 < Serialized data > K10 < Serialized data > K5 < Serialized data > K2 < Serialized data > K30 < Serialized data > K10 < Serialized data > K3 < Serialized data > D E L E T E D ­­ ­­ ­­ Sorted ­­ Sorted ­­ Sorted ­­ ­­ ­­ ­­ MERGE  SORT Index File K1 < Serialized data > Loaded in memory K2 < Serialized data > K3 < Serialized data > K1   Offset K4 < Serialized data > K5  Offset Sorted K5 < Serialized data > K30  Offset K10 < Serialized data > Bloom Filter K30 < Serialized data > Data File    
  • 24. Compactions ● Intense disk io & mem churn ● Triggers GC for tombstones ● Minor/Major Compactions ● Reduce priority for better reads Relevant Parameters  Co m p a c t io n Ma n a g e r. m in im u m Co m p a c t io n Th re s h o ld = xxxx      
  • 25. Example: compaction in  realworld, cloudkick    
  • 27. reads performance ● BloomFilter used to identify the right file ● Maintain column indices to look up columns – Which can span different SSTables ● Less io than typical b­tree ● Cold read: Two seeks – One for Key lookup, another row lookup ● Key Cache – Optimized in latest cassandra ● Row Cache – Improves read performance – GC sensitive for large rows. ● Most (google) applications require single row  transactions*  *Sanjay G, BigTable Design, Google.    
  • 28. Client Performance Marshal Arts: Ser/Deserialization ● Clients dominated by Thrift, Avro – Hector, Pelops ● Thrift: upgrade to latest: 0.5, 0.4 ● No news: java.io.Serializable is S.L..O.…W ● Use “transient” ● avro, thrift, proto­buf  ● Common Patterns of Doom: – Death by a million gets    
  • 29. Serialization +  ● Deserialization uBench http://code.google.com/p/thrift­protobuf­compare/wiki/BenchmarkingV2    
  • 30. Adding Nodes  ● New nodes  – Add themselves to busiest node  – And then Split its Range ● Busy Node starts transmit to new node ● Bootstrap logic initiated from any node, cli, web ● Each node capable of ~40MB/s  – Multiple replicas to parallelize bootstrap ● UDP for control messages ● TCP for request routing
  • 31. inter­node comm ● Gossip Protocol – It’s exponential  – (epidemic algorithm) ● Failure Detector  – Accrual rate phi ● Anti­Entropy  – Bringing replicas to uptodate    
  • 32. Bloom Filter: in full bloom ● “constant” time ● size:compact ● false positives ● Single lookup  for key in file ● Deletion  ● Improve – Counting BF – Bloomier filters
  • 33. Birthdays, Collisions &  Hashing functions ● Birthday Paradox For the N=21 people in this room  Probability that at least 2 of them share same birthday is  ~0.47 ● Collisions are real! ● An unbalanced HashMap behaves like a list O(n) retrieval ● Chaining & Linear probing ● Performance Degrades  ●  with 80% table density ●    
  • 35. CFS ● All in the  family! ● denormalize    
  • 36. Memtable ● In­memory ● ColumnFamily specific ● throughput determines  size before flush ● Larger memtables can  improve reads    
  • 37. SSTable ● MemTable “flushes” to  a SSTable  ● Immutable after ● Read: Multiple  SSTable lookups  possible ● Chief Execs: – SSTableWriter – SSTableReader    
  • 42.      U U I D ● java.util.UUID is slow – static use leads to contention SecureRandom ● Uses /dev/urandom for seed initialization  -Djava.security.egd=file:/dev/urandom ● PRNG without file is atleast 20%­40% better. ● Use TimeUUIDs where possible – much faster ● JUG – java.uuid.generator ● http://github.com/cowtowncoder/java­uuid­generator  ● http://jug.safehaus.org/  ● http://johannburkard.de/blog/programming/java/Java­UUID­generators­compared.html    
  • 43. synchronized ● Coarse grained locks ● io under lock ● Stop signal on a highway ● java.util.concurrent does not mean no  locks ● Non Blocking, Lock free, Wait free  collections    
  • 44. Scalable Lock­Free Coding Style ● Big Array to hold Data ● Concurrent writes via: CAS & Finite State  Machine – No locks, no volatile – Much faster than locking under heavy load – Directly reach main data array in 1 step ● Resize as needed – Copy Array to a larger Array on demand – Use State Machine to help copy – “ Mark” old Array words to avoid missing late updates    
  • 45. Non­Blocking HashMap Azul Vega2 – 768 cpus 1K Table 1M Table 1200 1200 1000 NB­99 1000 800 800 M­ops/sec CHM­99 M­ops/sec 600 600 400 400 NB NB­75 200 200 CHM­75 CHM 0 0 0 100 200 300 400 500 600 700 800 0 100 200 300 400 500 600 700 800 Threads Threads    
  • 46. Cassandra uses High Scale  Non­Blocking Hashmap  public class BinaryMemtable implements IFlushable { … private final Map<DecoratedKey,byte[]> columnFamilies = new NonBlockingHashMap<DecoratedKey, byte[]>(); /* Lock and Condition for notifying new clients about Memtable switches */ private final Lock lock = new ReentrantLock(); Condition condition; … } public class Table { … private static final Map<String, Table> instances = new NonBlockingHashMap<String, Table>(); … }    
  • 47. GC­sensitive elements  within Cassandra ● Compaction triggers System.gc() – Tombstones from files ● “GCInspector” ● Memtable Threshold, sizes ● SSTable sizes ● Low overhead collection choices    
  • 48. Garbage Collection ● Pause Times if stop_the_word_FullGC > ttl_of_node  => failed requests; failure accrual & node repair. ● Allocation Rate – New object creation, insertion rate ● Live Objects (residency)  – if residency in heap > 50% – GC overheads dominate. ● Overhead  – space, cpu cycles spent GC ● 64­bit not addressing pause times – Bigger is not better!    
  • 49. Memory Fragmentation ● Fragmentation  – Performance degrades over time – Inducing “Full GC” makes problem go away – Free memory that cannot be used ● Reduce occurrence – Use a compacting collector – Promote less often – Use uniform sized objects ● Solution – unsolved – Use latest CMS with CR:6631166 –  Azul’s Zing JVM & Pauseless GC    
  • 51. Best Practices: Garbage Collection ● GC Logs are cheap even in production    ­Xloggc:/var/log/cassandra/gc.log      ­XX:+PrintGCDetails      ­XX:+PrintGCTimeStamps ­XX:+PrintTenuringDistribution     ­XX:+PrintHeapAtGC ● Slightly expensive ones:   ­XX:PrintFLSStatistics=2 ­XX:CMSStatistics=1    ­XX:CMSInitiationStatistics    
  • 52. Sizing: Young  Generation ● Should we set –Xms == ­Xmx ? ● Use –Xmn (fixed eden) allocations {new Object();}  survivor ratio eden survivor spaces Tenuring    promotion Threshold allocation by jvm old generation    
  • 53. Tuning CMS ● Don’t promote too often! – Frequent promotion causes fragmentation ● Size the generations – Min GC times are a function of Live Set – Old Gen should host steady state comfortably ● Parallelize on multicores:  – ­XX:ParallelCMSThreads=4  – ­XX:ParallelGCThreads=4 ● Avoid CMS Initiating heuristic – ­XX:+UseCMSInitiationOccupanyOnly ● Use Concurrent for System.gc() – ­XX:+ExplicitGCInvokesConcurrent    
  • 54.   Summary Design & Implementation of Cassandra takes advantages of strengths while avoiding common JVM issues. ● Locks: – Avoids locks in critical path – Uses non­blocking collections, TimeUUIDs! – Still Can’t use all my multi­cores..?  >> Other bottlenecks to find! ● De/Serialization: – Uses avro, thrift! ● Object overhead – Uses mostly byte[ ], primitives where possible! ● Garbage Collection  – Mitigate: Monitor, Measure foot print. – Work in progress by all jvm vendors! Cassandra starts from a great footing from a JVM standpoint                       and will reap the benefits of the platform!    
  • 55. References Q&A ● Leslie Lamport, “Time, Clocks and the Ordering of Events in a Distributed  System” ● Verner Wogels, Eventually Consistent  http://www.allthingsdistributed.com/2008/12/eventually_consistent.html ● Bloom, Burton H. (1970), "Space/time trade­offs in hash coding with  allowable errors" ● Avinash Lakshman, http://static.last.fm/johan/nosql­ 20090611/cassandra_nosql.pdf ● Eric Brewer, CAP  http://www.cs.berkeley.edu/~brewer/cs262b­2004/PODC­keynote.pdf ● Tony Printzeis, Charlie Hunt, Javaone Talk  http://www.scribd.com/doc/36090475/GC­Tuning­in­the­Java  ● http://github.com/digitalreasoning/PyStratus/wiki/Documentation ● http://www.cs.cornell.edu/home/rvr/papers/flowgossip.pdf  ● Cassandra on Cloud, http://www.coreyhulen.org/?p=326 ● Cliff Click’s, Non­blocking HashMap http://sourceforge.net/projects/high­scale­ lib/ ● Brian F. Cooper., Yahoo Cloud Storage Benchmark,  http://www.brianfrankcooper.net/pubs/ycsb­v4.pdf
  • 56. DataModel:  Know your use patterns   Alternative Twitter DataModel: <Keyspace Name="Multiblog">    <ColumnFamily CompareWith="TimeUUIDType" Name="Blogs" />    <ColumnFamily CompareWith="TimeUUIDType" Name="Comments"/> </Keyspace>