Riak Operations                               Grant Schofield                             Developer Advocate               ...
Installing Riak                         ‣ http://downloads.basho.com                         ‣ Packages (Debs, RPMs, Pkgs)...
Where is Riak                         ‣ Source and Solaris                         ‣ /etc/riak                         ‣ /...
/etc/riak                         ‣ app.config                            ‣ Riak Configuration                            ‣ ...
/usr/sbin/riak                         ‣ Wrapped by /etc/init.d/riak                         ‣ Runs Riak User (sudo)      ...
/usr/sbin/riak-admin                         ‣ join | leave | remove | reip                         ‣ backup | restore (cl...
riak-admin status                                  vnode gets/puts in                                    read-repairs in t...
riak-admin transfersbashoFriday, April 15, 2011
riak-admin cluster_infobashoFriday, April 15, 2011
cluster_info cont...                                    Total Memory Use                                    <0.108.0>??bas...
<0.108.0>                                snmp processbashoFriday, April 15, 2011
mailboxes                         (message queue)bashoFriday, April 15, 2011
mailboxes cont..bashoFriday, April 15, 2011
Logging                         ‣ Not Typical (Built in Rotation)                         ‣ /var/log/riak/erlang.log.X    ...
Using rbbashoFriday, April 15, 2011
Using rb cont...bashoFriday, April 15, 2011
Using rb cont...bashoFriday, April 15, 2011
Riak Performance                         ‣ MANY Variables                         ‣ Backend Choice (Innostore vs Bitcask) ...
Bitcask Tuning               ‣ KeyDir is in Memory               ‣ Fileystem Cache (Access Profile Considerations)         ...
Innostore Tuning                         ‣ Similar to MySQL + InnoDB                         ‣ buffer pool size           ...
Tools You Should Know                         ‣ riak-admin status                         ‣ top                         ‣ ...
A Basic BottleneckbashoFriday, April 15, 2011
bashoFriday, April 15, 2011
Tips for Performance                         ‣ Start with a “DB” Like Machine Profile                         ‣ noatime mou...
Metrics & Monitoring                         ‣ Integrates with Everything!!                         ‣ SNMP (Enterprise Plu...
Load Balancing                         ‣ HTTP - HAProxy, nginx, etc...                         ‣ Protocol Buffers - Any TC...
Backups                         ‣ Different Depending on Backend                         ‣ Innostore                      ...
A node has horked!                            Now what?                         ‣ That Depends.....                       ...
Configuration                               Management                         ‣ Riak is Unix                         ‣ Che...
Security                         ‣ SSL                         ‣ No Built In Authentication                         ‣ HTTP...
System                          Recommendations                         ‣ Multi-core 64-bit CPUs                         ‣...
EC2 and EBS                    ‣ Follow DB Best Practices                    ‣ To EBS or Not to EBS?                    ‣ ...
Obligatory Plug                       For more information about support,                      professional services, or a...
Questions?bashoFriday, April 15, 2011
Upcoming SlideShare
Loading in...5
×

Riak Operations

3,853

Published on

Published in: Technology
1 Comment
10 Likes
Statistics
Notes
  • We did Riak performance test compared to cassandra. We deploy cassandra and Riak on the same machine and do performance benchmark at different time. Our client is YCSB. However, we have not get similar riak result as what you post here. The riak throughout is only about 2-3k operations/s for PB client while only ~1koperation/s for HttpClient. We have did some tuning before we setup riak such as ulimit, ubuntu socket, bitcask and other parameters in vm.args.

    Totally, it performance is about 2 times worse than cassandra.

    Would you do mind share your riak configuration that you used to collect data in your PPT?
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
3,853
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
1
Likes
10
Embeds 0
No embeds

No notes for slide

Transcript of "Riak Operations"

  1. 1. Riak Operations Grant Schofield Developer Advocate Basho Technologies, Inc.bashoFriday, April 15, 2011
  2. 2. Installing Riak ‣ http://downloads.basho.com ‣ Packages (Debs, RPMs, Pkgs) ‣ Source Install (Requires Erlang) ‣ “Dev” InstallsbashoFriday, April 15, 2011
  3. 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 << SocketsbashoFriday, April 15, 2011
  4. 4. /etc/riak ‣ app.config ‣ Riak Configuration ‣ riak_core,riak_kv, bitcask ‣ vm.args ‣ Erlang VM Settings ‣ -name riak@<ip>bashoFriday, April 15, 2011
  5. 5. /usr/sbin/riak ‣ Wrapped by /etc/init.d/riak ‣ Runs Riak User (sudo) ‣ start | stop ‣ restart|reboot ‣ ping ‣ console | attachbashoFriday, April 15, 2011
  6. 6. /usr/sbin/riak-admin ‣ join | leave | remove | reip ‣ backup | restore (cluster or node) ‣ test | status | js_reload ‣ wait-for-service | ringready | transfers ‣ cluster_infobashoFriday, April 15, 2011
  7. 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 startbashoFriday, April 15, 2011
  8. 8. riak-admin transfersbashoFriday, April 15, 2011
  9. 9. riak-admin cluster_infobashoFriday, April 15, 2011
  10. 10. cluster_info cont... Total Memory Use <0.108.0>??bashoFriday, April 15, 2011
  11. 11. <0.108.0> snmp processbashoFriday, April 15, 2011
  12. 12. mailboxes (message queue)bashoFriday, April 15, 2011
  13. 13. mailboxes cont..bashoFriday, April 15, 2011
  14. 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 BrowserbashoFriday, April 15, 2011
  15. 15. Using rbbashoFriday, April 15, 2011
  16. 16. Using rb cont...bashoFriday, April 15, 2011
  17. 17. Using rb cont...bashoFriday, April 15, 2011
  18. 18. Riak Performance ‣ MANY Variables ‣ Backend Choice (Innostore vs Bitcask) ‣ Hardware vs Virtualized ‣ Access Patterns ‣ Correct System Configuration ‣ Knowing your EnvironmentbashoFriday, April 15, 2011
  19. 19. Bitcask Tuning ‣ KeyDir is in Memory ‣ Fileystem Cache (Access Profile Considerations) ‣ Merge Trigger Settings ‣ Scheduling Bitcask Merges ‣ Key ExpirationbashoFriday, April 15, 2011
  20. 20. Innostore Tuning ‣ Similar to MySQL + InnoDB ‣ buffer pool size ‣ o_direct ‣ log_files_in_groups ‣ Separate Spindles for Log and DatabashoFriday, April 15, 2011
  21. 21. Tools You Should Know ‣ riak-admin status ‣ top ‣ iostat -x 2 ‣ sar ‣ basho_benchbashoFriday, April 15, 2011
  22. 22. A Basic BottleneckbashoFriday, April 15, 2011
  23. 23. bashoFriday, April 15, 2011
  24. 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 EverythingbashoFriday, April 15, 2011
  25. 25. Metrics & Monitoring ‣ Integrates with Everything!! ‣ SNMP (Enterprise Plug) ‣ JMX (Enterprise Plug) ‣ Wrapping riak-admin status ‣ /ping ‣ /stats ‣ Read/Write a KeybashoFriday, April 15, 2011
  26. 26. Load Balancing ‣ HTTP - HAProxy, nginx, etc... ‣ Protocol Buffers - Any TCP Load Balancer ‣ Least ConnectedbashoFriday, April 15, 2011
  27. 27. Backups ‣ Different Depending on Backend ‣ Innostore ‣ riak-admin backup (node | cluster) ‣ Bitcask ‣ rsync ‣ snapshots ‣ cp ? ‣ Enterprise ReplicationbashoFriday, April 15, 2011
  28. 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 NodebashoFriday, April 15, 2011
  29. 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)bashoFriday, April 15, 2011
  30. 30. Security ‣ SSL ‣ No Built In Authentication ‣ HTTP Auth Via Proxy ‣ Riak on the Internet? ‣ Follow Best PracticesbashoFriday, April 15, 2011
  31. 31. System Recommendations ‣ Multi-core 64-bit CPUs ‣ The More RAM the Better ‣ Fast Disk (Raid0? SSD? SAS?) ‣ SAN vs Local Disk ‣ Virtualization CaveatsbashoFriday, April 15, 2011
  32. 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.bashoFriday, April 15, 2011
  33. 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.phpbashoFriday, April 15, 2011
  34. 34. Questions?bashoFriday, April 15, 2011

×