SlideShare a Scribd company logo
Riak Operations
                               Grant Schofield
                             Developer Advocate
                           Basho Technologies, Inc.




basho
Friday, April 15, 2011
Installing Riak
                         ‣ http://downloads.basho.com
                         ‣ Packages (Debs, RPMs, Pkgs)
                         ‣ Source Install (Requires Erlang)
                         ‣ “Dev” Installs



basho
Friday, April 15, 2011
Where is Riak
                         ‣ Source and Solaris
                         ‣ /etc/riak
                         ‣ /usr/sbin/riak|riak-admin
                         ‣ /usr/lib|lib64/riak << Meat
                         ‣ /var/log/riak << Log Dir
                         ‣ /var/lib/riak << Data Dir
                         ‣ /tmp/riak << Sockets
basho
Friday, April 15, 2011
/etc/riak
                         ‣ app.config
                            ‣ Riak Configuration
                            ‣ riak_core,riak_kv, bitcask
                         ‣ vm.args
                            ‣ Erlang VM Settings
                            ‣ -name riak@<ip>

basho
Friday, April 15, 2011
/usr/sbin/riak
                         ‣ Wrapped by /etc/init.d/riak
                         ‣ Runs Riak User (sudo)
                         ‣ start | stop
                         ‣ restart|reboot
                         ‣ ping
                         ‣ console | attach


basho
Friday, April 15, 2011
/usr/sbin/riak-admin
                         ‣ join | leave | remove | reip
                         ‣ backup | restore (cluster or node)
                         ‣ test | status | js_reload
                         ‣ wait-for-service | ringready | transfers
                         ‣ cluster_info



basho
Friday, April 15, 2011
riak-admin status
                                  vnode gets/puts in
                                    read-repairs in the
                                 the last 60 seconds gets/puts
                                           total vnode
                                      last 60 seconds
                                     node gets since start
                                                  in the
                                           total node gets
                                     last 60 seconds
                                              since start times
                                                 get_fsm
                                   node puts in   inthe
                                                     microseconds
                                            total node puts
                                   last 60 seconds
                                               since start
                                                put_fsm times
                                        total read-repairs
                                                 in microseconds
                                             since start
basho
Friday, April 15, 2011
riak-admin transfers




basho
Friday, April 15, 2011
riak-admin cluster_info




basho
Friday, April 15, 2011
cluster_info cont...
                                    Total Memory Use




                                    <0.108.0>??




basho
Friday, April 15, 2011
<0.108.0>

                                snmp process




basho
Friday, April 15, 2011
mailboxes
                         (message queue)




basho
Friday, April 15, 2011
mailboxes cont..




basho
Friday, April 15, 2011
Logging
                         ‣ Not Typical (Built in Rotation)
                         ‣ /var/log/riak/erlang.log.X
                            ‣ Console Output
                         ‣ /var/log/riak/sasl-error.log
                            ‣ Errors and Crash Reports
                         ‣ /var/log/riak/sasl << Report Browser

basho
Friday, April 15, 2011
Using rb




basho
Friday, April 15, 2011
Using rb cont...




basho
Friday, April 15, 2011
Using rb cont...




basho
Friday, April 15, 2011
Riak Performance
                         ‣ MANY Variables
                         ‣ Backend Choice (Innostore vs Bitcask)
                         ‣ Hardware vs Virtualized
                         ‣ Access Patterns
                         ‣ Correct System Configuration
                         ‣ Knowing your Environment


basho
Friday, April 15, 2011
Bitcask Tuning
               ‣ KeyDir is in Memory
               ‣ Fileystem Cache (Access Profile Considerations)
               ‣ Merge Trigger Settings
               ‣ Scheduling Bitcask Merges
               ‣ Key Expiration




basho
Friday, April 15, 2011
Innostore Tuning
                         ‣ Similar to MySQL + InnoDB
                         ‣ buffer pool size
                         ‣ o_direct
                         ‣ log_files_in_groups
                         ‣ Separate Spindles for Log and Data




basho
Friday, April 15, 2011
Tools You Should Know
                         ‣ riak-admin status
                         ‣ top
                         ‣ iostat -x 2
                         ‣ sar
                         ‣ basho_bench




basho
Friday, April 15, 2011
A Basic Bottleneck




