Loading...
MySQL 9.5 Reference Manual 9.5의 29 MySQL Performance Schema의 한국어 번역본입니다.
아래의 경우에 피드백에서 신고해주신다면 반영하겠습니다.
감사합니다 :)
목차
29.1 Performance Schema Quick Start
29.2 Performance Schema Build Configuration
29.3 Performance Schema Startup Configuration
29.4 Performance Schema Runtime Configuration
29.4.1 Performance Schema Event Timing
29.4.2 Performance Schema Event Filtering
29.4.3 Event Pre-Filtering
29.4.4 Pre-Filtering by Instrument
29.4.5 Pre-Filtering by Object
29.4.6 Pre-Filtering by Thread
29.4.7 Pre-Filtering by Consumer
29.4.8 Example Consumer Configurations
29.4.9 Naming Instruments or Consumers for Filtering Operations
29.4.10 Determining What Is Instrumented
29.5 Performance Schema Queries
29.6 Performance Schema Instrument Naming Conventions
29.7 Performance Schema Status Monitoring
29.8 Performance Schema Atom and Molecule Events
29.9 Performance Schema Tables for Current and Historical Events
29.10 Performance Schema Statement Digests and Sampling
29.11 Performance Schema General Table Characteristics
29.12 Performance Schema Table Descriptions
29.12.1 Performance Schema Table Reference
29.12.2 Performance Schema Setup Tables
29.12.3 Performance Schema Instance Tables
29.12.4 Performance Schema Wait Event Tables
29.12.5 Performance Schema Stage Event Tables
29.12.6 Performance Schema Statement Event Tables
29.12.7 Performance Schema Transaction Tables
29.12.8 Performance Schema Connection Tables
29.12.9 Performance Schema Connection Attribute Tables
29.12.10 Performance Schema User-Defined Variable Tables
29.12.11 Performance Schema Replication Tables
29.12.12 Performance Schema NDB Cluster Tables
29.12.13 Performance Schema Lock Tables
29.12.14 Performance Schema System Variable Tables
29.12.15 Performance Schema Status Variable Tables
29.12.16 Performance Schema Thread Pool Tables
29.12.17 Performance Schema Firewall Tables
29.12.18 Performance Schema Keyring Tables
29.12.19 Performance Schema Clone Tables
29.12.20 Performance Schema Summary Tables
29.12.21 Performance Schema Telemetry Tables
29.12.22 Performance Schema Miscellaneous Tables
29.13 Performance Schema Option and Variable Reference
29.14 Performance Schema Command Options
29.15 Performance Schema System Variables
29.16 Performance Schema Status Variables
29.17 The Performance Schema Memory-Allocation Model
29.18 Performance Schema and Plugins
29.19 Using the Performance Schema to Diagnose Problems
29.19.1 Query Profiling Using Performance Schema
29.19.2 Obtaining Parent Event Information
29.20 Restrictions on Performance Schema
MySQL Performance Schema는 낮은 수준에서 MySQL Server 실행을 모니터링하기 위한 기능입니다. Performance Schema는 다음과 같은 특징을 가집니다:
Performance Schema는 서버의 내부 실행을 런타임에 검사할 수 있는 방법을 제공합니다. 이는 PERFORMANCE_SCHEMA 스토리지 엔진과 performance_schema 데이터베이스를 사용하여 구현됩니다. Performance Schema는 주로 성능 데이터에 초점을 둡니다. 이는 메타데이터의 검사용으로 사용되는 INFORMATION_SCHEMA와는 다릅니다.
Performance Schema는 서버 이벤트를 모니터링합니다. “이벤트”는 시간이 걸리고 타이밍 정보를 수집할 수 있도록 계측이 된 서버의 모든 동작을 의미합니다. 일반적으로, 이벤트는 함수 호출, 운영 체제 대기, SQL 문 실행의 한 단계(예: 파싱 또는 정렬), 혹은 전체 문이나 문들의 그룹이 될 수 있습니다. 이벤트 수집은 mutex와 같은 동기화 호출, 파일 및 테이블 I/O, 테이블 잠금 등, 서버와 여러 스토리지 엔진에 대한 정보에 접근할 수 있게 해줍니다.
Performance Schema 이벤트는 서버의 바이너리 로그에 기록되는 이벤트(데이터 변경을 기술함) 및 Event Scheduler 이벤트(일종의 저장 프로그램)와는 구별됩니다.
Performance Schema 이벤트는 특정 MySQL Server 인스턴스에 특화됩니다. Performance Schema 테이블은 서버에 로컬로 간주되며, 이들에 대한 변경은 복제되지 않으며 바이너리 로그에 기록되지 않습니다.
현재 이벤트뿐만 아니라 이벤트 이력과 요약도 사용할 수 있습니다. 이를 통해 계측된 활동이 수행된 횟수와 걸린 시간을 파악할 수 있습니다. 이벤트 정보는 특정 스레드의 활동이나 mutex 또는 파일과 같은 특정 객체와 연관된 활동을 보여주는 데 사용할 수 있습니다.
PERFORMANCE_SCHEMA 스토리지 엔진은 서버 소스 코드의 “계측 포인트”를 사용하여 이벤트 데이터를 수집합니다.
수집된 이벤트는 performance_schema 데이터베이스의 테이블에 저장됩니다. 이 테이블들은 다른 테이블과 마찬가지로 SELECT 문을 사용하여 쿼리할 수 있습니다.
Performance Schema 구성은 performance_schema 데이터베이스 안의 테이블을 SQL 문으로 업데이트하여 동적으로 수정할 수 있습니다. 구성 변경은 데이터 수집에 즉시 영향을 미칩니다.
Performance Schema의 테이블은 영속적인 디스크 기반 스토리지를 사용하지 않는 메모리 내 테이블입니다. 내용은 서버 시작 시점부터 다시 채워지며, 서버 종료 시 폐기됩니다.
모니터링은 MySQL이 지원하는 모든 플랫폼에서 사용 가능합니다.
일부 제한이 적용될 수 있습니다: 타이머 유형은 플랫폼별로 달라질 수 있습니다. 스토리지 엔진에 적용되는 계측기는 모든 스토리지 엔진에 대해 구현되지 않았을 수 있습니다. 각 서드파티 엔진의 계측 책임은 엔진 관리자의 몫입니다. 또한 Section 29.20, “Restrictions on Performance Schema”를 참조하십시오.
Performance Schema는 서버 성능에 최소한의 영향을 주면서 서버 실행에 대한 유용한 정보에 접근할 수 있도록 제공하는 것을 목표로 합니다. 구현은 다음과 같은 설계 목표를 따릅니다:
Performance Schema를 활성화해도 서버 동작에는 아무 변화가 없습니다. 예를 들어, 스레드 스케줄링이 변경되지 않으며, EXPLAIN에 표시되는 쿼리 실행 계획이 변경되지 않습니다.
서버 모니터링은 매우 적은 오버헤드로 지속적이고 눈에 띄지 않게 수행됩니다. Performance Schema를 활성화해도 서버가 사용할 수 없게 되지 않습니다.
파서는 변경되지 않습니다. 새로운 키워드나 문은 없습니다.
Performance Schema가 내부적으로 실패하더라도 서버 코드의 실행은 정상적으로 계속 진행됩니다.
이벤트 수집 시점 초기 처리와 이후 이벤트 조회 시점 처리 중에서 선택해야 하는 경우, 수집을 더 빠르게 만드는 쪽에 우선순위를 둡니다. 이는 수집은 지속적으로 일어나지만 조회는 필요 시에만 수행되며 아예 발생하지 않을 수도 있기 때문입니다.
대부분의 Performance Schema 테이블에는 인덱스가 있으며, 이를 통해 옵티마이저는 전체 테이블 스캔 이외의 실행 계획에 접근할 수 있습니다. 자세한 내용은 Section 10.2.4, “Optimizing Performance Schema Queries”를 참조하십시오.
새로운 계측 포인트를 쉽게 추가할 수 있습니다.
계측에는 버전이 부여됩니다. 계측 구현이 변경되더라도, 이전에 계측된 코드는 계속 동작합니다. 이는 서드파티 플러그인 개발자들에게 유리한데, 최신 Performance Schema 변경 사항과 동기화를 유지하기 위해 각 플러그인을 업그레이드할 필요가 없기 때문입니다.
참고
MySQL sys 스키마는 Performance Schema가 수집한 데이터에 편리하게 접근할 수 있도록 하는 객체 집합입니다. sys 스키마는 기본적으로 설치됩니다. 사용 방법에 대해서는 Chapter 30, MySQL sys Schema를 참조하십시오.
28.8 Extensions to SHOW Statements
29.1 Performance Schema Quick Start