SlideShare uma empresa Scribd logo
1 de 35
Get More Out of 
MySQL with TokuDB 
Tim Callaghan 
VP/Engineering, Tokutek 
tim@tokutek.com 
@tmcallaghan
Tokutek: Database Performance Engines 
What is Tokutek? 
Tokutek® offers high performance and scalability for MySQL, 
MariaDB and MongoDB. Our easy-to-use open source solutions 
are compatible with your existing code and application 
infrastructure. 
Tokutek Performance Engines Remove Limitations 
• Improve insertion performance by 20X 
• Reduce HDD and flash storage requirements up to 90% 
• No need to rewrite code 
Tokutek Mission: 
Empower your database to handle the Big Data 
requirements of today’s applications
3 
A Global Customer Base
Housekeeping 
• This presentation will be available for replay 
following the event 
• We welcome your questions; please use the console 
on the right of your screen and we will answer 
following the presentation 
• A copy of the presentation is available upon request
Agenda 
Lets answer the following questions, “How can you…?” 
• Easily install and configure TokuDB. 
• Dramatically increase performance without rewriting 
code. 
• Reduce the total cost of your servers and storage. 
• Simply perform online schema changes. 
• Avoid becoming the support staff for your 
application. 
• And Q+A
How easy is it to install and 
configure TokuDB for 
MySQL or MariaDB?
What is TokuDB? 
• TokuDB = MySQL* Storage Engine + Patches** 
– * MySQL, MariaDB, Percona Server 
– ** Patches are required for full functionality 
– TokuDB is more than a plugin 
• Transactional, ACID + MVCC 
– Like InnoDB 
• Drop-in replacement for MySQL 
• Open Source 
– http://github.com/Tokutek/ft-engine
Where can I get TokuDB? 
• Tokutek offers MySQL 5.5 and MariaDB 5.5 builds 
– www.tokutek.com 
• MariaDB 5.5 and 10 
– www.mariadb.org 
– Also in MariaDB 5.5 from various package repositories 
• Experimental Percona Server 5.6 builds 
– www.percona.com
Is it truly a “drop in replacement”? 
• No Foreign Key support 
– you’ll need to drop them 
• No Windows or OSX binaries 
– Virtual machines are helpful in evaluations 
• No 32-bit builds 
• Otherwise, yes
How do I get started? 
• Start Fresh 
– create table <table> engine=tokudb; 
– mysqldump / load data infile 
• Use your existing MySQL data folder 
– alter table <table-to-convert> engine=tokudb; 
• Measure the differences 
– compression : load/convert your tables 
– performance : run your workload 
– online schema changes : add a column
Before you dive in – check you’re my.cnf 
• TokuDB uses sensible server parameter defaults, but 
• Be mindful of your memory 
– Reduce innodb_buffer_pool_size (InnoDB) and 
key_cache_size (MyISAM) 
– Especially if converting tables 
– tokudb_cache_size=?G 
– Defaults to 50% of RAM, I recommend 80% 
– tokudb_directio=1 
• Leave everything else alone
How can I dramatically 
increase performance without 
having to rewrite code?
Where does the performance come from? 
• Tokutek’s Fractal Tree® indexes 
– Much faster than B-trees in > RAM workloads 
– InnoDB and MyISAM use B-trees 
– Significant IO reduction 
– Messages defer IO on add/update/delete 
– All reads and writes are compressed 
– Enables users to add more indexes 
– Queries go faster 
• Lots of good webinar content on our website 
– www.tokutek.com/resources/webinars
How much can I reduce my IO? 
Converted from 
InnoDB to TokuDB
How fast can I insert data into TokuDB? 
• InnoDB’s B-trees 
– Fast until the index not longer fits in RAM 
• TokuDB’s Fractal Tree indexes 
– Start fast, stay fast! 
• iiBench benchmark 
– Insert 1 billion rows 
– 1000 inserts per batch 
– Auto-increment PK 
– 3 secondary indexes
How fast can I insert data into TokuDB?
How fast are mixed workloads? 
• Fast, since > RAM mixed workloads generally contain… 
– Index maintenance (insert, update, delete) 
– Fractal Tree indexes FTW! 
– Queries 
– TokuDB enables richer indexing (more indexes) 
• Sysbench benchmark 
– 16 tables, 50 million rows per table 
– Each Sysbench transaction contains 
– 1 of each query : point, range, aggregation 
– indexed update, unindexed update, delete, insert
How fast are mixed workloads?
How do secondary indexes work? 
• InnoDB and TokuDB “cluster” the primary key index 
– The key (PK) and all other columns are co-located in 
memory and on disk 
• Secondary indexes co-locate the “index key” and PK 
– When a candidate row is found a second lookup 
occurs into the PK index 
– This means an additional IO is required 
– MySQL’s “hidden join”
What is a clustered secondary index? 
• “Covering” indexes remove this second lookup, but 
require putting the right columns into the index 
– create index idx_1 on t1 (c1, c2, c3, c4, c5, c6); 
– If c1/c2 are queried, only c3/c4/c5/c6 are covered 
– No additional IO, but c7 isn’t covered 
• TokuDB supports clustered secondary indexes 
– create clustering index idx_1 on t1 (c1, c2); 
– All columns in t1 are covered, forever 
– Even if new columns are added to the table
What are clustered secondary indexes good at? 
• Two words, “RANGE SCANS” 
• Several rows (maybe thousands) are scanned without 
requiring additional lookups on the PK index 
• Also, TokuDB blocks are much larger than InnoDB 
– TokuDB = 4MB blocks = sequential IO 
– InnoDB = 16KB blocks = random IO 
• Can be orders of magnitude faster for range queries
Can SQL be optimized? 
• Fractal Tree indexes support message injection 
– The actual work (and IO) can be deferred 
• Example: 
– update t1 set k = k + 1 where pk = 5; 
– InnoDB follows read-modify-write pattern 
– If field “k” is not indexed, TokuDB avoids IO entirely 
– An “increment” message is injected 
• Current optimizations 
– “replace into”, “insert ignore”, “update”, “insert on 
duplicate key update”
How can I reduce the total cost 
of my servers and storage?
How can I use less storage? 
• Compression, compression, compression! 
• All IO in TokuDB is compressed 
– Reads and writes 
– Usually ~5x compression (but I’ve seen 25x or more) 
• TokuDB [currently] supports 3 compression algorithms 
– lzma = highest compression (and high CPU) 
– zlib = high compression (and much less CPU) 
– quicklz = medium compression (even less CPU) 
– pluggable architecture, lz4 and snappy “in the lab”
But doesn’t InnoDB support compression? 
• Yes, but the compression achieved is far lower 
– InnoDB compresses 16K blocks, TokuDB is 64K or 128K 
– InnoDB requires fixed on-disk size, TokuDB is flexible 
*log style data
But doesn’t InnoDB support compression? 
• And InnoDB performance is severely impacted by it 
– Compression “misses” are costly 
*iiBench workload
How do I compress my data in TokuDB? 
create table t1 (c1 bigint not null primary key) 
engine=tokudb 
row_format=[tokudb_lzma | tokudb_zlib | tokudb_quicklz]; 
NOTE: Compression is not optional in TokuDB, we use 
compression to provide performance advantages as well as save 
space.
How can I perform online 
schema changes?
What is an “online” schema change? 
My definition 
“An online schema change is the ability to add or drop a column 
on an existing table without blocking further changes to the 
table or requiring substantial server resources (CPU, RAM, IO, 
disk) to accomplish the operation.” 
P.S., I’d like for it to be instantaneous!
What do blocking schema changes look like?
How have online schema changes evolved? 
• MySQL 5.5 
– Table is read-only while entire table is re-created 
• “Manual” process 
– Take slave offline, apply to slave, catch up to master, 
switch places, repeat 
• MySQL 5.6 (and ~ Percona’s pt-online-schema-change-tool) 
– Table is rebuilt “in the background” 
– Changes are captured, and replayed on new table 
– Uses significant RAM, CPU, IO, and disk space 
• TokuDB 
– alter table t1 add column new_column bigint; 
– Done!
What online schema changes can TokuDB handle? 
• Add column 
• Drop column 
• Expand column 
– integer types 
– varchar, char, varbinary 
• Index creation
How can I avoid becoming the 
support staff for my 
application?
34 
Where can I get TokuDB support? 
TokuDB is offered in 2 editions 
• Community 
– Community support (Google Groups “tokudb-user”) 
• Enterprise subscription 
– Commercial support 
– Wouldn’t you rather be developing another application? 
– Extra features 
–Hot backup, more on the way 
– Access to TokuDB experts 
– Input to the product roadmap
35 
Tokutek: Database Performance Engines 
Any Questions? 
Download TokuDB at www.tokutek.com/products/downloads 
Register for product updates, access to premium content, and 
invitations at www.tokutek.com 
Join the Conversation

