Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RedmineバージョンアップとともにDBMS変えてみた.pdf

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for ryouma ryouma
September 02, 2019
3.6k

 RedmineバージョンアップとともにDBMS変えてみた.pdf

Avatar for ryouma

ryouma

September 02, 2019
Tweet

Transcript

  1. Redmineバージョンアップ&DBMS変更 対象 以前 直前 今回 OS CentOS5→6→7 CentOS7 CentOS7 Redmine

    1.3→2.0→2.2~ 3.3 3.4 4.0 DBMS MySQL5.1 →MariaDB5.5 →MariaDB10 MariaDB10 PostgreSQL11 Ruby 忘れた 2.4 2.5 Web/AP サーバ apache/passenger →nginx/unicorn nginx/unicorn nginx/unicorn
  2. 監視対象 ※サイジング/データ量 • 4コア/8GB • チケット数:5万強 • DBサイズ:1GB強 監視対象 監視方法

    メトリック production.log logstash リクエストごとの処理時間 Rails ElasticAPM トランザクションごとの処理時間 サーバリソース Zabbix 一般的なサーバリソース access.log logstash 一般的なWebアクセス解析 DBMS Zabbix コネクション数、CacheHitRatioなど
  3. 実行計画(サブクエリ部のみ) PostgreSQL11 -> Index Scan using idx_113458_enabled_modules_project_id on enabled_modules em

    (cost=0.28..1.31 rows=1 width=8) Index Cond: (project_id = wikis.project_id) Filter: ((name)::text = 'wiki'::text) MariaDB10 +------+--------------+-------------+--------+----------------------------+--------------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+--------------+-------------+--------+----------------------------+--------------+---------+------+------+-------------+ | 1 | PRIMARY | <subquery2> | eq_ref | distinct_key | distinct_key | 4 | func | 1 | | | 2 | MATERIALIZED | em | ALL | enabled_modules_project_id | NULL | NULL | NULL | 3499 | Using where | +------+--------------+-------------+--------+----------------------------+--------------+---------+------+------+-------------+ キーを使用せず、行数がふくれる →MySQL8でも実行計画は変わらず メインテーブルのキーを使用