basho
Friday, April 15, 2011
basho
Friday, April 15, 2011
Tips for Performance
                         ‣ Start with a “DB” Like Machine Profile
                         ‣ noatime mounts
                         ‣ Ring Size
                         ‣ Horizontal vs Vertical Scaling
                         ‣ Basho Bench Testing
                         ‣ Limit List Keys and Full Bucket
                           MapReduce
                         ‣ Graph Everything

basho
Friday, April 15, 2011
Metrics & Monitoring
                         ‣ Integrates with Everything!!
                         ‣ SNMP (Enterprise Plug)
                         ‣ JMX (Enterprise Plug)
                         ‣ Wrapping riak-admin status
                         ‣ /ping
                         ‣ /stats
                         ‣ Read/Write a Key
basho
Friday, April 15, 2011
Load Balancing
                         ‣ HTTP - HAProxy, nginx, etc...
                         ‣ Protocol Buffers - Any TCP Load Balancer
                         ‣ Least Connected




basho
Friday, April 15, 2011
Backups
                         ‣ Different Depending on Backend
                         ‣ Innostore
                           ‣ riak-admin backup (node | cluster)
                         ‣ Bitcask
                           ‣ rsync
                           ‣ snapshots
                           ‣ cp ?
                         ‣ Enterprise Replication

basho
Friday, April 15, 2011
A node has horked!
                            Now what?
                         ‣ That Depends.....
                         ‣ How did the node die?
                         ‣ Do you still have the data?
                         ‣ Start the Node
                         ‣ No data?
                         ‣ Restore or Replace Node


basho
Friday, April 15, 2011
Configuration
                               Management
                         ‣ Riak is Unix
                         ‣ Chef, Puppet, Etc.
                         ‣ Chef Cookbook is Advanced
                         ‣ “Auto” Joining Nodes to a Cluster
                           (ringready)
                         ‣ Node vs IP Naming (vm.args -name)


basho
Friday, April 15, 2011
Security
                         ‣ SSL
                         ‣ No Built In Authentication
                         ‣ HTTP Auth Via Proxy
                         ‣ Riak on the Internet?
                         ‣ Follow Best Practices




basho
Friday, April 15, 2011
System
                          Recommendations
                         ‣ Multi-core 64-bit CPUs
                         ‣ The More RAM the Better
                         ‣ Fast Disk (Raid0? SSD? SAS?)
                         ‣ SAN vs Local Disk
                         ‣ Virtualization Caveats



basho
Friday, April 15, 2011
EC2 and EBS
                    ‣ Follow DB Best Practices
                    ‣ To EBS or Not to EBS?
                    ‣ Raid0 is Faster, but an OPS Headache
                    ‣ Speed vs Fault Tolerance (Availability Zones)
                    ‣ Specific Tweaks for EC2 (net_ticktime)
                    ‣ There are MANY successful deployments.


basho
Friday, April 15, 2011
Obligatory Plug

                       For more information about support,
                      professional services, or an Enterprise
                   licenses please contact info@basho.com or
                     visit http://www.basho.com/contact.php




basho
Friday, April 15, 2011
Questions?



basho
Friday, April 15, 2011

More Related Content

PDF
How tos nagios - centos wiki
PDF
Configuration Management with Saltstack
PDF
Play ja kansai
PDF
Improving Your Heroku App Performance with Asset CDN and Unicorn
PDF
如何安装Oracle one off临时小补丁及注意事项
PDF
Relational Databases to Riak
PPT
Riak a successful failure
KEY
Introduction to Riak - Red Dirt Ruby Conf Training
How tos nagios - centos wiki
Configuration Management with Saltstack
Play ja kansai
Improving Your Heroku App Performance with Asset CDN and Unicorn
如何安装Oracle one off临时小补丁及注意事项
Relational Databases to Riak
Riak a successful failure
Introduction to Riak - Red Dirt Ruby Conf Training

Viewers also liked (6)

KEY
Introducing Riak
KEY
Riak Training Session — Surge 2011
PDF
Riak (Øredev nosql day)
PDF
Riak - From Small to Large
PDF
Distributed Key-Value Stores- Featuring Riak
KEY
Riak in Ten Minutes
Introducing Riak
Riak Training Session — Surge 2011
Riak (Øredev nosql day)
Riak - From Small to Large
Distributed Key-Value Stores- Featuring Riak
Riak in Ten Minutes
Ad

Similar to Riak Operations (20)