Mais conteúdo relacionado

Mais procurados

MariaDB with SphinxSE
MariaDB with SphinxSEMariaDB with SphinxSE
MariaDB with SphinxSE
Colin Charles
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
Fuenteovejuna
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Lenz Grimmer
 

Mais procurados (20)

Get More Out of MongoDB with TokuMX
Get More Out of MongoDB with TokuMXGet More Out of MongoDB with TokuMX
Get More Out of MongoDB with TokuMX
 
Databases in the hosted cloud
Databases in the hosted cloudDatabases in the hosted cloud
Databases in the hosted cloud
 
MariaDB with SphinxSE
MariaDB with SphinxSEMariaDB with SphinxSE
MariaDB with SphinxSE
 
Best practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High AvailabilityBest practices for MySQL/MariaDB Server/Percona Server High Availability
Best practices for MySQL/MariaDB Server/Percona Server High Availability
 
An introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP EngineAn introduction to SQL Server in-memory OLTP Engine
An introduction to SQL Server in-memory OLTP Engine
 
InnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter ZaitsevInnoDB Architecture and Performance Optimization, Peter Zaitsev
InnoDB Architecture and Performance Optimization, Peter Zaitsev
 
Databases in the Hosted Cloud
Databases in the Hosted CloudDatabases in the Hosted Cloud
Databases in the Hosted Cloud
 
