SlideShare a Scribd company logo
Acunu & OCaml:
Experience Report

      Tom Wilkie
Founder & VP Engineering

   tom@acunu.com
     @tom_wilkie
What do we do?
        1990

    Small databases
     BTree indexes
   BTree File systems
         RAID
     Old hardware
What do we do?
                          2010
     Distributed, shared-nothing databases
Write-optimised indexes          Write-optimised indexes

BTree file systems                BTree file systems
       RAID                ...          RAID
 New hardware                     New hardware
What do we do?
                 2011

  Distributed, shared-nothing databases


   Castle                      Castle
                   ...
New hardware               New hardware
Acunu & OCaml: Experience Report, CUFP
What does this
have to do with
  Functional
Programming?
Big
                                                                                 Appl
                                                              Java,




                              Amazon S3 compatible
           Open API                                          Erlang,
OCaml
          Management
                                                                C




                                                       ...
          Deployment

          Monitoring


Python,                                                        ...




                                                                     ...
                                                                           ...      ...




 Bash,         Acunu Storage Core                              C
 Perl
               ...                               ...


                                                                                 Cros
                                                                                 Manag
Management Stack
Autogeneranted                   HTML5/JavaScript                        External Monitoring
               OCaml CLI                       User Interface                          Tools (Munin etc)




                                                  Routerd                                                Another Routerd
                                        enumeration, routing, clustering                               on a different machine




   FSd       Cassandrad        S3d                  Miscd                  Clusterd           Statsd                AlertsD


                                                                                              Default_               Alert_
  Disk        Keyspace        Bucket                 Base                    Host
                                                                                               Report                Rule

              Column                             NamedObje
 Version                                                                    Group             Report                  Alert
              Family                                cts


Collection                                                                                      Stat


             Cassandra_
Filesystem                    S3_Node                                       Service           Source
               Node




  Castle     Cassandra         BigS3
FSd       Cassandrad    S3d          Miscd


  Disk        Keyspace    Bucket        Base


              Column                  NamedObje
 Version
              Family                     cts

                                      Bridges to
Collection
                                    other systems
             Cassandra_
Filesystem                S3_Node
               Node




  Castle     Cassandra     BigS3
Miscd         Clusterd   Statsd     AlertsD


                               Default_   Alert_
      Base            Host
                                Report    Rule
   Clustering
    NamedObje        Group     Report      Alert
       cts
Failure Detection
                                Stat
   Monitoring
                     Service   Source
    Alerting
