Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

TokuDB - What You Need to Know

735 views

Published on

TokuDB essentials from evaluation, adoption and operations.

Published in: Data & Analytics
  • Be the first to comment

TokuDB - What You Need to Know

  1. 1. TokuDB: What You Need to Know Jervin Real MySQL and Friends, FOSDEM 2016
  2. 2. Jervin Real
  3. 3. Why are you looking at TokuDB?
  4. 4. You think it’s shiny?
  5. 5. Shiny TokuDB Features •Compression choices •Hot schema changes •Amortized writes •Longer hardware life •Faster replication •Multiple clustering indexes
  6. 6. Because you need to get past InnoDB limitations?
  7. 7. Evaluation •Queries •Overall performance •Requirements
  8. 8. Evaluation - Queries •Need for rewrites? •Grammatical changes
  9. 9. Performance BAD GOOD UNIQUE KEY Amortized writes, saves IO Non-sequential PK Wide tables, many indexes, good write performance SELECTs penalty from merging MBs Read free replication
  10. 10. Minimum Install - OS echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never > /sys/kernel/mm/transparent_hugepage/defrag /etc/security/limits.conf mysql soft nofile 65536 mysql hard nofile 65536
  11. 11. Minimum Install - MySQL [mysqld] open-files-limit = <LARGE_ENOUGH> tokudb_fs_reserve_percent = <FIXED_SIZE> tokudb_cache_size = <50% RAM> tokudb_directio = ON log_bin = /path/to/log-bin [mysqld_safe] malloc-lib = /path/to/jemalloc
  12. 12. Minimum Install - MySQL
  13. 13. Minimum Install - MySQL [mysqld] open-files-limit = <LARGE_ENOUGH> tokudb_fs_reserve_percent = <FIXED_SIZE> tokudb_cache_size = <50% RAM> tokudb_directio = ON log_bin = /path/to/log-bin [mysqld_safe] malloc-lib = /path/to/jemalloc
  14. 14. Loading Data •ALTER TABLE innodbtbl ENGINE=TokuDB; •mysql tokuschema < mysqldumpfile.sql •SELECT INTO OUTFILE, LOAD DATA INTO
  15. 15. Backups •Open source plugin TokuDB Hot Backup •Copies EVERYTHING! •datadir, tokudb_data_dir, tokudb_tmp_dir, tokudb_log_dir •Disable innodb_use_native_aio! – lp#1521590 •Use LVM!
  16. 16. What to Monitor •Open file descriptors •Swapping •Checkpoint durations
  17. 17. Questions?

×