Is It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB PerformanceIs It Fast? : Measuring MongoDB Performance
Is It Fast? : Measuring MongoDB Performance
 
Capacity planning for your data stores
Capacity planning for your data storesCapacity planning for your data stores
Capacity planning for your data stores
 
MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012MariaDB 5.5 and what comes next - Percona Live NYC 2012
MariaDB 5.5 and what comes next - Percona Live NYC 2012
 
MySQL High Availability Solutions
MySQL High Availability SolutionsMySQL High Availability Solutions
MySQL High Availability Solutions
 
MariaDB: The New M In LAMP - SCALE10x
MariaDB: The New M In LAMP - SCALE10xMariaDB: The New M In LAMP - SCALE10x
MariaDB: The New M In LAMP - SCALE10x
 
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
Making MySQL Administration a Breeze - A look into a MySQL DBA's toolchest
 
Fractal Tree Indexes : From Theory to Practice
Fractal Tree Indexes : From Theory to PracticeFractal Tree Indexes : From Theory to Practice
Fractal Tree Indexes : From Theory to Practice
 
MariaDB: The 2012 Edition
MariaDB: The 2012 EditionMariaDB: The 2012 Edition
MariaDB: The 2012 Edition
 
Remote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New FeaturesRemote DBA Experts SQL Server 2008 New Features
Remote DBA Experts SQL Server 2008 New Features
 
Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016Tuning Linux for your database FLOSSUK 2016
Tuning Linux for your database FLOSSUK 2016
 
Distributions from the view a package
Distributions from the view a packageDistributions from the view a package
Distributions from the view a package
 
Lessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’tLessons PostgreSQL learned from commercial databases, and didn’t
Lessons PostgreSQL learned from commercial databases, and didn’t
 
