SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
MariaDBことはじめ
@nekogeruge_987
13年6月28日金曜日
自己紹介
• nekogeruge_987
• SQLおじさん→DBA
• fluentd、chef、MySQL
• Ruby、Rails
13年6月28日金曜日
MariaDBとは?
13年6月28日金曜日
MySQLの生みの親、Michael Wideniusによって
MySQLをforkして作成されたRDBMS
Oracle
MySQL
→
13年6月28日金曜日
なぜ注目されてるのか
13年6月28日金曜日
MySQLとの多くの後方互換
FedoraがデフォルトDBをMariaDBに
変更することを決定
最近、RedHatも採用すると情報が流れたが、
まだ検討中との声明を出している
13年6月28日金曜日
現在出ているバージョン
5.5系 ・・・ 安定版 MySQL5.5と互換
10.0系 ・・・ 開発版 MySQL5.6と互換
13年6月28日金曜日
MySQL5.6 vs MariaDB10.0
http://www.skysql.com/blogs/max-mether/mysql-56-vs-mariadb-100
13年6月28日金曜日
• Multi Source Replication
• Handler Socked plugin
• Vertual Columns
• Cassandra Strage Engine
13年6月28日金曜日
年始に会社で、IBM DB2 → MySQL5.5への移行を
完了
バージョンを5.6以上に上げようと思っていたが、
MariaDBに変更しようと検討中
13年6月28日金曜日
前段階として
新マーケティング用DBをMariaDB5.5で構築
現在稼働中
触ってみた感想を
今日はお話します。
13年6月28日金曜日
重要だったこと
13年6月28日金曜日
後方互換が
どれ程のものなのか
13年6月28日金曜日
DWH 新マーケDB
(旧DB2)
サービス系DB群
replication
13年6月28日金曜日
MySQL → MariaDBの
レプリケーションって
どうなの?
13年6月28日金曜日
全然大丈夫でした
13年6月28日金曜日
レプリケーションを行う上での
設定・準備はMySQLと全く同じ
configへの記述も全く同じ
コマンドも全く同じ
※5.5系なのでGlobal Transaction IDでの
レプリケーションは未検証
13年6月28日金曜日
どのぐらいMySQLと
同じ感覚で扱えるか?
13年6月28日金曜日
MySQLのコマンドが
そのまま使える
13年6月28日金曜日
バイナリファイルの
パスも一緒
13年6月28日金曜日
プロセスもmysqlとして
動いてる
13年6月28日金曜日
mariadb-clientから
mysql-serverへログインして
使用可能
また、mysql-clientから
mariadb-serverへアクセスして
使用可能
13年6月28日金曜日
configの記述も
MySQLと基本的に一緒
※各RDBMS独自の記述も有り
※むしろ気をつけるのは
MySQL5.5→5.6での記述の仕方の違い
13年6月28日金曜日
プログラムからは?
Ruby編
13年6月28日金曜日
13年6月28日金曜日
Slow-log閲覧ツール
各DBサーバのSlow-logをfluentdで
1つのサーバに集め、MariaDB10.0.3に
格納し、railsのアプリケーションから
閲覧してる
13年6月28日金曜日
fluent-plugin-mysql
13年6月28日金曜日
fluent-plugin-mysql
内部でmysql2(アダプタ)の拡張を使用
mysql2で接続可能
13年6月28日金曜日
rails(ruby)からMariaDBを
扱う場合、mysql2で
問題無し
13年6月28日金曜日
触った印象は
MySQLと
変わりませんでした
13年6月28日金曜日
異なった点
※ストレージエンジンの名前や
機能面での違いは置いといて
13年6月28日金曜日
10.0系ではインストールした際の
configファイルの構成が異なる
/etc/my.cnf は/etc/my.cnf.d/をincludeしていて
my.cnf.d配下にはmysql-clients.cnfとserver.cnfがある
※MySQLでもできる記述の仕方
※記述できる内容はMySQLとほぼ一緒
13年6月28日金曜日
MySQL → MariaDBへの
バイナリファイルの移し替えは
(いわゆるcoldbackup)
できない
13年6月28日金曜日
mysqlslapによる
性能検証
13年6月28日金曜日
設定
10のクライアントから各10000回のクエリ
発行を5セット
read、write、updateを実行
https://gist.github.com/onigra/5883722
13年6月28日金曜日
MySQL 5.6.10
read
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 3.271 seconds
	

 Minimum number of seconds to run all queries: 3.232 seconds
	

 Maximum number of seconds to run all queries: 3.323 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
