SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
MY SQL Disk IO 모니터링 및 분석사례
2016.08.20
1
2
Index
 분석 사례
 Disk I/O 모니터링 방법
 Q & A
3
Slow query 발생
분석 사례
5
분석 사례
갑작스런
CPU 증가
과도한
READ I/O
Dstat -cmdnls
6
Nmon 수집 분석
분석 사례
7
Memory CACHED, MEMORY FREE
Cached와 FREE 영역이
서로 역 512MB 정도 교환
CACHED는 파일을 캐쉬하는 영역
512MB의 파일은 binlog file 유일
Binlog 파일 생성 시간과 메모리 영역 교환
시기가 일치
분석 사례
8
분석 사례
lsof 명령 사용하여 모니터링
(lsof | grep BINLOG)
현재 사용하는 binlog
문제의 read I/O의 binlog
/BINLOG/mysql_000690
/BINLOG/mysql_000691
/BINLOG/mysql_000692
/BINLOG/mysql_000693
/BINLOG/mysql_000694
/BINLOG/mysql_000695
/BINLOG/mysql_000696
/BINLOG/mysql_000691
/BINLOG/mysql_000692
/BINLOG/mysql_000693
/BINLOG/mysql_000694
/BINLOG/mysql_000695
/BINLOG/mysql_000696
/BINLOG/mysql_000697
삭제가 예정된
파일
새로 만들어진
파일
9
분석 사례
10
https://bugs.mysql.com/bug.php?id=80889
분석 사례
Binary logs READ I/O bug
5.6.xx : 버그 없음
5.7.xx : 계속 발생하는 버그
5.7.14 : 수정될 예정
PURGE BINARY LOGS TO ‘BINLOG FILE NAME’ 으로 재현 가능
GTID 모드 사용시 발생하지 않는것 확인
11
Index
 분석 사례
 Disk I/O 모니터링 방법
 Q & A
12
Disk I/O 모니터링 방법
갑작스런
CPU 증가
과도한
READ I/O
Dstat -cmdnls
문제는 과도한 READ I/O
13
Disk I/O 모니터링 방법
14
Disk I/O 모니터링 방법
pidstat -p 10822 -d -t
15
Disk I/O 모니터링 방법
strace
프로세스가 OS의 라이브러리를 이용하여 disk에 읽은 함수와 파라메터를 수집할 수 있습니다.
참고
http://blueyikim.tistory.com/168
16
참고
http://www.slideshare.net/brendangregg/linux-systems-performance-2016
Disk I/O 모니터링 방법
17
Disk I/O 모니터링 방법
strace -p10822 -vv -o strace_11071.log
FD NO 읽은 내용 내용의 사이즈
18
Disk I/O 모니터링 방법
lsof -p 10822 (OPEN FILE FD LIST)
19
Disk I/O 모니터링 방법
참고
http://www.slideshare.net/fullscreen/brendangregg/linux-systems-performance-2016/7
사용할 수 있는 툴은 대단히 많다.
가장 적합한 것을 찾아 사용하자
20
Disk I/O 모니터링 방법
스크립트 실행 결과
21
Disk I/O 모니터링 방법
스크립트 생성
스크립트 내용은 위 모니터링 방법을 자동화
22
Disk I/O 모니터링 방법
45

Weitere ähnliche Inhalte

Was ist angesagt?

PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
elliando dias
 

Was ist angesagt? (20)

MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera ) Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
Wars of MySQL Cluster ( InnoDB Cluster VS Galera )
 
Intro ProxySQL
Intro ProxySQLIntro ProxySQL
Intro ProxySQL
 
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docx
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docxKeepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docx
Keepalived+MaxScale+MariaDB_운영매뉴얼_1.0.docx
 
ProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQLProxySQL - High Performance and HA Proxy for MySQL
ProxySQL - High Performance and HA Proxy for MySQL
 
InnoDB Flushing and Checkpoints
InnoDB Flushing and CheckpointsInnoDB Flushing and Checkpoints
InnoDB Flushing and Checkpoints
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
 
Maxscale_메뉴얼
Maxscale_메뉴얼Maxscale_메뉴얼
Maxscale_메뉴얼
 
Maxscale 소개 1.1.1
Maxscale 소개 1.1.1Maxscale 소개 1.1.1
Maxscale 소개 1.1.1
 
Percona XtraDB Cluster
Percona XtraDB ClusterPercona XtraDB Cluster
Percona XtraDB Cluster
 
M|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write PathsM|18 Deep Dive: InnoDB Transactions and Write Paths
M|18 Deep Dive: InnoDB Transactions and Write Paths
 
[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기[2018] MySQL 이중화 진화기
[2018] MySQL 이중화 진화기
 
Binlog Servers 구축사례
Binlog Servers 구축사례Binlog Servers 구축사례
Binlog Servers 구축사례
 
MariaDB Optimization
MariaDB OptimizationMariaDB Optimization
MariaDB Optimization
 
Parallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDBParallel Replication in MySQL and MariaDB
Parallel Replication in MySQL and MariaDB
 
AWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMTAWS 환경에서 MySQL BMT
AWS 환경에서 MySQL BMT
 
New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12New optimizer features in MariaDB releases before 10.12
New optimizer features in MariaDB releases before 10.12
 
ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)ProxySQL High Availability (Clustering)
ProxySQL High Availability (Clustering)
 
MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용MySQL 상태 메시지 분석 및 활용
MySQL 상태 메시지 분석 및 활용
 
Optimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performanceOptimizing MariaDB for maximum performance
Optimizing MariaDB for maximum performance
 

Ähnlich wie 1.mysql disk io 모니터링 및 분석사례

[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)
[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)
[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)
(Joe), Sanghun Kim
 

Ähnlich wie 1.mysql disk io 모니터링 및 분석사례 (8)

Chapter5 embedded storage
Chapter5 embedded storage Chapter5 embedded storage
Chapter5 embedded storage
 
Chapter5 embedded storage
Chapter5 embedded storage Chapter5 embedded storage
Chapter5 embedded storage
 
MySQL Deep dive with FusionIO
MySQL Deep dive with FusionIOMySQL Deep dive with FusionIO
MySQL Deep dive with FusionIO
 
Mongodb 개발 포인트
Mongodb 개발 포인트Mongodb 개발 포인트
Mongodb 개발 포인트
 
Infiniflux introduction
Infiniflux introductionInfiniflux introduction
Infiniflux introduction
 
MySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docxMySQL_SQL_Tunning_v0.1.3.docx
MySQL_SQL_Tunning_v0.1.3.docx
 
The MongoDB Strikes Back / MongoDB 의 역습
The MongoDB Strikes Back / MongoDB 의 역습The MongoDB Strikes Back / MongoDB 의 역습
The MongoDB Strikes Back / MongoDB 의 역습
 
[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)
[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)
[IBM 김상훈] 오브젝트스토리지 | 늘어만 가는 데이터 저장문제로 골 아프신가요? (자료를 다운로드하시면 고화질로 보실 수 있습니다.)
 

Mehr von I Goo Lee

Mehr von I Goo Lee (20)

MySQL_Fabric_운영시유의사항
MySQL_Fabric_운영시유의사항MySQL_Fabric_운영시유의사항
MySQL_Fabric_운영시유의사항
 
From MSSQL to MySQL
From MSSQL to MySQLFrom MSSQL to MySQL
From MSSQL to MySQL
 
From MSSQL to MariaDB
From MSSQL to MariaDBFrom MSSQL to MariaDB
From MSSQL to MariaDB
 
AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기
 
Backup automation in KAKAO
Backup automation in KAKAO Backup automation in KAKAO
Backup automation in KAKAO
 
텔레그램을 이용한 양방향 모니터링 시스템 구축
텔레그램을 이용한 양방향 모니터링 시스템 구축텔레그램을 이용한 양방향 모니터링 시스템 구축
텔레그램을 이용한 양방향 모니터링 시스템 구축
 
Federated Engine 실무적용사례
Federated Engine 실무적용사례Federated Engine 실무적용사례
Federated Engine 실무적용사례
 
MySQL 5.7 NF – Optimizer Improvement
 MySQL 5.7 NF – Optimizer Improvement MySQL 5.7 NF – Optimizer Improvement
MySQL 5.7 NF – Optimizer Improvement
 
MySQL 5.7 NF – JSON Datatype 활용
MySQL 5.7 NF – JSON Datatype 활용MySQL 5.7 NF – JSON Datatype 활용
MySQL 5.7 NF – JSON Datatype 활용
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
 
MS 빅데이터 서비스 및 게임사 PoC 사례 소개
MS 빅데이터 서비스 및 게임사 PoC 사례 소개MS 빅데이터 서비스 및 게임사 PoC 사례 소개
MS 빅데이터 서비스 및 게임사 PoC 사례 소개
 
AWS 환경에서 MySQL Infra 설계하기-2본론
AWS 환경에서 MySQL Infra 설계하기-2본론AWS 환경에서 MySQL Infra 설계하기-2본론
AWS 환경에서 MySQL Infra 설계하기-2본론
 
AWS 환경에서 MySQL Infra 설계하기-1도입부분
AWS 환경에서 MySQL Infra 설계하기-1도입부분AWS 환경에서 MySQL Infra 설계하기-1도입부분
AWS 환경에서 MySQL Infra 설계하기-1도입부분
 
MySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELKMySQL Slow Query log Monitoring using Beats & ELK
MySQL Slow Query log Monitoring using Beats & ELK
 
MySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELKMySQL Audit using Percona audit plugin and ELK
MySQL Audit using Percona audit plugin and ELK
 
PostgreSQL 이야기
PostgreSQL 이야기PostgreSQL 이야기
PostgreSQL 이야기
 
Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)Intro KaKao ADT (Almighty Data Transmitter)
Intro KaKao ADT (Almighty Data Transmitter)
 
.NET Webservice for MySQL
.NET Webservice for MySQL.NET Webservice for MySQL
.NET Webservice for MySQL
 
Fluentd with MySQL
Fluentd with MySQLFluentd with MySQL
Fluentd with MySQL
 
백업인프라 개선 (w/님블스토리지) - 1TB 를 10분 내에
백업인프라 개선 (w/님블스토리지) - 1TB 를 10분 내에백업인프라 개선 (w/님블스토리지) - 1TB 를 10분 내에
백업인프라 개선 (w/님블스토리지) - 1TB 를 10분 내에
 

1.mysql disk io 모니터링 및 분석사례