My first moments with MongoDB
My first moments with MongoDBMy first moments with MongoDB
My first moments with MongoDB
 

Destaque

softwares livres - open source
softwares livres - open sourcesoftwares livres - open source
softwares livres - open source
taniateb
 
Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...
Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...
Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...
Sérgio Souza Costa
 

Destaque (7)

O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
O que é o SecondLife? Sabia que este pode catalisar a colaboração na sua empr...
 
Porque a-burocracia-deve-morrer
Porque a-burocracia-deve-morrerPorque a-burocracia-deve-morrer
Porque a-burocracia-deve-morrer
 
Ulteo virtual desktop system
Ulteo virtual desktop systemUlteo virtual desktop system
Ulteo virtual desktop system
 
softwares livres - open source
softwares livres - open sourcesoftwares livres - open source
softwares livres - open source
 
Open Source Vantagens E Beneficios - By Softelabs
Open Source   Vantagens E Beneficios - By SoftelabsOpen Source   Vantagens E Beneficios - By Softelabs
Open Source Vantagens E Beneficios - By Softelabs
 
Apresentacao Suse
Apresentacao SuseApresentacao Suse
Apresentacao Suse
 
Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...
Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...
Software Livre (Conceitos, contextualização histórica, licenças, sistemas ope...
 

Semelhante a 20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02

InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)
Ontico
 
Software Engineering Advice from Google's Jeff Dean for Big, Distributed Systems
Software Engineering Advice from Google's Jeff Dean for Big, Distributed SystemsSoftware Engineering Advice from Google's Jeff Dean for Big, Distributed Systems
Software Engineering Advice from Google's Jeff Dean for Big, Distributed Systems
adrianionel
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
Morgan Tocker
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 
mogpres
mogpresmogpres
mogpres
xlight
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
DATAVERSITY
 

Semelhante a 20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02 (20)

[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale  by ...
[db tech showcase Tokyo 2014] B15: Scalability with MariaDB and MaxScale by ...
 
Performance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons LearnedPerformance Benchmarking: Tips, Tricks, and Lessons Learned
Performance Benchmarking: Tips, Tricks, and Lessons Learned
 
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
[DBA]_HiramFleitas_SQL_PASS_Summit_2017_Summary
 
5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB5 Pitfalls to Avoid with MongoDB
5 Pitfalls to Avoid with MongoDB
 
InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)
 
MySQL Performance - Best practices
MySQL Performance - Best practices MySQL Performance - Best practices
MySQL Performance - Best practices
 
Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化
 
AWS Redshift Introduction - Big Data Analytics
AWS Redshift Introduction - Big Data AnalyticsAWS Redshift Introduction - Big Data Analytics
AWS Redshift Introduction - Big Data Analytics
 
Software Engineering Advice from Google's Jeff Dean for Big, Distributed Systems
Software Engineering Advice from Google's Jeff Dean for Big, Distributed SystemsSoftware Engineering Advice from Google's Jeff Dean for Big, Distributed Systems
Software Engineering Advice from Google's Jeff Dean for Big, Distributed Systems
 
Howmysqlworks
HowmysqlworksHowmysqlworks
Howmysqlworks
 
Your backend architecture is what matters slideshare
Your backend architecture is what matters slideshareYour backend architecture is what matters slideshare
Your backend architecture is what matters slideshare
 
Database as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance PlatformDatabase as a Service on the Oracle Database Appliance Platform
Database as a Service on the Oracle Database Appliance Platform
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
Using a Fast Operational Database to Build Real-time Streaming Aggregations
Using a Fast Operational Database to Build Real-time Streaming AggregationsUsing a Fast Operational Database to Build Real-time Streaming Aggregations
Using a Fast Operational Database to Build Real-time Streaming Aggregations
 
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast DataDatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
DatEngConf SF16 - Apache Kudu: Fast Analytics on Fast Data
 
mogpres
mogpresmogpres
mogpres
 
Real World Performance - Data Warehouses
Real World Performance - Data WarehousesReal World Performance - Data Warehouses
Real World Performance - Data Warehouses
 
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
 
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
A Case Study of NoSQL Adoption: What Drove Wordnik Non-Relational?
 