neranted                  HTML5/JavaScript                        External M
ml CLI                     User Interface                          Tools (Mu




                              Routerd
                    enumeration, routing, clustering




drad        S3d                 Miscd                  Clusterd           St

                     Routing & Aggregation                               De
ace        Bucket                Base                    Host
                                                                          Re
Successes / Failures
Prototype
“Filesystem”
Aim: Investigate
       algorithms for KV
            storage
• CoW BTrees        • Fractional Cascading
• Mod List BTrees   • Stratified DAs
• LSM Trees         • Multidimensional keys
• Doubling Arrays   • Z curve packing
Doubling Array


2   2   9


9
Doubling Array
                       Inserts


11          2   9       2   8   9   11


 8          8   11
                                              etc...



Similar to log-structured merge trees (LSM), cache-
oblivious lookahead array (COLA), ...
Demo
https://acunu-videos.s3.amazonaws.com/dajs.html
8KB @ 100MB/s, w/ 8ms seek      100 / 5
                        = 100 IOs/s          = 20 updates/s
~ log (2^30)/log 100
= 5 IOs/update
                                            Range Query
                           Update
                                               (Size Z)
 Log Structured             O(logB N)             O(Z/B)
     B-Tree                random IOs           random IOs

                           O((log N)/B)           O(Z/B)
 Doubling Array           sequential IOs       sequential IOs



  ~ log (2^30)/100       8KB @ 100MB/s             13k / 0.2
= 0.2 IOs/update          = 13k IOs/s          = 65k updates/s

     B = “block size”, say 8KB at 100 bytes/entry ~= 100 entries
Block Index   BTree Disk Trace




                  Time (s)
Block Index   Doubling Array Disk Trace




                        Time (secs)
Insertion Rate (kvps/s)   OCaml Prototype Performance




                                # inserted kvps
The Dark Side...
Insert Rate (keys/s)   Java Prototype Performance




                                Time (s)
What about
 Castle?
Castle Performance
Acunu & OCaml: Experience Report, CUFP
One more thing...
SH OT S*
SN AP
         * And clones!
I’ll explain how....


 “Castle: Re-inventing Storage
         For Big Data”
   London, 27th September
      http://bit.ly/rduBia
Questions?
    tom@acunu.com
      @tom_wilkie

 http://www.acunu.com
http://bitbucket.org/acunu
 http://github.com/acunu
References
[LSM] The Log-Structured Merge-Tree (LSM-Tree)
Patrick O'Neil, Edward Cheng, Dieter Gawlick,
Elizabeth O'Neil                                           Stratified B-trees and versioned dictionaries, - Andy
    http://staff.ustc.edu.cn/~jpq/paper/flash/1996-The      Twigg, Andrew Byde, Grzegorz Miłoś, Tim Moreton,
     %20Log-Structured%20Merge-Tree%20%28LSM-              John Wilkes, Tom Wilkie, HotStorage’11
                                          Tree%29.pdf          http://www.usenix.org/event/hotstorage11/tech/
                                                                                            final_files/Twigg.pdf
[COLA] Cache-Oblivious Streaming B-trees,
Michael A. Bender et al                                    [RDA] Random duplicate storage strategies for
        http://www.cs.sunysb.edu/~bender/newpub/           load balancing in multimedia servers, 2000, Joep
                                 BenderFaFi07.pdf          Aerts and Jan Korst and Sebastian Egner
                                                                             http://www.win.tue.nl/~joep/IPL.ps
[DSST] Making Data Structures Persistent - J. R.
Driscoll, N. Sarnak, D. D. Sleator, R. E. Tarjan, Making   Apache, Apache Cassandra, Cassandra, Hadoop, and
Data Structures Persistent, Journal of Computer              the eye and elephant logos are trademarks of the
and System Sciences,Vol. 38, No. 1, 1989                                        Apache Software Foundation.
    http://www.cs.cmu.edu/~sleator/papers/making-
                        data-structures-persistent.pdf

More Related Content

PDF
Supercharging Cassandra - GOTO Amsterdam
PDF
What's new in JSR-283?
PDF
Apache Hadoop & Friends at Utah Java User's Group
PDF
JCR In 10 Minutes
PDF
Making Big Data Analytics Interactive and Real-­Time
ZIP
Rapid JCR applications development with Sling
PDF
Riak intro to..
PDF
Riak intro with azure
Supercharging Cassandra - GOTO Amsterdam
What's new in JSR-283?
Apache Hadoop & Friends at Utah Java User's Group
JCR In 10 Minutes
Making Big Data Analytics Interactive and Real-­Time
Rapid JCR applications development with Sling
Riak intro to..
Riak intro with azure

What's hot (17)

PDF
Cloumon enterprise
PDF
Shark SQL and Rich Analytics at Scale
PPTX
Open stack in sina
PDF
MongoDB at the energy frontier
PDF
Taming Jcr With Sling
PDF
Workshop de Ruby on Rails
PDF
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
PDF
Data Aggregation System
PPTX
stream processing engine
PDF
Cisco 刘洋 从“路由”回归“交换”
PDF
Parallel Computing for Econometricians with Amazon Web Services
PDF
OB9-G-language-Arakawa
PDF
SQL? NoSQL? NewSQL?!? What's a Java developer to do? - PhillyETE 2012
PDF
MXF & AAF
PDF
Captura de pacotes no KernelSpace
PDF
KVSの性能、RDBMSのインデックス、更にMapReduceを併せ持つAll-in-One NoSQL: MongoDB
PDF
Barcamp PT
Cloumon enterprise
Shark SQL and Rich Analytics at Scale
Open stack in sina
MongoDB at the energy frontier
Taming Jcr With Sling
Workshop de Ruby on Rails
HA Clustering of PostgreSQL(replication)@2012.9.29 PG Study.
Data Aggregation System
stream processing engine
Cisco 刘洋 从“路由”回归“交换”
Parallel Computing for Econometricians with Amazon Web Services
OB9-G-language-Arakawa
SQL? NoSQL? NewSQL?!? What's a Java developer to do? - PhillyETE 2012
MXF & AAF
Captura de pacotes no KernelSpace
KVSの性能、RDBMSのインデックス、更にMapReduceを併せ持つAll-in-One NoSQL: MongoDB
Barcamp PT
Ad

Similar to Acunu & OCaml: Experience Report, CUFP (20)

PDF
Cassandra for Sysadmins
PPTX
Servers fail, who cares?
PPTX
Scaling Big Data Mining Infrastructure Twitter Experience
PPT
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
PDF
Efficient Parallel Set-Similarity Joins Using MapReduce - Poster
PDF
Running your Java EE 6 applications in the Cloud
PDF
Open stack@ebay
PPTX
Netflix and Open Source
PPTX
Introduction to Apache Accumulo
PDF
Lessons learned scaling big data in cloud
PDF
NoSQL with MySQL
PDF
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
PPTX
Automated testing with OffScale and MongoDB
PPTX
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
PDF
Evaluating NoSQL Performance: Time for Benchmarking
PDF
Oracle rac 10g best practices
PDF
Apache Cassandra in Bangalore - Cassandra Internals and Performance
PPT
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
PPTX
DotNetFest - Let’s refresh our memory! Memory management in .NET
PDF
Balancing Replication and Partitioning in a Distributed Java Database
Cassandra for Sysadmins
Servers fail, who cares?
Scaling Big Data Mining Infrastructure Twitter Experience
Breaking The Clustering Limits @ AlphaCSP JavaEdge 2007
Efficient Parallel Set-Similarity Joins Using MapReduce - Poster
Running your Java EE 6 applications in the Cloud
Open stack@ebay
Netflix and Open Source
Introduction to Apache Accumulo
Lessons learned scaling big data in cloud
NoSQL with MySQL
AWS reinvent 2019 recap - Riyadh - Containers and Serverless - Paul Maddox
Automated testing with OffScale and MongoDB
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
Evaluating NoSQL Performance: Time for Benchmarking
Oracle rac 10g best practices
Apache Cassandra in Bangalore - Cassandra Internals and Performance
Building Reliable Cloud Storage with Riak and CloudStack - Andy Gross, Chief ...
DotNetFest - Let’s refresh our memory! Memory management in .NET
Balancing Replication and Partitioning in a Distributed Java Database
Ad

More from Acunu (20)

PDF
Acunu and Hailo: a realtime analytics case study on Cassandra
PDF
Virtual nodes: Operational Aspirin
PDF
Acunu Analytics and Cassandra at Hailo All Your Base 2013
PDF
Understanding Cassandra internals to solve real-world problems
PDF
Acunu Analytics: Simpler Real-Time Cassandra Apps
PDF
All Your Base
PDF
Realtime Analytics with Apache Cassandra
PDF
Realtime Analytics with Apache Cassandra - JAX London
PDF
Real-time Cassandra
PDF
Realtime Analytics on the Twitter Firehose with Apache Cassandra - Denormaliz...
PDF
Realtime Analytics with Cassandra
PDF
Acunu Analytics @ Cassandra London
KEY
Exploring Big Data value for your business
PDF
Realtime Analytics on the Twitter Firehose with Cassandra
PDF
Progressive NOSQL: Cassandra
PPTX
Cassandra EU 2012 - Overview of Case Studies and State of the Market by 451 R...
KEY
Cassandra EU 2012 - Putting the X Factor into Cassandra
PPTX
Cassandra EU 2012 - Netflix's Cassandra Architecture and Open Source Efforts
PDF
Next Generation Cassandra
PDF
Cassandra EU 2012 - CQL: Then, Now and When by Eric Evans
Acunu and Hailo: a realtime analytics case study on Cassandra
Virtual nodes: Operational Aspirin
Acunu Analytics and Cassandra at Hailo All Your Base 2013
Understanding Cassandra internals to solve real-world problems
Acunu Analytics: Simpler Real-Time Cassandra Apps
All Your Base
Realtime Analytics with Apache Cassandra
Realtime Analytics with Apache Cassandra - JAX London
Real-time Cassandra
Realtime Analytics on the Twitter Firehose with Apache Cassandra - Denormaliz...
Realtime Analytics with Cassandra
Acunu Analytics @ Cassandra London
Exploring Big Data value for your business
Realtime Analytics on the Twitter Firehose with Cassandra
Progressive NOSQL: Cassandra
Cassandra EU 2012 - Overview of Case Studies and State of the Market by 451 R...
Cassandra EU 2012 - Putting the X Factor into Cassandra
Cassandra EU 2012 - Netflix's Cassandra Architecture and Open Source Efforts
Next Generation Cassandra
Cassandra EU 2012 - CQL: Then, Now and When by Eric Evans

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Electronic commerce courselecture one. Pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
A Presentation on Artificial Intelligence
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
“AI and Expert System Decision Support & Business Intelligence Systems”
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Mobile App Security Testing_ A Comprehensive Guide.pdf
Encapsulation theory and applications.pdf
Electronic commerce courselecture one. Pdf
The AUB Centre for AI in Media Proposal.docx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectral efficient network and resource selection model in 5G networks
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Acunu & OCaml: Experience Report, CUFP

  • 1. Acunu & OCaml: Experience Report Tom Wilkie Founder & VP Engineering tom@acunu.com @tom_wilkie
  • 2. What do we do? 1990 Small databases BTree indexes BTree File systems RAID Old hardware
  • 3. What do we do? 2010 Distributed, shared-nothing databases Write-optimised indexes Write-optimised indexes BTree file systems BTree file systems RAID ... RAID New hardware New hardware
  • 4. What do we do? 2011 Distributed, shared-nothing databases Castle Castle ... New hardware New hardware
  • 6. What does this have to do with Functional Programming?
  • 7. Big Appl Java, Amazon S3 compatible Open API Erlang, OCaml Management C ... Deployment Monitoring Python, ... ... ... ... Bash, Acunu Storage Core C Perl ... ... Cros Manag
  • 9. Autogeneranted HTML5/JavaScript External Monitoring OCaml CLI User Interface Tools (Munin etc) Routerd Another Routerd enumeration, routing, clustering on a different machine FSd Cassandrad S3d Miscd Clusterd Statsd AlertsD Default_ Alert_ Disk Keyspace Bucket Base Host Report Rule Column NamedObje Version Group Report Alert Family cts Collection Stat Cassandra_ Filesystem S3_Node Service Source Node Castle Cassandra BigS3
  • 10. FSd Cassandrad S3d Miscd Disk Keyspace Bucket Base Column NamedObje Version Family cts Bridges to Collection other systems Cassandra_ Filesystem S3_Node Node Castle Cassandra BigS3
  • 11. Miscd Clusterd Statsd AlertsD Default_ Alert_ Base Host Report Rule Clustering NamedObje Group Report Alert cts Failure Detection Stat Monitoring Service Source Alerting
  • 12. neranted HTML5/JavaScript External M ml CLI User Interface Tools (Mu Routerd enumeration, routing, clustering drad S3d Miscd Clusterd St Routing & Aggregation De ace Bucket Base Host Re
  • 15. Aim: Investigate algorithms for KV storage • CoW BTrees • Fractional Cascading • Mod List BTrees • Stratified DAs • LSM Trees • Multidimensional keys • Doubling Arrays • Z curve packing
  • 17. Doubling Array Inserts 11 2 9 2 8 9 11 8 8 11 etc... Similar to log-structured merge trees (LSM), cache- oblivious lookahead array (COLA), ...
  • 19. 8KB @ 100MB/s, w/ 8ms seek 100 / 5 = 100 IOs/s = 20 updates/s ~ log (2^30)/log 100 = 5 IOs/update Range Query Update (Size Z) Log Structured O(logB N) O(Z/B) B-Tree random IOs random IOs O((log N)/B) O(Z/B) Doubling Array sequential IOs sequential IOs ~ log (2^30)/100 8KB @ 100MB/s 13k / 0.2 = 0.2 IOs/update = 13k IOs/s = 65k updates/s B = “block size”, say 8KB at 100 bytes/entry ~= 100 entries
  • 20. Block Index BTree Disk Trace Time (s)
  • 21. Block Index Doubling Array Disk Trace Time (secs)
  • 22. Insertion Rate (kvps/s) OCaml Prototype Performance # inserted kvps
  • 24. Insert Rate (keys/s) Java Prototype Performance Time (s)
  • 29. SH OT S* SN AP * And clones!
  • 30. I’ll explain how.... “Castle: Re-inventing Storage For Big Data” London, 27th September http://bit.ly/rduBia
  • 31. Questions? tom@acunu.com @tom_wilkie http://www.acunu.com http://bitbucket.org/acunu http://github.com/acunu
  • 32. References [LSM] The Log-Structured Merge-Tree (LSM-Tree) Patrick O'Neil, Edward Cheng, Dieter Gawlick, Elizabeth O'Neil Stratified B-trees and versioned dictionaries, - Andy http://staff.ustc.edu.cn/~jpq/paper/flash/1996-The Twigg, Andrew Byde, Grzegorz Miłoś, Tim Moreton, %20Log-Structured%20Merge-Tree%20%28LSM- John Wilkes, Tom Wilkie, HotStorage’11 Tree%29.pdf http://www.usenix.org/event/hotstorage11/tech/ final_files/Twigg.pdf [COLA] Cache-Oblivious Streaming B-trees, Michael A. Bender et al [RDA] Random duplicate storage strategies for http://www.cs.sunysb.edu/~bender/newpub/ load balancing in multimedia servers, 2000, Joep BenderFaFi07.pdf Aerts and Jan Korst and Sebastian Egner http://www.win.tue.nl/~joep/IPL.ps [DSST] Making Data Structures Persistent - J. R. Driscoll, N. Sarnak, D. D. Sleator, R. E. Tarjan, Making Apache, Apache Cassandra, Cassandra, Hadoop, and Data Structures Persistent, Journal of Computer the eye and elephant logos are trademarks of the and System Sciences,Vol. 38, No. 1, 1989 Apache Software Foundation. http://www.cs.cmu.edu/~sleator/papers/making- data-structures-persistent.pdf