Acunu & OCaml:Experience Report      Tom WilkieFounder & 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 databasesWrite-optimised indexes          Wri...
What do we do?                 2011  Distributed, shared-nothing databases   Castle                      Castle           ...
What does thishave to do with  FunctionalProgramming?
Big                                                                                 Appl                                  ...
Management Stack
Autogeneranted                   HTML5/JavaScript                        External Monitoring               OCaml CLI      ...
FSd       Cassandrad    S3d          Miscd  Disk        Keyspace    Bucket        Base              Column                ...
Miscd         Clusterd   Statsd     AlertsD                               Default_   Alert_      Base            Host     ...
neranted                  HTML5/JavaScript                        External Mml CLI                     User Interface     ...
Successes / Failures
Prototype“Filesystem”
Aim: Investigate       algorithms for KV            storage• CoW BTrees        • Fractional Cascading• Mod List BTrees   •...
Doubling Array2   2   99
Doubling Array                       Inserts11          2   9       2   8   9   11 8          8   11                      ...
Demohttps://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 ...
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
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.comhttp://bitbucket.org/acunu http://github.com/acunu
References[LSM] The Log-Structured Merge-Tree (LSM-Tree)Patrick ONeil, Edward Cheng, Dieter Gawlick,Elizabeth ONeil       ...
Acunu & OCaml: Experience Report, CUFP
Acunu & OCaml: Experience Report, CUFP
Upcoming SlideShare
Loading in …5
×

Acunu & OCaml: Experience Report, CUFP

2,126 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,126
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
18
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Acunu & OCaml: Experience Report, CUFP

  1. 1. Acunu & OCaml:Experience Report Tom WilkieFounder & VP Engineering tom@acunu.com @tom_wilkie
  2. 2. What do we do? 1990 Small databases BTree indexes BTree File systems RAID Old hardware
  3. 3. What do we do? 2010 Distributed, shared-nothing databasesWrite-optimised indexes Write-optimised indexesBTree file systems BTree file systems RAID ... RAID New hardware New hardware
  4. 4. What do we do? 2011 Distributed, shared-nothing databases Castle Castle ...New hardware New hardware
  5. 5. What does thishave to do with FunctionalProgramming?
  6. 6. Big Appl Java, Amazon S3 compatible Open API Erlang,OCaml Management C ... Deployment MonitoringPython, ... ... ... ... Bash, Acunu Storage Core C Perl ... ... Cros Manag
  7. 7. Management Stack
  8. 8. 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 ctsCollection Stat Cassandra_Filesystem S3_Node Service Source Node Castle Cassandra BigS3
  9. 9. FSd Cassandrad S3d Miscd Disk Keyspace Bucket Base Column NamedObje Version Family cts Bridges toCollection other systems Cassandra_Filesystem S3_Node Node Castle Cassandra BigS3
  10. 10. Miscd Clusterd Statsd AlertsD Default_ Alert_ Base Host Report Rule Clustering NamedObje Group Report Alert ctsFailure Detection Stat Monitoring Service Source Alerting
  11. 11. neranted HTML5/JavaScript External Mml CLI User Interface Tools (Mu Routerd enumeration, routing, clusteringdrad S3d Miscd Clusterd St Routing & Aggregation Deace Bucket Base Host Re
  12. 12. Successes / Failures
  13. 13. Prototype“Filesystem”
  14. 14. Aim: Investigate algorithms for KV storage• CoW BTrees • Fractional Cascading• Mod List BTrees • Stratified DAs• LSM Trees • Multidimensional keys• Doubling Arrays • Z curve packing
  15. 15. Doubling Array2 2 99
  16. 16. Doubling Array Inserts11 2 9 2 8 9 11 8 8 11 etc...Similar to log-structured merge trees (LSM), cache-oblivious lookahead array (COLA), ...
  17. 17. Demohttps://acunu-videos.s3.amazonaws.com/dajs.html
  18. 18. 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
  19. 19. Block Index BTree Disk Trace Time (s)
  20. 20. Block Index Doubling Array Disk Trace Time (secs)
  21. 21. Insertion Rate (kvps/s) OCaml Prototype Performance # inserted kvps
  22. 22. The Dark Side...
  23. 23. Insert Rate (keys/s) Java Prototype Performance Time (s)
  24. 24. What about Castle?
  25. 25. Castle Performance
  26. 26. One more thing...
  27. 27. SH OT S*SN AP * And clones!
  28. 28. I’ll explain how.... “Castle: Re-inventing Storage For Big Data” London, 27th September http://bit.ly/rduBia
  29. 29. Questions? tom@acunu.com @tom_wilkie http://www.acunu.comhttp://bitbucket.org/acunu http://github.com/acunu
  30. 30. References[LSM] The Log-Structured Merge-Tree (LSM-Tree)Patrick ONeil, Edward Cheng, Dieter Gawlick,Elizabeth ONeil 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, andData Structures Persistent, Journal of Computer the eye and elephant logos are trademarks of theand System Sciences,Vol. 38, No. 1, 1989 Apache Software Foundation. http://www.cs.cmu.edu/~sleator/papers/making- data-structures-persistent.pdf

×