write
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 5.781 seconds
	

 Minimum number of seconds to run all queries: 3.424 seconds
	

 Maximum number of seconds to run all queries: 7.325 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
update
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 4.675 seconds
	

 Minimum number of seconds to run all queries: 4.191 seconds
	

 Maximum number of seconds to run all queries: 5.571 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
13年6月28日金曜日
MariaDB 10.0.3
read
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 2.954 seconds
	

 Minimum number of seconds to run all queries: 2.900 seconds
	

 Maximum number of seconds to run all queries: 3.083 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
write
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 3.053 seconds
	

 Minimum number of seconds to run all queries: 2.957 seconds
	

 Maximum number of seconds to run all queries: 3.117 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
	

update
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 4.547 seconds
	

 Minimum number of seconds to run all queries: 4.459 seconds
	

 Maximum number of seconds to run all queries: 4.600 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
13年6月28日金曜日
MySQL 5.5.32
read
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 0.962 seconds
	

 Minimum number of seconds to run all queries: 0.947 seconds
	

 Maximum number of seconds to run all queries: 0.991 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
	

write
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 8.988 seconds
	

 Minimum number of seconds to run all queries: 7.938 seconds
	

 Maximum number of seconds to run all queries: 10.250 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
update
Benchmark
	

 Running for engine innodb
	

 Average number of seconds to run all queries: 9.826 seconds
	

 Minimum number of seconds to run all queries: 9.453 seconds
	

 Maximum number of seconds to run all queries: 10.581 seconds
	

 Number of clients running queries: 10
	

 Average number of queries per client: 1000
13年6月28日金曜日
まとめ
• MySQLと同じ感覚で使えて使いやすい
• 速度も問題無し。簡単なベンチでは
MySQLより速い
• 引き続き独自機能の検証を進めたい
(個人的に気になるのはGalera Cluster)
13年6月28日金曜日
ご清聴ありがとうございました
13年6月28日金曜日

Mais conteúdo relacionado

Mais procurados

blogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べblogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べ
Masahiro Nagano
 
初めてのAws rds for sql server
初めてのAws   rds for sql server初めてのAws   rds for sql server
初めてのAws rds for sql server
Ryuji Tamagawa
 
MYSQL 角川 隆英
MYSQL 角川 隆英MYSQL 角川 隆英
MYSQL 角川 隆英
mourikousuke
 
Performance and Scalability of Web Service
Performance and Scalability of Web ServicePerformance and Scalability of Web Service
Performance and Scalability of Web Service
Shinji Tanaka
 
WordCampOsaka2012セッション資料
WordCampOsaka2012セッション資料WordCampOsaka2012セッション資料
WordCampOsaka2012セッション資料
horike37
 
Word camptokyo2012セッション資料
Word camptokyo2012セッション資料Word camptokyo2012セッション資料
Word camptokyo2012セッション資料
horike37
 

Mais procurados (20)

blogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べblogサービスの全文検索の話 - #groonga を囲む夕べ
blogサービスの全文検索の話 - #groonga を囲む夕べ
 
初めてのAws rds for sql server
初めてのAws   rds for sql server初めてのAws   rds for sql server
初めてのAws rds for sql server
 
MySQl 5.6新機能解説@第一回 中国地方DB勉強会
MySQl 5.6新機能解説@第一回 中国地方DB勉強会MySQl 5.6新機能解説@第一回 中国地方DB勉強会
MySQl 5.6新機能解説@第一回 中国地方DB勉強会
 
20110708 dist_study okuyama
20110708 dist_study okuyama20110708 dist_study okuyama
20110708 dist_study okuyama
 
MYSQL 角川 隆英
MYSQL 角川 隆英MYSQL 角川 隆英
MYSQL 角川 隆英
 