PDF
Oracle Release 12 E-Business Suite Patching Best Practices
KEY
Deploying and maintaining your software with RPM/APT
KEY
Using Basho Bench to Load Test Distributed Applications
PDF
Percona xtrabackup - MySQL Meetup @ Mumbai
ODP
about Debian "squeeze" @201002 OSC Tokyospring
PDF
Subversion Day Berlin 2011 Configuration Management With Subversion And Rpm
PDF
OpenNebula, the foreman and CentOS play nice, too
PDF
Ansible on AWS
ODP
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
PDF
Filesystem Performance from a Database Perspective
PDF
Ungooglable
PDF
[ElasticStack]What happens when you visualize servers exposed to the world?
PPT
1. Scaling PHP/MySQL...Presentation from Flickr
PDF
HBaseConAsia2019 Keynote
PDF
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
PDF
Rails Application Optimization Techniques & Tools
PDF
Migrating to a bazel based CI system: 6 learnings
PDF
CPANTS: Kwalitative website and its tools
PPTX
PDF
Introduction to Ansible (Pycon7 2016)
Oracle Release 12 E-Business Suite Patching Best Practices
Deploying and maintaining your software with RPM/APT
Using Basho Bench to Load Test Distributed Applications
Percona xtrabackup - MySQL Meetup @ Mumbai
about Debian "squeeze" @201002 OSC Tokyospring
Subversion Day Berlin 2011 Configuration Management With Subversion And Rpm
OpenNebula, the foreman and CentOS play nice, too
Ansible on AWS
Nagios Conference 2012 - Dan Wittenberg - Case Study: Scaling Nagios Core at ...
Filesystem Performance from a Database Perspective
Ungooglable
[ElasticStack]What happens when you visualize servers exposed to the world?
1. Scaling PHP/MySQL...Presentation from Flickr
HBaseConAsia2019 Keynote
Dynamic tracing of MariaDB on Linux - problems and solutions (MariaDB Server ...
Rails Application Optimization Techniques & Tools
Migrating to a bazel based CI system: 6 learnings
CPANTS: Kwalitative website and its tools
Introduction to Ansible (Pycon7 2016)
Ad

Recently uploaded (20)

PPTX
Machine Learning_overview_presentation.pptx
PPTX
1. Introduction to Computer Programming.pptx
PPTX
A Presentation on Artificial Intelligence
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Getting Started with Data Integration: FME Form 101
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Big Data Technologies - Introduction.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
PPTX
Tartificialntelligence_presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
Machine Learning_overview_presentation.pptx
1. Introduction to Computer Programming.pptx
A Presentation on Artificial Intelligence
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Getting Started with Data Integration: FME Form 101
gpt5_lecture_notes_comprehensive_20250812015547.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation_ Review paper, used for researhc scholars
NewMind AI Weekly Chronicles - August'25-Week II
Big Data Technologies - Introduction.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology
Tartificialntelligence_presentation.pptx
Electronic commerce courselecture one. Pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)