Mais de Francisco Gonçalves

O rad da wave maker developing for the cloud
O rad da wave maker developing for the cloudO rad da wave maker developing for the cloud
O rad da wave maker developing for the cloud
Francisco Gonçalves
 
Scale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria dbScale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria db
Francisco Gonçalves
 
Re pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containersRe pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containers
Francisco Gonçalves
 
O docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-tiO docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-ti
Francisco Gonçalves
 
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Francisco Gonçalves
 

Mais de Francisco Gonçalves (20)

A automatização e virtualização do seu negócio
A automatização e virtualização do seu negócioA automatização e virtualização do seu negócio
A automatização e virtualização do seu negócio
 
O rad da wave maker developing for the cloud
O rad da wave maker developing for the cloudO rad da wave maker developing for the cloud
O rad da wave maker developing for the cloud
 
Scale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria dbScale out database apps através de galera cluster e maria db
Scale out database apps através de galera cluster e maria db
 
Re pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containersRe pensando-virtualização-através-linux containers
Re pensando-virtualização-através-linux containers
 
O docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-tiO docker vai mudar tudo na sua infra estrutura-ti
O docker vai mudar tudo na sua infra estrutura-ti
 
Teamwork Web Application
Teamwork Web ApplicationTeamwork Web Application
Teamwork Web Application
 
Node Js
Node JsNode Js
Node Js
 
Hypervisor "versus" Linux Containers with Docker !
Hypervisor "versus" Linux Containers with Docker !Hypervisor "versus" Linux Containers with Docker !
Hypervisor "versus" Linux Containers with Docker !
 
MariaDB Galera Cluster presentation
MariaDB Galera Cluster presentationMariaDB Galera Cluster presentation
MariaDB Galera Cluster presentation
 
Linux capacity planning
Linux capacity planningLinux capacity planning
Linux capacity planning
 
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
Wavemaker RAD for the Cloud with CloudJee - Future Direction 2014
 
Juju on ubuntu cloud
Juju on ubuntu cloudJuju on ubuntu cloud
Juju on ubuntu cloud
 
Cloud foundry and openstackcloud
Cloud foundry and openstackcloudCloud foundry and openstackcloud
Cloud foundry and openstackcloud
 
Ubuntu cloud infrastructures
Ubuntu cloud infrastructuresUbuntu cloud infrastructures
Ubuntu cloud infrastructures
 
Openstack deployment-with ubuntu
Openstack deployment-with ubuntuOpenstack deployment-with ubuntu
Openstack deployment-with ubuntu
 
Desk top virtual_gbanif
Desk top virtual_gbanifDesk top virtual_gbanif
Desk top virtual_gbanif
 
Consolidação winintel
Consolidação winintelConsolidação winintel
Consolidação winintel
 
Legacy mainframe soa&workflow&documentcontentmgr fgon2007
Legacy mainframe soa&workflow&documentcontentmgr fgon2007Legacy mainframe soa&workflow&documentcontentmgr fgon2007
Legacy mainframe soa&workflow&documentcontentmgr fgon2007
 
Proj storage&backups&consolidaservidores&as400&pcov3
Proj storage&backups&consolidaservidores&as400&pcov3Proj storage&backups&consolidaservidores&as400&pcov3
Proj storage&backups&consolidaservidores&as400&pcov3
 
Softelab it strategies for 2010 and beyond
Softelab   it strategies for 2010 and beyondSoftelab   it strategies for 2010 and beyond
Softelab it strategies for 2010 and beyond
 

Último

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 