WordPress サイトの 長期的メンテナンス
WordPress サイトの 長期的メンテナンスWordPress サイトの 長期的メンテナンス
WordPress サイトの 長期的メンテナンス
 
JAWS-UG CLI #07 VPC
JAWS-UG CLI #07 VPCJAWS-UG CLI #07 VPC
JAWS-UG CLI #07 VPC
 
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
メルカリのデータベース戦略 / PHPとMySQLの怖い話 MyNA会2015年8月
 
簡単!自動バックアップ設定でWordPressを安心運用
簡単!自動バックアップ設定でWordPressを安心運用簡単!自動バックアップ設定でWordPressを安心運用
簡単!自動バックアップ設定でWordPressを安心運用
 
My sqlで遭遇したトランザクションとロックのお話
My sqlで遭遇したトランザクションとロックのお話My sqlで遭遇したトランザクションとロックのお話
My sqlで遭遇したトランザクションとロックのお話
 
EWD 3トレーニングコース#6 ewd-xpressアプリ開始時に何が起こるか
EWD 3トレーニングコース#6 ewd-xpressアプリ開始時に何が起こるかEWD 3トレーニングコース#6 ewd-xpressアプリ開始時に何が起こるか
EWD 3トレーニングコース#6 ewd-xpressアプリ開始時に何が起こるか
 
Performance and Scalability of Web Service
Performance and Scalability of Web ServicePerformance and Scalability of Web Service
Performance and Scalability of Web Service
 
WAFって言いたいだけちゃうんか
WAFって言いたいだけちゃうんかWAFって言いたいだけちゃうんか
WAFって言いたいだけちゃうんか
 
情報セキュリティCAS 第二十三回放送用スライド
情報セキュリティCAS 第二十三回放送用スライド情報セキュリティCAS 第二十三回放送用スライド
情報セキュリティCAS 第二十三回放送用スライド
 
Classmethod awsstudy ec2rds20160114
Classmethod awsstudy ec2rds20160114Classmethod awsstudy ec2rds20160114
Classmethod awsstudy ec2rds20160114
 
WordCampOsaka2012セッション資料
WordCampOsaka2012セッション資料WordCampOsaka2012セッション資料
WordCampOsaka2012セッション資料
 
Word camptokyo2012セッション資料
Word camptokyo2012セッション資料Word camptokyo2012セッション資料
Word camptokyo2012セッション資料
 
クライムどこでもセミナー「Veeam新機能 徹底解説 Part 3:Veeam + AWS連携セミナー」
クライムどこでもセミナー「Veeam新機能 徹底解説 Part 3:Veeam + AWS連携セミナー」クライムどこでもセミナー「Veeam新機能 徹底解説 Part 3:Veeam + AWS連携セミナー」
クライムどこでもセミナー「Veeam新機能 徹底解説 Part 3:Veeam + AWS連携セミナー」
 
Oracleがnode.jsをやり始めたというのだが!
Oracleがnode.jsをやり始めたというのだが!Oracleがnode.jsをやり始めたというのだが!
Oracleがnode.jsをやり始めたというのだが!
 
信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!
信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!
信頼性が高くハイパフォーマンスなテーマ開発テクニックでライバルに差をつけろ!
 

Semelhante a Maria db

Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14
Masahiro Nagano
 

Semelhante a Maria db (20)

States of Dolphin - MySQL最新技術情報2013秋 -
States of Dolphin - MySQL最新技術情報2013秋 -States of Dolphin - MySQL最新技術情報2013秋 -
States of Dolphin - MySQL最新技術情報2013秋 -
 
LINEのMySQL運用について
LINEのMySQL運用についてLINEのMySQL運用について
LINEのMySQL運用について
 
MySQLを割と一人で300台管理する技術
MySQLを割と一人で300台管理する技術MySQLを割と一人で300台管理する技術
MySQLを割と一人で300台管理する技術
 
MariaDB Meetup Tokyo 2019 #2
MariaDB Meetup Tokyo 2019 #2MariaDB Meetup Tokyo 2019 #2
MariaDB Meetup Tokyo 2019 #2
 