Riak Operations

  • 1. Riak Operations Grant Schofield Developer Advocate Basho Technologies, Inc. basho Friday, April 15, 2011
  • 2. Installing Riak ‣ http://downloads.basho.com ‣ Packages (Debs, RPMs, Pkgs) ‣ Source Install (Requires Erlang) ‣ “Dev” Installs basho Friday, April 15, 2011
  • 3. Where is Riak ‣ Source and Solaris ‣ /etc/riak ‣ /usr/sbin/riak|riak-admin ‣ /usr/lib|lib64/riak << Meat ‣ /var/log/riak << Log Dir ‣ /var/lib/riak << Data Dir ‣ /tmp/riak << Sockets basho Friday, April 15, 2011
  • 4. /etc/riak ‣ app.config ‣ Riak Configuration ‣ riak_core,riak_kv, bitcask ‣ vm.args ‣ Erlang VM Settings ‣ -name riak@<ip> basho Friday, April 15, 2011
  • 5. /usr/sbin/riak ‣ Wrapped by /etc/init.d/riak ‣ Runs Riak User (sudo) ‣ start | stop ‣ restart|reboot ‣ ping ‣ console | attach basho Friday, April 15, 2011
  • 6. /usr/sbin/riak-admin ‣ join | leave | remove | reip ‣ backup | restore (cluster or node) ‣ test | status | js_reload ‣ wait-for-service | ringready | transfers ‣ cluster_info basho Friday, April 15, 2011
  • 7. riak-admin status vnode gets/puts in read-repairs in the the last 60 seconds gets/puts total vnode last 60 seconds node gets since start in the total node gets last 60 seconds since start times get_fsm node puts in inthe microseconds total node puts last 60 seconds since start put_fsm times total read-repairs in microseconds since start basho Friday, April 15, 2011
  • 10. cluster_info cont... Total Memory Use <0.108.0>?? basho Friday, April 15, 2011
  • 11. <0.108.0> snmp process basho Friday, April 15, 2011
  • 12. mailboxes (message queue) basho Friday, April 15, 2011
  • 14. Logging ‣ Not Typical (Built in Rotation) ‣ /var/log/riak/erlang.log.X ‣ Console Output ‣ /var/log/riak/sasl-error.log ‣ Errors and Crash Reports ‣ /var/log/riak/sasl << Report Browser basho Friday, April 15, 2011
  • 18. Riak Performance ‣ MANY Variables ‣ Backend Choice (Innostore vs Bitcask) ‣ Hardware vs Virtualized ‣ Access Patterns ‣ Correct System Configuration ‣ Knowing your Environment basho Friday, April 15, 2011
  • 19. Bitcask Tuning ‣ KeyDir is in Memory ‣ Fileystem Cache (Access Profile Considerations) ‣ Merge Trigger Settings ‣ Scheduling Bitcask Merges ‣ Key Expiration basho Friday, April 15, 2011
  • 20. Innostore Tuning ‣ Similar to MySQL + InnoDB ‣ buffer pool size ‣ o_direct ‣ log_files_in_groups ‣ Separate Spindles for Log and Data basho Friday, April 15, 2011
  • 21. Tools You Should Know ‣ riak-admin status ‣ top ‣ iostat -x 2 ‣ sar ‣ basho_bench basho Friday, April 15, 2011
  • 24. Tips for Performance ‣ Start with a “DB” Like Machine Profile ‣ noatime mounts ‣ Ring Size ‣ Horizontal vs Vertical Scaling ‣ Basho Bench Testing ‣ Limit List Keys and Full Bucket MapReduce ‣ Graph Everything basho Friday, April 15, 2011
  • 25. Metrics & Monitoring ‣ Integrates with Everything!! ‣ SNMP (Enterprise Plug) ‣ JMX (Enterprise Plug) ‣ Wrapping riak-admin status ‣ /ping ‣ /stats ‣ Read/Write a Key basho Friday, April 15, 2011
  • 26. Load Balancing ‣ HTTP - HAProxy, nginx, etc... ‣ Protocol Buffers - Any TCP Load Balancer ‣ Least Connected basho Friday, April 15, 2011
  • 27. Backups ‣ Different Depending on Backend ‣ Innostore ‣ riak-admin backup (node | cluster) ‣ Bitcask ‣ rsync ‣ snapshots ‣ cp ? ‣ Enterprise Replication basho Friday, April 15, 2011
  • 28. A node has horked! Now what? ‣ That Depends..... ‣ How did the node die? ‣ Do you still have the data? ‣ Start the Node ‣ No data? ‣ Restore or Replace Node basho Friday, April 15, 2011
  • 29. Configuration Management ‣ Riak is Unix ‣ Chef, Puppet, Etc. ‣ Chef Cookbook is Advanced ‣ “Auto” Joining Nodes to a Cluster (ringready) ‣ Node vs IP Naming (vm.args -name) basho Friday, April 15, 2011
  • 30. Security ‣ SSL ‣ No Built In Authentication ‣ HTTP Auth Via Proxy ‣ Riak on the Internet? ‣ Follow Best Practices basho Friday, April 15, 2011
  • 31. System Recommendations ‣ Multi-core 64-bit CPUs ‣ The More RAM the Better ‣ Fast Disk (Raid0? SSD? SAS?) ‣ SAN vs Local Disk ‣ Virtualization Caveats basho Friday, April 15, 2011
  • 32. EC2 and EBS ‣ Follow DB Best Practices ‣ To EBS or Not to EBS? ‣ Raid0 is Faster, but an OPS Headache ‣ Speed vs Fault Tolerance (Availability Zones) ‣ Specific Tweaks for EC2 (net_ticktime) ‣ There are MANY successful deployments. basho Friday, April 15, 2011
  • 33. Obligatory Plug For more information about support, professional services, or an Enterprise licenses please contact info@basho.com or visit http://www.basho.com/contact.php basho Friday, April 15, 2011