20140128 webinar-get-more-out-of-mysql-with-tokudb-140319063324-phpapp02

  • 1. Get More Out of MySQL with TokuDB Tim Callaghan VP/Engineering, Tokutek tim@tokutek.com @tmcallaghan
  • 2. Tokutek: Database Performance Engines What is Tokutek? Tokutek® offers high performance and scalability for MySQL, MariaDB and MongoDB. Our easy-to-use open source solutions are compatible with your existing code and application infrastructure. Tokutek Performance Engines Remove Limitations • Improve insertion performance by 20X • Reduce HDD and flash storage requirements up to 90% • No need to rewrite code Tokutek Mission: Empower your database to handle the Big Data requirements of today’s applications
  • 3. 3 A Global Customer Base
  • 4. Housekeeping • This presentation will be available for replay following the event • We welcome your questions; please use the console on the right of your screen and we will answer following the presentation • A copy of the presentation is available upon request
  • 5. Agenda Lets answer the following questions, “How can you…?” • Easily install and configure TokuDB. • Dramatically increase performance without rewriting code. • Reduce the total cost of your servers and storage. • Simply perform online schema changes. • Avoid becoming the support staff for your application. • And Q+A
  • 6. How easy is it to install and configure TokuDB for MySQL or MariaDB?
  • 7. What is TokuDB? • TokuDB = MySQL* Storage Engine + Patches** – * MySQL, MariaDB, Percona Server – ** Patches are required for full functionality – TokuDB is more than a plugin • Transactional, ACID + MVCC – Like InnoDB • Drop-in replacement for MySQL • Open Source – http://github.com/Tokutek/ft-engine
  • 8. Where can I get TokuDB? • Tokutek offers MySQL 5.5 and MariaDB 5.5 builds – www.tokutek.com • MariaDB 5.5 and 10 – www.mariadb.org – Also in MariaDB 5.5 from various package repositories • Experimental Percona Server 5.6 builds – www.percona.com
  • 9. Is it truly a “drop in replacement”? • No Foreign Key support – you’ll need to drop them • No Windows or OSX binaries – Virtual machines are helpful in evaluations • No 32-bit builds • Otherwise, yes
  • 10. How do I get started? • Start Fresh – create table <table> engine=tokudb; – mysqldump / load data infile • Use your existing MySQL data folder – alter table <table-to-convert> engine=tokudb; • Measure the differences – compression : load/convert your tables – performance : run your workload – online schema changes : add a column
  • 11. Before you dive in – check you’re my.cnf • TokuDB uses sensible server parameter defaults, but • Be mindful of your memory – Reduce innodb_buffer_pool_size (InnoDB) and key_cache_size (MyISAM) – Especially if converting tables – tokudb_cache_size=?G – Defaults to 50% of RAM, I recommend 80% – tokudb_directio=1 • Leave everything else alone
  • 12. How can I dramatically increase performance without having to rewrite code?
  • 13. Where does the performance come from? • Tokutek’s Fractal Tree® indexes – Much faster than B-trees in > RAM workloads – InnoDB and MyISAM use B-trees – Significant IO reduction – Messages defer IO on add/update/delete – All reads and writes are compressed – Enables users to add more indexes – Queries go faster • Lots of good webinar content on our website – www.tokutek.com/resources/webinars
  • 14. How much can I reduce my IO? Converted from InnoDB to TokuDB
  • 15. How fast can I insert data into TokuDB? • InnoDB’s B-trees – Fast until the index not longer fits in RAM • TokuDB’s Fractal Tree indexes – Start fast, stay fast! • iiBench benchmark – Insert 1 billion rows – 1000 inserts per batch – Auto-increment PK – 3 secondary indexes
  • 16. How fast can I insert data into TokuDB?
  • 17. How fast are mixed workloads? • Fast, since > RAM mixed workloads generally contain… – Index maintenance (insert, update, delete) – Fractal Tree indexes FTW! – Queries – TokuDB enables richer indexing (more indexes) • Sysbench benchmark – 16 tables, 50 million rows per table – Each Sysbench transaction contains – 1 of each query : point, range, aggregation – indexed update, unindexed update, delete, insert
  • 18. How fast are mixed workloads?
  • 19. How do secondary indexes work? • InnoDB and TokuDB “cluster” the primary key index – The key (PK) and all other columns are co-located in memory and on disk • Secondary indexes co-locate the “index key” and PK – When a candidate row is found a second lookup occurs into the PK index – This means an additional IO is required – MySQL’s “hidden join”
  • 20. What is a clustered secondary index? • “Covering” indexes remove this second lookup, but require putting the right columns into the index – create index idx_1 on t1 (c1, c2, c3, c4, c5, c6); – If c1/c2 are queried, only c3/c4/c5/c6 are covered – No additional IO, but c7 isn’t covered • TokuDB supports clustered secondary indexes – create clustering index idx_1 on t1 (c1, c2); – All columns in t1 are covered, forever – Even if new columns are added to the table
  • 21. What are clustered secondary indexes good at? • Two words, “RANGE SCANS” • Several rows (maybe thousands) are scanned without requiring additional lookups on the PK index • Also, TokuDB blocks are much larger than InnoDB – TokuDB = 4MB blocks = sequential IO – InnoDB = 16KB blocks = random IO • Can be orders of magnitude faster for range queries
  • 22. Can SQL be optimized? • Fractal Tree indexes support message injection – The actual work (and IO) can be deferred • Example: – update t1 set k = k + 1 where pk = 5; – InnoDB follows read-modify-write pattern – If field “k” is not indexed, TokuDB avoids IO entirely – An “increment” message is injected • Current optimizations – “replace into”, “insert ignore”, “update”, “insert on duplicate key update”
  • 23. How can I reduce the total cost of my servers and storage?
  • 24. How can I use less storage? • Compression, compression, compression! • All IO in TokuDB is compressed – Reads and writes – Usually ~5x compression (but I’ve seen 25x or more) • TokuDB [currently] supports 3 compression algorithms – lzma = highest compression (and high CPU) – zlib = high compression (and much less CPU) – quicklz = medium compression (even less CPU) – pluggable architecture, lz4 and snappy “in the lab”
  • 25. But doesn’t InnoDB support compression? • Yes, but the compression achieved is far lower – InnoDB compresses 16K blocks, TokuDB is 64K or 128K – InnoDB requires fixed on-disk size, TokuDB is flexible *log style data
  • 26. But doesn’t InnoDB support compression? • And InnoDB performance is severely impacted by it – Compression “misses” are costly *iiBench workload
  • 27. How do I compress my data in TokuDB? create table t1 (c1 bigint not null primary key) engine=tokudb row_format=[tokudb_lzma | tokudb_zlib | tokudb_quicklz]; NOTE: Compression is not optional in TokuDB, we use compression to provide performance advantages as well as save space.
  • 28. How can I perform online schema changes?
  • 29. What is an “online” schema change? My definition “An online schema change is the ability to add or drop a column on an existing table without blocking further changes to the table or requiring substantial server resources (CPU, RAM, IO, disk) to accomplish the operation.” P.S., I’d like for it to be instantaneous!
  • 30. What do blocking schema changes look like?
  • 31. How have online schema changes evolved? • MySQL 5.5 – Table is read-only while entire table is re-created • “Manual” process – Take slave offline, apply to slave, catch up to master, switch places, repeat • MySQL 5.6 (and ~ Percona’s pt-online-schema-change-tool) – Table is rebuilt “in the background” – Changes are captured, and replayed on new table – Uses significant RAM, CPU, IO, and disk space • TokuDB – alter table t1 add column new_column bigint; – Done!
  • 32. What online schema changes can TokuDB handle? • Add column • Drop column • Expand column – integer types – varchar, char, varbinary • Index creation
  • 33. How can I avoid becoming the support staff for my application?
  • 34. 34 Where can I get TokuDB support? TokuDB is offered in 2 editions • Community – Community support (Google Groups “tokudb-user”) • Enterprise subscription – Commercial support – Wouldn’t you rather be developing another application? – Extra features –Hot backup, more on the way – Access to TokuDB experts – Input to the product roadmap
  • 35. 35 Tokutek: Database Performance Engines Any Questions? Download TokuDB at www.tokutek.com/products/downloads Register for product updates, access to premium content, and invitations at www.tokutek.com Join the Conversation

Notas do Editor

  1. #amanda
  2. #amanda
  3. #amanda