Successfully reported this slideshow.
Your SlideShare is downloading. ×

Optimizing ScyllaDB Performance via Observability

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 23 Ad

Optimizing ScyllaDB Performance via Observability

ScyllaDB already does a great job at basic performance optimization at install time and run-time, with IO tuning for your SSDs and real-time dynamic IO and CPU scheduling. Yet there’s more that you, as a user, can do by observing ScyllaDB’s operations. Learn how to get the most out of your database by using these open source tools, techniques and best practices.

ScyllaDB already does a great job at basic performance optimization at install time and run-time, with IO tuning for your SSDs and real-time dynamic IO and CPU scheduling. Yet there’s more that you, as a user, can do by observing ScyllaDB’s operations. Learn how to get the most out of your database by using these open source tools, techniques and best practices.

Advertisement
Advertisement

More Related Content

Similar to Optimizing ScyllaDB Performance via Observability (20)

More from ScyllaDB (20)

Advertisement

Recently uploaded (20)

Optimizing ScyllaDB Performance via Observability

  1. 1. Optimizing ScyllaDB Performance via Observability Amnon Heiman, Principal Software Engineer
  2. 2. Amnon Heiman Over 20 years of experience in software development for large scale systems. Holds a BA and MSc in Computer Science from the Technion-Machon Technologi Le’ Israel and an MBA from Tel Aviv University.
  3. 3. ■ ScyllaDB Monitoring 101 ■ Monitoring while developing ■ Performance degradation ■ Alerts Agenda
  4. 4. ScyllaDB Monitoring 101
  5. 5. ScyllaDB Monitoring Stack Components ■ By default - Container Based ■ Prometheus ■ ScyllaDB ■ Node-exporter ■ Grafana-Loki ■ Alert-Manager ■ Grafana ■ Can read ScyllaDB tables
  6. 6. ScyllaDB Monitoring Stack Components ScyllaDB ScyllaDB ScyllaDB
  7. 7. Monitoring While Developing
  8. 8. Development With NoSQL Databases ■ Think about the queries first ■ Create a data model ■ Indexing ■ Consistency/Availability ■ Replication ■ Test with traffic ■ Validate after installation
  9. 9. Read/Write With Replication 9 R1 R2 R3 Client Coordinator Node 5 Nodes Cluster Replication Factor 3
  10. 10. Always Use Token-Aware Drivers 10 R1 R2 R3 Client Coordinator Node 5 Nodes Cluster Replication Factor 3
  11. 11. CQL Optimization
  12. 12. Non-Prepared Statements
  13. 13. Always Prepare Your Statements ■ Performance ■ The driver can find a replica node ■ The server only parses the query once ■ Security ■ CQL Injection user_lookup_stmt = session.prepare("SELECT * FROM users WHERE user_id=?") users = [] for user_id in user_ids_to_query: user = session.execute(user_lookup_stmt, [user_id]) users.append(user) for user_id in user_ids_to_query: user = session.execute("select * from users WHERE user_id=" + user_id)
  14. 14. Reverse Order Reads ■ You can sort SELECT results by the clustering key ■ For best results, sort by the defined order
  15. 15. Consistency Level Consistency - Under what conditions a read after a write will return that write ■ Prefer CL LOCAL QUORUM ■ Never use CL ANY ■ Avoid using CL ALL ■ Use CL ONE with care
  16. 16. Common Pitfalls ■ Be careful with allow filtering ■ Be careful with reverse order reads ■ Be careful from full range scan ■ Use Paging for queries that return a lot of data
  17. 17. Performance Degradation ScyllaDB Was Fine and Now It’s Not
  18. 18. Overview Dashboard
  19. 19. Overview Dashboard ■ Hardware failures ■ Timeout and latencies spikes - system overload ■ Imbalance - hardware failure or hot partition ■ Advisor table - check for known issues
  20. 20. Alerts
  21. 21. ScyllaDB Monitoring Stack Components ScyllaDB ScyllaDB ScyllaDB
  22. 22. Alerts and the Alertmanager ■ Alert source ■ Prometheus - Metrics based alerts ■ Loki - Logs based alerts ■ Alertmanager Distribute Alerts to other systems ■ Email ■ Pagerduty ■ Slack ■ webhooks ■ Preset rules out of the box
  23. 23. Thank You Stay in Touch Amnon Heiman amnon@scylladb.com amnonheiman amnonh amnon-heiman-939421

×