LINEのMySQL運用について 修正版
LINEのMySQL運用について 修正版LINEのMySQL運用について 修正版
LINEのMySQL運用について 修正版
 
Thunderbird 3のご紹介と企業に求められるカスタマイズ
Thunderbird 3のご紹介と企業に求められるカスタマイズThunderbird 3のご紹介と企業に求められるカスタマイズ
Thunderbird 3のご紹介と企業に求められるカスタマイズ
 
[中国地方DB勉強会] 第22回 Webアプリ開発をデータベース側から変革していく - MySQL 8.0新機能
[中国地方DB勉強会] 第22回 Webアプリ開発をデータベース側から変革していく - MySQL 8.0新機能[中国地方DB勉強会] 第22回 Webアプリ開発をデータベース側から変革していく - MySQL 8.0新機能
[中国地方DB勉強会] 第22回 Webアプリ開発をデータベース側から変革していく - MySQL 8.0新機能
 
SQL Server 2019 とともに知る Microsoft Data Platform
SQL Server 2019 とともに知る Microsoft Data PlatformSQL Server 2019 とともに知る Microsoft Data Platform
SQL Server 2019 とともに知る Microsoft Data Platform
 
MySQL5.7とMariaDB10.1の性能比較(簡易)
MySQL5.7とMariaDB10.1の性能比較(簡易)MySQL5.7とMariaDB10.1の性能比較(簡易)
MySQL5.7とMariaDB10.1の性能比較(簡易)
 
Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14Web Operations and Perl kansai.pm#14
Web Operations and Perl kansai.pm#14
 
2015-01-27 Introduction to Docker
2015-01-27 Introduction to Docker2015-01-27 Introduction to Docker
2015-01-27 Introduction to Docker
 
20140518 JJUG MySQL Clsuter as NoSQL
20140518 JJUG MySQL Clsuter as NoSQL20140518 JJUG MySQL Clsuter as NoSQL
20140518 JJUG MySQL Clsuter as NoSQL
 
わたしを支える技術
わたしを支える技術わたしを支える技術
わたしを支える技術
 
2015-07-27 Docker Introduction 〜Dockerの基礎とユースケースに関する考察〜
2015-07-27 Docker Introduction 〜Dockerの基礎とユースケースに関する考察〜2015-07-27 Docker Introduction 〜Dockerの基礎とユースケースに関する考察〜
2015-07-27 Docker Introduction 〜Dockerの基礎とユースケースに関する考察〜
 
MySQLのソース・ターゲットエンドポイントとしての利用
MySQLのソース・ターゲットエンドポイントとしての利用MySQLのソース・ターゲットエンドポイントとしての利用
MySQLのソース・ターゲットエンドポイントとしての利用
 
Windows Server 2019 の Hyper-Converged Infrastructure (HCI)
Windows Server 2019 の Hyper-Converged Infrastructure (HCI) Windows Server 2019 の Hyper-Converged Infrastructure (HCI)
Windows Server 2019 の Hyper-Converged Infrastructure (HCI)
 
Cassandra Meetup Tokyo, 2016 Spring
Cassandra Meetup Tokyo, 2016 SpringCassandra Meetup Tokyo, 2016 Spring
Cassandra Meetup Tokyo, 2016 Spring
 
Sql database のご紹介
Sql database のご紹介Sql database のご紹介
Sql database のご紹介
 
[db tech showcase Tokyo 2016] D27: Next Generation Apache Cassandra by ヤフー株式会...
[db tech showcase Tokyo 2016] D27: Next Generation Apache Cassandra by ヤフー株式会...[db tech showcase Tokyo 2016] D27: Next Generation Apache Cassandra by ヤフー株式会...
[db tech showcase Tokyo 2016] D27: Next Generation Apache Cassandra by ヤフー株式会...
 
Web App for Containers + MySQLでコンテナ対応したPHPアプリを作ろう!
Web App for Containers + MySQLでコンテナ対応したPHPアプリを作ろう! Web App for Containers + MySQLでコンテナ対応したPHPアプリを作ろう!
Web App for Containers + MySQLでコンテナ対応したPHPアプリを作ろう!
 

Maria db