SlideShare a Scribd company logo
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Yun Cheol Ha
Sr. PostgreSQL Specialist Solutions Architect
Amazon Web Services
Aurora PostgreSQL
Performance Monitoring
and troubleshooting
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
2
Agenda
• Performance monitoring approach
• PostgreSQL and Amazon Aurora PostgreSQL architecture
• Amazon Aurora PostgreSQL Performance monitoring tools and
interfaces
• Common Performance monitoring use cases
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Performance Monitoring Approach
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Root cause and symptoms of database performance issues
Poor
Database
Performance
High DB
Connections
High
Memory
Utilization
High
read/write
latency
High I/O
Usage
High CPU
Utilization
High query
execution
time
Lower
throughput
High Active
sessions

Recommended for you

Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon Redshift

by Manish Mohite, Solutions Architect, AWS How do you get data from your sources into your Redshift data warehouse? We'll show how to use AWS Glue and Amazon Kinesis Firehose to make it easy to automate the work to get data loaded.

awsamazon web servicescloud
Cloud monitoring with Applications Manager
Cloud monitoring with Applications ManagerCloud monitoring with Applications Manager
Cloud monitoring with Applications Manager

Visualize cloud analytics for effective resource planning and understand the key performance metrics of your AWS, Azure and O-365 services to accelerate your digital transformation endeavours.

cloud monitoringazureoffice 365
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...

Learning Objectives: - Understand how to build a serverless big data solution quickly and easily - Learn how to discover and prepare all your data for analytics - Learn how to query and visualize analytics on all your data to create actionable insights

serverlessbig dataanalytics
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Performance Monitoring Approach
System
Monitoring
Database
Monitoring
Analyzing and
Identifying
bottlenecks
Optimization
Establish Performance Baseline
Monitoring Key Performance Indicators (KPI)
Alert and Notifications
Monitoring and analysis Tools and interface
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
PostgreSQL and Aurora PostgreSQL Architecture
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Understanding PostgreSQL Architecture
Backend
Process
Backend
Process
Backend
Process
Postmaster
Lock Space
Shared Buffers
WAL Buffers
CLOG Buffers
Other Buffers
OS Buffers
Storage
Background Writer, WAL Writer, Checkpointer,
Archiver, Logging Collector, Stats Collector,
AutoVacuum Launcher
Client Libraries
(libpq, JDBC)
Client Application
Shared Memory
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Amazon Aurora PostgreSQL distributed architecture
8
Shared storage volume
Availability
Zone 2
Availability
Zone 3
SQL
Transactions
Caching
SQL
Transactions
Caching
SQL
Transactions
Caching
• Purpose-built log-structured
distributed storage system
designed for databases
• Storage volume is striped
across hundreds of storage
nodes distributed over 3
different availability zones
• Six copies of data, two copies
in each availability zone to
protect against AZ+1 failures
• 10GB of segment size
• Primary and replicas (up to 15)
all point to the same storage
Availability
Zone 1

Recommended for you

Loading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SFLoading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SF

Data Analytics Week at the San Francisco Loft Loading Data Into Redshift How do you get data from your sources into your Redshift data warehouse? We'll show how to use AWS Glue and Amazon Kinesis Firehose to make it easy to automate the work to get data loaded. Speakers: Jay Formosa - Solutions Architect, AWS Asser Moustafa - Data Warehouse Specialist Solutions Architect, AWS

awsaws cloudredshift
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift

How do you get data from your sources into your Redshift data warehouse? We'll show how to use AWS Glue and Amazon Kinesis Firehose to make it easy to automate the work to get data loaded. Speakers: Natalie Rabinovich- Solutions Architect, AWS Gareth Eagar - Solutions Architect, AWS

awsamazon-web-servicescloud
Loading Data into Redshift with Lab
Loading Data into Redshift with LabLoading Data into Redshift with Lab
Loading Data into Redshift with Lab

by Ben Willett, Solutions Architect, AWS How do you get data from your sources into your Redshift data warehouse? We'll show how to use AWS Glue and Amazon Kinesis Firehose to make it easy to automate the work to get data loaded.

awsamazon web servicescloud
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
1. Receive log records and add
to in-memory queue
2. Persist records in hot log and ACK
3. Organize records and identify
gaps in log
4. Gossip with peers to fill in holes
5. Coalesce log records into new
page versions
6. Periodically stage log and new
page versions to Amazon S3
7. Periodically garbage collect old versions
8. Periodically validate CRC codes on blocks
Notes:
All steps are asynchronous
Only steps 1 and 2 are
in foreground latency path
Log records
Database
Instance
Incoming queue
Storage node
S3 BACKUP
1
2
3
4
5
6
7
8
Update
queue
ACK
Hot
Log
Data
pages
Continuous backup
GC
Scrub
Sort
group
Peer to peer gossip
Peer
Storage
Nodes
Coalesce
Anatomy of storage node
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Aurora PostgreSQL Performance Monitoring Tools and
interfaces
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Overview of monitoring in Amazon Aurora PostgreSQL
Amazon Aurora comes with comprehensive monitoring built-in
Publishing database logs
(errors, audit, and slow
queries)
to a centralized log store
Query and wait-
level
performance data
Additional database-
specific
metrics at up to 1 second
granularity
Amazon
CloudWatch
Metrics
Amazon
CloudWatch
Logs
Performance
Insights
Enhanced
Monitoring DevOps Guru for RDS
ML-Powered Capability
to detect Anomalous
behavior
Monitor core (CPU, memory) and
transactional (throughput, latency)
metrics
PostgreSQL statistics views for database activity monitoring
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
CloudWatch Metrics
CloudWatch(CW) gathers metrics on the host underlying the RDS database. You can view
these metrics in the RDS console under the monitoring tab.
CloudWatch Metrics:
• CPU Utilization
• DB Connections
• Free Storage
• Free Memory
• Write IOPS
• Read IOPS
• Network Throughput
• BufferCacheHitRatio
• Maximum Used TransactionID
• VolumeBytesUsed
• VolumeWriteIOPs
• Choose time period
• Compare RDS instances

Recommended for you

(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS

This document discusses building a data lake on AWS. It describes using Amazon S3 for storage, Amazon Kinesis for streaming data, and AWS Lambda to populate metadata indexes in DynamoDB and search indexes. It covers using IAM for access control, AWS STS for temporary credentials, and API Gateway and Elastic Beanstalk for interfaces. The data lake provides a foundation for storing and analyzing structured, semi-structured, and unstructured data at scale from various sources in a cost-effective and secure manner.

aws cloudaws-reinventbig data & analytics
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift

How do you get data from your sources into your Redshift data warehouse? We'll show how to use AWS Glue and Amazon Kinesis Firehose to make it easy to automate the work to get data loaded. Level: Intermediate Speakers: Jay Formosa - Solutions Architect, AWS Aser Moustafa - Data Warehouse Specialist Solutions Architect, AWS

awsamazon-web-servicescloud
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...

AWS hosts a variety of public data sets that anyone can access for free. Previously, large data sets such as satellite imagery or genomic data have required hours or days to locate, download, customize, and analyze. When data is made publicly available on AWS, anyone can analyze any volume of data without downloading or storing it themselves. In this session, the AWS Open Data Team shares tips and tricks, patterns and anti-patterns, and tools to help you effectively stage your data for analysis in the cloud.

re:invent 2018amazonaws re:invent
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Enhanced Monitoring
Enhanced Monitoring gathers finer grained OS metrics from an agent installed on the RDS
host.
• By default metrics are stored for 30 days. Governed by RDSOSMetrics log group in
CloudWatch
• Incurs additional CloudWatch costs based on granularity (from 1 to 60 seconds).
• Process list with Total CPU bandwidth (CPU%) and Total memory used (MEM%).
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Using CloudWatch logs
Publishing your Aurora database logs (Postgresql.log and Upgrade.log) to Amazon
CloudWatch Logs is a best practice.
• Ensures logs are preserved in highly durable storage
• Perform real-time analysis of log data
Enable Query Logging
• log_min_duration_statement – Limit in milliseconds for a statement to be logged
• log_statement – Determines which statements are logged [none, all, ddl, dml]
• Note: Too much logging will degrade performance in production systems
• Log_statement doesn’t have correlation with log_min_duration_statement but both are independent
parameters
• Query information is included in postgres.log file
Retention
• rds.log_retention_period (default 3 days)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Amazon RDS Performance Insights
• Easy and powerful dashboard showing load
on your database
• Uses Average Active Session (AAS) as a
load aggregation method over time
• Helps you identify source of bottlenecks:
• top SQL queries, wait statistics, DB engine counters
• Consolidated Metrics
• CloudWatch, os metrics, db metrics
• Adjustable time frame (hour, day, week,
month)
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Performance Insights Example: Wait Bottleneck
All engines have a connections list showing
– active
– idle
We sample every second
§ For each active session, collect:
– SQL,
– State :CPU, I/O, Lock, Commit log wait, etc.
– Host
– User
Expose as “Average Active Sessions” (AAS)

Recommended for you

saa3_wk5.pdf
saa3_wk5.pdfsaa3_wk5.pdf
saa3_wk5.pdf

The document discusses various AWS services including Elastic Load Balancing, Auto Scaling, AWS CloudFormation, and Amazon CloudFront. It provides information on: - How Elastic Load Balancing distributes traffic across multiple targets to improve scalability. It describes different types of load balancers. - How Auto Scaling automatically launches or terminates EC2 instances based on user-defined policies to dynamically scale capacity as needed. - How AWS CloudFormation allows defining infrastructure as code using templates to deploy and manage AWS resources in a reproducible and predictable manner. - How Amazon CloudFront is a global content delivery network (CDN) that securely delivers data, videos, applications, and APIs to customers with low latency and high transfer

Getting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWSGetting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWS

In addition to running databases in Amazon EC2, AWS customers can choose among a variety of managed database services. These services save effort, save time, and unlock new capabilities and economies. In this session, we make it easy to understand how they differ, what they have in common, and how to choose one or more. We explain the fundamentals of Amazon DynamoDB, a fully managed NoSQL database service; Amazon RDS, a relational database service in the cloud; Amazon ElastiCache, a fast, in-memory caching service in the cloud; and Amazon Redshift, a fully managed, petabyte-scale data-warehouse solution that can be surprisingly economical. We will cover how each service might help support your application, how much each service costs, and how to get started.

aws-summit-london-2016
Loading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF LoftLoading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF Loft

Loading Data into Redshift: Data Analytics Week at the San Francisco Loft How do you get data from your sources into your Redshift data warehouse? We'll show how to use AWS Glue and Amazon Kinesis Firehose to make it easy to automate the work to get data loaded. Level: Intermediate Speakers: Aser Moustafa - Data Warehouse Specialist Solutions Architect, AWS Vikram Gangulavoipalyam - Enterprise Solutions Architect, AWS

awsaws clouddata analytics
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Performance Insights – Sampling
Sampling every second for current activity( active, idle etc ) and wait event of each backend
process
Query run: often
Fast query run: rarely
Slow query
User 1
User 2
User 3
Time
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AAS compared to Max CPU
Max vCPU
Performance Insights – Max vCPU chart
Wait events
AAS < 1 :
Database is not blocked
AAS ~= 0 :
Database basically idle.
Problems are in the APP not
DB
AAS < # of CPUs :
CPU available
Are any single sessions 100%
active?
AAS > # of CPUs :
Could have performance
problems
AAS >> # of CPUS :
There is a bottleneck
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
Wait events
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Reference.Waitevents.html
• Wait event shows the type of event for which the backend is waiting.
• This could commonly indicate performance problems.
§ List of the most common wait events
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
20
SQL Statistics in Performance Insights
• Correlating SQL level wait events with database level wait events
• per second statistics and per call statistics
• Calls per sec, Avg latency(ms) per call, Blk hits, Blk reads, Blk writes, Local blk
hits, Temp blk read etc
• The SQL statistics are an average for the selected time range.

Recommended for you

AWS Tech Talks: Armazenamento Híbrido na Nuvem
AWS Tech Talks: Armazenamento Híbrido na NuvemAWS Tech Talks: Armazenamento Híbrido na Nuvem
AWS Tech Talks: Armazenamento Híbrido na Nuvem

Apresentação utilizada por Melissa Ravanini na sessão do AWS Tech Talks do dia 18 de Fevereiro de 2020.

awsnuvemnuvem híbrida
Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring

This document discusses metering and monitoring considerations for platform-as-a-service (PaaS) deployments. It identifies key metrics that should be tracked, such as bandwidth usage, storage usage, API call statistics, and service/mediation statistics. It describes using the WSO2 Business Activity Monitor (BAM) to capture metrics from usage agents and publish them to Cassandra and Apache Hadoop for long-term storage and analysis. Summarized metrics can power billing and throttling systems to manage resource usage across a multi-tenant PaaS.

 
by WSO2
Introduction to Amazon Athena
Introduction to Amazon AthenaIntroduction to Amazon Athena
Introduction to Amazon Athena

Amazon Athena Overview Athena Design Patterns Athena in Action • Create External Tables • Data Formats and SerDes • Partitions • Optimize and Secure • Workgroups • Views • CTAS • Monitoring & Auditing Summary

amazon athenadata analytics
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
Consolidated Metrics Dashboard View
21
• Aurora PostgreSQL database health summary – pre defined
• Custom dashboard
• CloudWatch metrics
• OS metrics
• Database metrics
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Performance Insights Example: Wait Bottleneck
Get contextual help
for wait events
Identify
problem
statement
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ PostgreSQL collects and reports information about server activities.
§ pg_locks, pg_stat_user_tables, pg_statio_user_tables
PostgreSQL native monitoring statistics
§ pg_stat_activity view
– One row per server process showing
information related to the current activity of
that process
– Monitoring query connections, query
processing status ( active/idle ), currently
active query start time and wait events
(locks/IOs etc)
§ pg_stat_statements view
– One row for each distinct combination of
database ID, user ID, query ID ( normalized query )
– The module tracks planning and execution
statistics of all the SQL statements executed in
the server
• Identifying slow and top queries
• Cumulative values
– pg_stat_statements extension should be installed
and registered in the database system.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Query Analysis
§ Slow Running Query Plan Logging
– auto_explain module provides a means for Logging execution plans of slow statements without
running EXPLAIN manually.
– auto_explain.log_min_duration
• Sets a minimum statement execution time, in milliseconds, that will cause the statement’s plan to be logged
• Setting this to 0 logs all plans and -1 (the default) disables logging of plans.
• auto_explain.log_analyze can be enabled with auto_explain.log_timing=off to print EXPLAIN ANALYZE output.
– aurora_stat_plans function
• pg_stat_statements.track : none, top(default), all
§ EXPLAIN
– EXPLAIN command returns the query plan, which PostgreSQL chose, and help you understand what
the query planner decides to execute a query.
– The output of EXPLAIN has one line for each node in the plan tree. It shows node type and cost
estimation for each node operation.

Recommended for you

Building real-time serverless data applications with Confluent and AWS - Lond...
Building real-time serverless data applications with Confluent and AWS - Lond...Building real-time serverless data applications with Confluent and AWS - Lond...
Building real-time serverless data applications with Confluent and AWS - Lond...

The document discusses building real-time serverless data applications with Confluent and AWS. It provides an overview of real-time data pipelines using event streaming and stream processing. It then discusses using Confluent Cloud for a managed Apache Kafka service and ksqlDB for stream processing. Finally, it reviews options for serverless stream processing using AWS Lambda with Confluent connectors and when to use ksqlDB, Kafka Streams, Kinesis Data Analytics, or Lambda.

awslambda
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...

In this workshop, we help you understand how you can help protect your web applications from threats cost effectively by using AWS WAF and Amazon CloudFront. As attacks and attempts to exploit vulnerabilities in web applications become more sophisticated and automated, having an effective web request filtering solution becomes key to keeping your users' data safe. We will cover common attack vectors and what you can do to mitigate them. You will learn how to leverage AWS WAF in conjunction with Amazon CloudFront to detect unwanted traffic and block it using simple configurations and automations. Prerequisites: Participants should have an AWS account established and available for use during the workshop. Please bring your own laptop.

aws re:invent 2016aws reinventreinvent2016
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
[D3T1S01] Gen AI를 위한 Amazon Aurora  활용 사례 방법[D3T1S01] Gen AI를 위한 Amazon Aurora  활용 사례 방법
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법

DBA들이 Aurora MySQL과 Amazon Bedrock서비스를 연동한 생성형 AI를 어떻게 업무에 활용할지에 대해서 예제를 통해서 살펴보고, Aurora PostgreSQL의 pgVector를 Vector DB로써 어떻게 활용할수 있는지에 대해서 알아봅니다

awsdatabaseaurora
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
AWS DATA & AI ROADSHOW 2024
• Finds database performance
anomalies
• Analyzes the anomaly
• Highlights
§ Prevalent wait events
§ Prevalent SQL statements
§ Other anomalous metrics
• Recommends next steps
LOCKS
78%
SELECT NAME FROM
CUSTOMERS;
SELECT ITEM FROM F;
MEMORY
What to do
about
locking
issues . . .
Amazon DevOps Guru for RDS
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Common Performance monitoring use cases
https://catalog.us-east-1.prod.workshops.aws/workshops/af784ecc-7ceb-4b86-8c7c-e03cbdbe4e0d/en-US
• Low system memory due to query memory consumption
• Impact of idle connections
• High CPU due to run-away query
• Vacuum not able to cleanup dead tuples
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Low system memory due to query memory consumption
§ Problem
– Our Aurora PostgreSQL writer instance memory is dropping rapidly with less than 10
connections.
– This is an OLTP workload and we expect more users.
– However we are concerned about running out of memory when more users login
§ Symptoms
– Freeable memory dropped to below 5% within 10 minutes of workload startup
– Number of database connections is less than 10
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Monitoring from
Performance Insight
dashboard
1. Database Load
2. Metrics dashboard
• Aurora PostgreSQL
database health summary
• CPU utilization
• Free Memory
• Connection utilization
Low system memory due to query memory consumption
BufferFileRead&Write wait
event
High wait CPU
Low FreeableMemory
Low # of Connections

Recommended for you

[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S06] Neptune Analytics with Vector Similarity Search[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S06] Neptune Analytics with Vector Similarity Search

최근 관심이 많은 GenAI RAG 를 위한 Vector Similarity Search를 2023년 re:invent에서 발표한 Neptune Analytics 를 통해 구현하여 Graph Query를 함께 할 수 있는 구성을 예제와 함께 설명합니다.

awsdatabasegraphdb
[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S03] Amazon DynamoDB design puzzlers[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S03] Amazon DynamoDB design puzzlers

간단해 보이지만 실제로는 복잡한 몇 가지 Amazon DynamoDB 디자인 퍼즐을 함께 해결하며 DynamoDB가 대규모로 작동하는 방식에 대해 자세히 알아봅니다. DynamoDB의 작동 방식을 이해함으로써 더 효과적이고 확장 가능한 솔루션을 찾는 방법을 알아보세요.

awsdatabasedynamodb
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기

클라우드에서 Database를 백업하고 복구��는 방법에 대해 설명드립니다. AWS Backup을 사용하여 전체백업/복구 부터 PITR(Point in Time Recovery)백업, 그리고 멀티 어카운트, 멀티 리전등 다양한 데이터 보호 방법을 소개합니다(데모 포함). 또한 self-managed DB 의 데이터 저장소로 Amazon FSx for NetApp ONTAP 스토리지 서비스를 사용할 경우 얼마나 신속하게 데이터를 복구/복제 할수 있는지 살펴 봅니다.

awsdatabasestorage
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Low system memory due to query memory consumption
1. Metrics dashboard
2. Custom dashboard
3. Add Widget
• FreeableMemory under
CloudWatch metrics
• FreeableMemory size
dropped to around
200MB from over 3G
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Major memory consumers in PostgreSQL
1. Global shared memory for data cache
2. Query memory usage
3. Connection memory usage
§ Rule out 1 and 3 cases
Low system memory due to query memory consumption
SELECT name, setting, unit, boot_val, reset_val
FROM pg_settings
WHERE name in ( 'shared_buffers', 'work_mem', 'maintenance_work_mem', 'autovacuum_work_mem', 'logical_decoding_work_mem');
name | setting | unit | boot_val | reset_val
---------------------------+---------+------+----------+-----------
autovacuum_work_mem | 499402 | kB | -1 | 499402
logical_decoding_work_mem | 65536 | kB | 65536 | 65536
maintenance_work_mem | 261120 | kB | 65536 | 261120
shared_buffers | 1309394 | 8kB | 16384 | 1309394
work_mem | 4096 | kB | 4096 | 4096
1
3
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Review Query Memory usage using OS process list from Enhanced monitoring
– RES displays the actual physical memory being used by the process.
– 4 processes and its parallel work processes have high memory usages.
§ Check correlation between the process memory(RSS) and FreeableMemory usage from
Performance Insight Metrics Custom dashboard
Low system memory due to query memory consumption
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Identify the top queries contributing the database load the most from Performance Insight
Dimensions top SQL tab
– The select statement has many block hit and temp writes per second with very high avg latency.
– IPC:HashGrowBatchesAllocate and IPC:HashBuildHashOuter wait events are related to hash join and its
memory allocation.
– IO:BufFileRead and IO:BufFileWrite occur when PostgreSQL creates temporary files.
Low system memory due to query memory consumption

Recommended for you

[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기

기업은 이벤트나 신제품 출시 등으로 예기치 못한 트래픽 급증 시 데이터베이스 과부하, 서비스 지연 및 중단 등의 문제를 겪곤 합니다. Aurora 오토스케일링은 프로비저닝 시간으로 인해 실시간 대응이 어렵고, 트래픽 대응을 위한 과잉 프로비저닝이 발생합니다. 이러한 문제를 해결하기 위해 프로비저닝된 Amazon Aurora 클러스터와 Aurora Serverless v2(ASV2) 인스턴스를 결합하는 Amazon Aurora 혼합 구성 클러스터 아키텍처와 고해상도 지표를 기반으로 하는 커스텀 오토스케일링 솔루션을 소개합니다.

awsdatabaseaurora
[D3T1S02] Aurora Limitless Database Introduction
[D3T1S02] Aurora Limitless Database Introduction[D3T1S02] Aurora Limitless Database Introduction
[D3T1S02] Aurora Limitless Database Introduction

Amazon Aurora 클러스터를 초당 수백만 건의 쓰기 트랜잭션으로 확장하고 페타바이트 규모의 데이터를 관리할 수 있으며, 사용자 지정 애플리케이션 로직을 생성하거나 여러 데이터베이스를 관리할 필요 없이 Aurora에서 관계형 데이터베이스 워크로드를 단일 Aurora 라이터 인스턴스의 한도 이상으로 확장할 수 있는 Amazon Aurora Limitless Database를 소개합니다.

awsdatabaseaurora
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습

Amazon Aurora MySQL 호환 버전 2(MySQL 5.7 호환성 지원)는 2024년 10월 31일에 표준 지원이 종료될 예정입니다. 이로 인해 Aurora MySQL의 메이저 버전 업그레이드를 검토하고 계시다면, Amazon Blue/Green Deployments는 운영 환경에 영향을 주지 않고 메이저 버전 업그레이드를 할 수 있는 최적의 솔루션입니다. 본 세션에서는 Blue/Green Deployments를 통한 Aurora MySQL의 메이저 버전 업그레이드를 실습합니다.

awsdatabaseaurora
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Review query plan of the top SQL
– This query has suboptimal plan due to outdated statistics on the tsmall table.
Low system memory due to query memory consumption
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Solutions
– Stop query execution
– Increase server memory
– Query Optimization
§ The query is optimized after statistics
update on the table with ANALYZE
command
§ No more Freeable Memory drop
Low system memory due to query memory consumption
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Impact of idle connections
§ Problem
– Our Aurora PostgreSQL is low on memory. We have a low volume, read-only workload
running on the system. How can we find out what is consuming the memory ?
§ Symptoms
– CloudWatch Freeable Memory metric is below 5%.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Monitoring from
Performance Insight
dashboard
1. Database Load
2. Metrics dashboard
• Aurora PostgreSQL
database health summary
• CPU utilization
• Free Memory
• Connection utilization
Impact of idle connections
Hardly see Database load
Very low Nice CPU usage
Low FreeableMemory
Very high # of Connections

Recommended for you

AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2

AWS Modern Infra with Storage Roadshow 2023 - Day 2

modern infra with storageroad
AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1

AWS Modern Infra with Storage Roadshow 2023 - Day 1

#modern infra with storageroad
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...

Database Migration Service(DMS)는 RDBMS 이외에도 다양한 데이터베이스 이관을 지원합니다. 실제 고객사 사례를 통해 DMS가 데이터베이스 이관, 통합, 분리를 수행하는 데 어떻게 활용되는지 알아보고, 동시에 데이터 분석을 위한 데이터 수집(Data Ingest)에도 어떤 역할을 하는지 살펴보겠습니다.

aws data roadshow 2023
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Major memory consumers in PostgreSQL
1. Global shared memory for data cache
2. Query memory usage
3. Connection memory usage
§ Rule out 1 and 2 cases
SELECT name, setting, unit, boot_val, reset_val
FROM pg_settings
WHERE name in ( 'shared_buffers', 'work_mem', 'maintenance_work_mem', 'autovacuum_work_mem', 'logical_decoding_work_mem');
name | setting | unit | boot_val | reset_val
---------------------------+---------+------+----------+-----------
autovacuum_work_mem | 499402 | kB | -1 | 499402
logical_decoding_work_mem | 65536 | kB | 65536 | 65536
maintenance_work_mem | 261120 | kB | 65536 | 261120
shared_buffers | 1309394 | 8kB | 16384 | 1309394
work_mem | 4096 | kB | 4096 | 4096
1
2
Impact of idle connections
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Impact of idle connections
§ Review connection memory usage from Performance Insight Metrics dashboard
§ Add widget from Custom dashboard
• FreeableMemory CloudWatch metric and DB Resident Set Size(RSS) OS metric
• User Max Connection Database metric and DatabaseConnections CloudWatch metric
• Task Total, Tasks Sleeping, Tasks Running OS metrics 1000 database connections
Almost 0 tasks.runnning
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Impact of idle connections
§ Solutions
– Client side Connection pooling
– External Connection pooling such as PgBouncer, Pgpool-II, or RDS Proxy
§ RDS Proxy is deployed with the same workload
– There is only slight Freeable Memory drop.
– Aurora PostgreSQL can handle the same workload with 13 database connections.
– The number of Tasks Running is < 1, which indicates connections are sitting in idle state most of
time. There are opportunity to further reduce RDS Proxy connection pool size.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
High CPU due to run-away query
§ Problem
– Our Aurora PostgreSQL database has been running fine until yesterday. Something
happened today that drove the CPU usage to 100%. Everything takes much longer to
run. Our production system is down because of that. What need help bringing things
back to normal.
§ Symptoms
– CPU Utilization total(Percent) metric is at 100 %.

Recommended for you

Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...

최근 국내와 글로벌 서비스에서 MongoDB를 사용하는 사례가 급증하고 있습니다. 이 세션에서는 Amazon DocumentDB의 아키텍처를 살펴보고, DocumentDB를 사용할 때 주의해야 할 중요 포인트에 대해 알아봅니다.

aws data roadshow 2023
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...

Amazon ElastiCache는 Redis 및 MemCached와 호환되는 완전관리형 서비스로서 현대적 애플리케이션의 성능을 최적의 비용으로 실시간으로 개선해 줍니다. ElastiCache의 Best Practice를 통해 최적의 성능과 서비스 최적화 방법에 대해 알아봅니다.

aws data roadshow 2023
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...

ccAmazon Aurora 데이터베이스는 클라우드용으로 구축된 관계형 데이터베이스입니다. Aurora는 상용 데이터베이스의 성능과 가용성, 그리고 오픈소스 데이터베이스의 단순성과 비용 효율성을 모두 제공합니다. 이 세션은 Aurora의 고급 사용자들을 위한 세션으로써 Aurora의 내부 구조와 성능 최적화에 대해 알아봅니다.

aws data roadshow 2023
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Monitoring from
Performance Insight
dashboard
1. Database Load
2. Metrics dashboard
• Aurora PostgreSQL
database health summary
• CPU utilization
• Connection utilization
High nice CPU usage
Low # of Connections
High CPU due to run-away query
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ High nice CPU usage with 6 database connections
§ The most common reasons that can cause high CPU usage with PostgreSQL
1. High number of active connections
2. Inefficient or run-away query
§ Rule out 1
High CPU due to run-away query
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Review query CPU usage using OS process list from Enhanced monitoring
High CPU due to run-away query
§ Process id 22435 and its parallel worker
processes consume 74.5% of the
instance CPU.
§ Identify the SQL statement by querying
pg_stat_activity dynamic statistics view
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
High CPU due to run-away query
§ Solutions
– Stop query execution
– Increase available CPU
– Query optimization
§ Cancel the SQL
§ CPU utilization goes back
to normal.

Recommended for you

[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...

오랫동안 관계형 데이터베이스가 가장 많이 사용되었으며 거의 모든 애플리케이션에서 널리 사용되었습니다. 따라서 애플리케이션 아키텍처에서 데이터베이스를 선택하기가 더 쉬웠지만, 구축할 수 있는 애플리케이션의 유형이 제한적이었습니다. 관계형 데이터베이스는 스위스 군용 칼과 같아서 많은 일을 할 수 있지만 특정 업무에는 완벽하게 적합하지는 않습니다. 클라우드 컴퓨팅의 등장으로 경제적인 방식으로 더욱 탄력적이고 확장 가능한 애플리케이션을 구축할 수 있게 되면서 기술적으로 가능한 일이 달라졌습니다. 이러한 변화는 전용 데이터베이스의 부상으로 이어졌습니다. 개발자는 더 이상 기본 관계형 데이터베이스를 사용할 필요가 없습니다. 개발자는 애플리케이션의 요구 사항을 신중하게 고려하고 이러한 요구 사항에 맞는 데이터베이스를 선택할 수 있습니다.

aws data roadshow 2023
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...

실시간 분석은 AWS 고객의 사용 사례가 점점 늘어나고 있습니다. 이 세션에 참여하여 스트리밍 데이터 기술이 어떻게 데이터를 즉시 분석하고, 시스템 간에 데이터를 실시간으로 이동하고, 실행 가능한 통찰력을 더 빠르게 얻을 수 있는지 알아보십시오. 일반적인 스트리밍 데이터 사용 사례, 비즈니스에서 실시간 분석을 쉽게 활성화하는 단계, AWS가 Amazon Kinesis와 같은 AWS 스트리밍 데이터 서비스를 사용하도록 지원하는 방법을 다룹니다.

aws data roadshow 2023
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...

Amazon EMR은 Apache Spark, Hive, Presto, Trino, HBase 및 Flink와 같은 오픈 소스 프레임워크를 사용하여 분석 애플리케이션을 쉽게 실행할 수 있는 관리형 서비스를 제공합니다. Spark 및 Presto용 Amazon EMR 런타임에는 오픈 소스 Apache Spark 및 Presto에 비해 두 배 이상의 성능 향상을 제공하는 최적화 기능이 포함되어 있습니다. Amazon EMR Serverless는 Amazon EMR의 새로운 배포 옵션이지만 데이터 엔지니어와 분석가는 클라우드에서 페타바이트 규모의 데이터 분석을 쉽고 비용 효율적으로 실행할 수 있습니다. 이 세션에 참여하여 개념, 설계 패턴, 라이브 데모를 사용하여 Amazon EMR/EMR 서버리스를 살펴보고 Spark 및 Hive 워크로드, Amazon EMR 스튜디오 및 Amazon SageMaker Studio와의 Amazon EMR 통합을 실행하는 것이 얼마나 쉬운지 알아보십시오.

aws data roadshow 2023
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ Problem
– We have been seeing increasing query response time.
• Frequent updates on the tables affected
• autovacuum is enabled
§ Symptoms
– Elevated query response time
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
§ Simulation of a long running transaction blocking vacuum from cleaning up dead tuples
Vacuum not able to cleanup dead tuples
user1 user2
2 x buffer
cache hit
increase
Execution
time
increase
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ The most common reasons that can increase query execution time
1. Change of query execution plan
2. Autovacuum is turned off
3. Table is bloated
4. Vacuum is blocked, and unable to cleanup dead tuples effectively
• Long-running transactions
• Abandon replication slots
• Orphaned prepare transactions
• Long-running transactions on read replica
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ Review query plans
– query plans of two runs are identical
Query plan of Run #1
Query plan of Run #4

Recommended for you

Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...

로그 및 지표 데이터를 쉽게 가져오고, OpenSearch 검색 API를 사용하고, OpenSearch 대시보드를 사용하여 시각화를 구축하는 등 Amazon OpenSearch의 새로운 기능과 기능에 대해 자세히 알아보십시오. 애플리케이션 문제를 디버깅할 수 있는 OpenSearch의 Observability 기능에 대해 알아보세요. Amazon OpenSearch Service를 통해 인프라 관리에 대해 걱정하지 않고 검색 또는 모니터링 문제에 집중할 수 있는 방법을 알아보십시오.

aws data roadshow 2023
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...

데이터 거버넌스는 전체 프로세스에서 데이터를 관리하여 데이터의 정확성과 완전성을 보장하고 필요한 사람들이 데이터에 액세스할 수 있도록 하는 프로세스입니다. 이 세션에 참여하여 AWS가 어떻게 분석 서비스 전반에서 데이터 준비 및 통합부터 데이터 액세스, 데이터 품질 및 메타데이터 관리에 이르기까지 포괄적인 데이터 거버넌스를 제공하는지 알아보십시오. AWS에서의 스트리밍에 대해 자세히 알아보십시오.

aws data roadshow 2023
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...

이 세션에 참여하여 Amazon Redshift의 새로운 기능을 자세히 살펴보십시오. Amazon Data Sharing, Amazon Redshift Serverless, Redshift Streaming, Redshift ML 및 자동 복사 등에 대한 자세한 내용과 데모를 통해 Amazon Redshift의 새로운 기능을 알고 싶은 사용자에게 적합합니다.

aws data roadshow 2023
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ Review global and table level autovacuum settings
– No table level autovacuum configuration is set for pgbench_accounts table
– Global configuration setting is used for the table
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ Review table bloat
– The n_live_tup and n_dead_tup indicate that half of the table is bloated.
§ Verify problem with vacuum cleaning up the dead tuples
– 9,999,999 dead tuples are not able to be cleanup.
– Any active long running transaction(s) that are accessing those tuples could prevent vacuum from cleaning
the dead tuples.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ Identify vacuum blockers
– Check any long running transactions
– pid 28210 has a transaction opened, but not currently executing any commands. It is idle in
transaction state. It has been running for over 40 minutes.
– The SQL from user1 is the in the idle in transaction state.
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ Identify vacuum blockers
– Check for any abandon replication slots
– Check for any orphaned prepare transactions
– Check for any long running transactions on read replica

Recommended for you

From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...

데이터는 혁신과 변혁의 토대입니다. 비즈니스 혁신을 이끄는 혁신은 특정 시점의 전략이나 솔루션이 아니라 성장을 위한 반복적이고 집단적인 계획입니다. 혁신에 이러한 접근 방식을 채택하는 기업은 전략과 비즈니스 문화에서 데이터를 기반으로 하는 경우가 많습니다. 이러한 접근 방식을 개발하려면 리더가 데이터를 조직의 자산처럼 취급하고 조직이 더 나은 비즈니스 성과를 위해 데이터를 활용할 수 있도록 권한을 부여해야 합니다. AWS와 Amazon이 어떻게 데이터와 분석을 활용하여 확장 가능한 비즈니스 효율성을 창출하고 고객의 가장 복잡한 문제를 해결하는 메커니즘을 개발했는지 알아보십시오.

aws data roadshow 2023
BIGPPTTTTTTTTtttttttttttttttttttttt.pptx
BIGPPTTTTTTTTtttttttttttttttttttttt.pptxBIGPPTTTTTTTTtttttttttttttttttttttt.pptx
BIGPPTTTTTTTTtttttttttttttttttttttt.pptx

test

EGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithmEGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithm

LSTM algorithm

© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Vacuum not able to cleanup dead tuples
§ Solutions
– End the long running transaction
– Run vacuum verbose on table to manually cleanup dead tuples
– For long term, follow the below practices to avoid future issues
• Setup process for monitoring table bloat
• Avoid long running transaction
• Set idle_in_transaction_session_timeout
§ Manual vacuum after terminating the long running transaction
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
Summary
§ Get used to Aurora PostgreSQL monitoring tools and PostgreSQL native statistics views
– CloudWatch
– Enhanced Monitoring and os process list
– Performance insights and wait events
– Top SQLs
– Consolidated Metrics dashboard
– pg_locks, pg_stat_user_tables, pg_statio_user_tables
§ Review database highest bottlenecks and related Top SQLs and metrics
§ List solutions based on the analysis on the monitoring information
§ Make a decision on the solution and apply it and verify the changes
© 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS DATA & AI ROADSHOW 2024
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you!
Yun Cheol Ha
yuncheol@amazon.com

More Related Content

Similar to [D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use cases

[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
Amazon Web Services Korea
 
How to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech TalksHow to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech Talks
Amazon Web Services
 
Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)
Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)
Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)
Amazon Web Services
 
Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon Redshift
Amazon Web Services
 
Cloud monitoring with Applications Manager
Cloud monitoring with Applications ManagerCloud monitoring with Applications Manager
Cloud monitoring with Applications Manager
ManageEngine, Zoho Corporation
 
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Amazon Web Services
 
Loading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SFLoading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SF
Amazon Web Services
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
Amazon Web Services
 
Loading Data into Redshift with Lab
Loading Data into Redshift with LabLoading Data into Redshift with Lab
Loading Data into Redshift with Lab
Amazon Web Services
 
(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS
Amazon Web Services
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
Amazon Web Services
 
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
Amazon Web Services
 
saa3_wk5.pdf
saa3_wk5.pdfsaa3_wk5.pdf
saa3_wk5.pdf
Michgo1
 
Getting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWSGetting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWS
Amazon Web Services
 
Loading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF LoftLoading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF Loft
Amazon Web Services
 
AWS Tech Talks: Armazenamento Híbrido na Nuvem
AWS Tech Talks: Armazenamento Híbrido na NuvemAWS Tech Talks: Armazenamento Híbrido na Nuvem
AWS Tech Talks: Armazenamento Híbrido na Nuvem
Amazon Web Services LATAM
 
Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring
WSO2
 
Introduction to Amazon Athena
Introduction to Amazon AthenaIntroduction to Amazon Athena
Introduction to Amazon Athena
Sungmin Kim
 
Building real-time serverless data applications with Confluent and AWS - Lond...
Building real-time serverless data applications with Confluent and AWS - Lond...Building real-time serverless data applications with Confluent and AWS - Lond...
Building real-time serverless data applications with Confluent and AWS - Lond...
Ahmed791434
 
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
Amazon Web Services
 

Similar to [D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use cases (20)

[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
[D3T2S03] Data&AI Roadshow 2024 - Amazon DocumentDB 실습
 
How to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech TalksHow to Bring Microsoft Apps to AWS - AWS Online Tech Talks
How to Bring Microsoft Apps to AWS - AWS Online Tech Talks
 
Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)
Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)
Amazon Redshift 與 Amazon Redshift Spectrum 幫您建立現代化資料倉儲 (Level 300)
 
Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon Redshift
 
Cloud monitoring with Applications Manager
Cloud monitoring with Applications ManagerCloud monitoring with Applications Manager
Cloud monitoring with Applications Manager
 
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
Serverless Analytics with Amazon Redshift Spectrum, AWS Glue, and Amazon Quic...
 
Loading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SFLoading Data into Redshift: Data Analytics Week SF
Loading Data into Redshift: Data Analytics Week SF
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
 
Loading Data into Redshift with Lab
Loading Data into Redshift with LabLoading Data into Redshift with Lab
Loading Data into Redshift with Lab
 
(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS(BDT317) Building A Data Lake On AWS
(BDT317) Building A Data Lake On AWS
 
Loading Data into Redshift
Loading Data into RedshiftLoading Data into Redshift
Loading Data into Redshift
 
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
AWS Public Data Sets: How to Stage Petabytes of Data for Analysis in AWS (WPS...
 
saa3_wk5.pdf
saa3_wk5.pdfsaa3_wk5.pdf
saa3_wk5.pdf
 
Getting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWSGetting Started with Managed Database Services on AWS
Getting Started with Managed Database Services on AWS
 
Loading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF LoftLoading Data into Redshift: Data Analytics Week at the SF Loft
Loading Data into Redshift: Data Analytics Week at the SF Loft
 
AWS Tech Talks: Armazenamento Híbrido na Nuvem
AWS Tech Talks: Armazenamento Híbrido na NuvemAWS Tech Talks: Armazenamento Híbrido na Nuvem
AWS Tech Talks: Armazenamento Híbrido na Nuvem
 
Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring Enterprise Use Case Webinar - PaaS Metering and Monitoring
Enterprise Use Case Webinar - PaaS Metering and Monitoring
 
Introduction to Amazon Athena
Introduction to Amazon AthenaIntroduction to Amazon Athena
Introduction to Amazon Athena
 
Building real-time serverless data applications with Confluent and AWS - Lond...
Building real-time serverless data applications with Confluent and AWS - Lond...Building real-time serverless data applications with Confluent and AWS - Lond...
Building real-time serverless data applications with Confluent and AWS - Lond...
 
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
AWS re:Invent 2016: Workshop: Secure Your Web Application with AWS WAF and Am...
 

More from Amazon Web Services Korea

[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
[D3T1S01] Gen AI를 위한 Amazon Aurora  활용 사례 방법[D3T1S01] Gen AI를 위한 Amazon Aurora  활용 사례 방법
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
Amazon Web Services Korea
 
[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S06] Neptune Analytics with Vector Similarity Search[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S06] Neptune Analytics with Vector Similarity Search
Amazon Web Services Korea
 
[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S03] Amazon DynamoDB design puzzlers[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S03] Amazon DynamoDB design puzzlers
Amazon Web Services Korea
 
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
Amazon Web Services Korea
 
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
Amazon Web Services Korea
 
[D3T1S02] Aurora Limitless Database Introduction
[D3T1S02] Aurora Limitless Database Introduction[D3T1S02] Aurora Limitless Database Introduction
[D3T1S02] Aurora Limitless Database Introduction
Amazon Web Services Korea
 
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
Amazon Web Services Korea
 
AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2
Amazon Web Services Korea
 
AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1
Amazon Web Services Korea
 
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
Amazon Web Services Korea
 
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon Web Services Korea
 
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Web Services Korea
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Amazon Web Services Korea
 
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
Amazon Web Services Korea
 
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Amazon Web Services Korea
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon Web Services Korea
 
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon Web Services Korea
 
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Amazon Web Services Korea
 
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Web Services Korea
 
From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...
Amazon Web Services Korea
 

More from Amazon Web Services Korea (20)

[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
[D3T1S01] Gen AI를 위한 Amazon Aurora  활용 사례 방법[D3T1S01] Gen AI를 위한 Amazon Aurora  활용 사례 방법
[D3T1S01] Gen AI를 위한 Amazon Aurora 활용 사례 방법
 
[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S06] Neptune Analytics with Vector Similarity Search[D3T1S06] Neptune Analytics with Vector Similarity Search
[D3T1S06] Neptune Analytics with Vector Similarity Search
 
[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S03] Amazon DynamoDB design puzzlers[D3T1S03] Amazon DynamoDB design puzzlers
[D3T1S03] Amazon DynamoDB design puzzlers
 
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
[D3T1S07] AWS S3 - 클라우드 환경에서 데이터베이스 보호하기
 
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
[D3T1S05] Aurora 혼합 구성 아키텍처를 사용하여 예상치 못한 트래픽 급증 대응하기
 
[D3T1S02] Aurora Limitless Database Introduction
[D3T1S02] Aurora Limitless Database Introduction[D3T1S02] Aurora Limitless Database Introduction
[D3T1S02] Aurora Limitless Database Introduction
 
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
[D3T2S01] Amazon Aurora MySQL 메이저 버전 업그레이드 및 Amazon B/G Deployments 실습
 
AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2AWS Modern Infra with Storage Roadshow 2023 - Day 2
AWS Modern Infra with Storage Roadshow 2023 - Day 2
 
AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1AWS Modern Infra with Storage Roadshow 2023 - Day 1
AWS Modern Infra with Storage Roadshow 2023 - Day 1
 
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
사례로 알아보는 Database Migration Service : 데이터베이스 및 데이터 이관, 통합, 분리, 분석의 도구 - 발표자: ...
 
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
Amazon DocumentDB - Architecture 및 Best Practice (Level 200) - 발표자: 장동훈, Sr. ...
 
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
Amazon Elasticache - Fully managed, Redis & Memcached Compatible Service (Lev...
 
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
Internal Architecture of Amazon Aurora (Level 400) - 발표자: 정달영, APAC RDS Speci...
 
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
[Keynote] 슬기로운 AWS 데이터베이스 선택하기 - 발표자: 강민석, Korea Database SA Manager, WWSO, A...
 
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
Demystify Streaming on AWS - 발표자: 이종혁, Sr Analytics Specialist, WWSO, AWS :::...
 
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
Amazon EMR - Enhancements on Cost/Performance, Serverless - 발표자: 김기영, Sr Anal...
 
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
Amazon OpenSearch - Use Cases, Security/Observability, Serverless and Enhance...
 
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
Enabling Agility with Data Governance - 발표자: 김성연, Analytics Specialist, WWSO,...
 
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
Amazon Redshift Deep Dive - Serverless, Streaming, ML, Auto Copy (New feature...
 
From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...From Insights to Action, How to build and maintain a Data Driven Organization...
From Insights to Action, How to build and maintain a Data Driven Organization...
 

Recently uploaded

BIGPPTTTTTTTTtttttttttttttttttttttt.pptx
BIGPPTTTTTTTTtttttttttttttttttttttt.pptxBIGPPTTTTTTTTtttttttttttttttttttttt.pptx
BIGPPTTTTTTTTtttttttttttttttttttttt.pptx
RajdeepPaul47
 
EGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithmEGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithm
fatimaezzahraboumaiz2
 
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model SafeSouth Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
simmi singh$A17
 
LLM powered Contract Compliance Application.pptx
LLM powered Contract Compliance Application.pptxLLM powered Contract Compliance Application.pptx
LLM powered Contract Compliance Application.pptx
Jyotishko Biswas
 
NPS_Presentation_V3.pptx it is regarding National pension scheme
NPS_Presentation_V3.pptx it is regarding National pension schemeNPS_Presentation_V3.pptx it is regarding National pension scheme
NPS_Presentation_V3.pptx it is regarding National pension scheme
ASISHSABAT3
 
Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)
sapna sharmap11
 
Seamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send MoneySeamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send Money
gargtinna79
 
How We Added Replication to QuestDB - JonTheBeach
How We Added Replication to QuestDB - JonTheBeachHow We Added Replication to QuestDB - JonTheBeach
How We Added Replication to QuestDB - JonTheBeach
javier ramirez
 
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeMalviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
butwhat24
 
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeSaket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
shruti singh$A17
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
aarusi sexy model
 
Streamlining Legacy Complexity Through Modernization
Streamlining Legacy Complexity Through ModernizationStreamlining Legacy Complexity Through Modernization
Streamlining Legacy Complexity Through Modernization
sanjay singh
 
MUMBAI MONTHLY RAINFALL CAPSTONE PROJECT
MUMBAI MONTHLY RAINFALL CAPSTONE PROJECTMUMBAI MONTHLY RAINFALL CAPSTONE PROJECT
MUMBAI MONTHLY RAINFALL CAPSTONE PROJECT
GaneshGanesh399816
 
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
shoeb2926
 
RK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
RK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeRK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
RK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Alisha Pathan $A17
 
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model SafePitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
vasudha malikmonii$A17
 
iot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptxiot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptx
KiranKumar139571
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
jiya khan$A17
 
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeNehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
butwhat24
 
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...
javier ramirez
 

Recently uploaded (20)

BIGPPTTTTTTTTtttttttttttttttttttttt.pptx
BIGPPTTTTTTTTtttttttttttttttttttttt.pptxBIGPPTTTTTTTTtttttttttttttttttttttt.pptx
BIGPPTTTTTTTTtttttttttttttttttttttt.pptx
 
EGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithmEGU2020-10385_presentation LSTM algorithm
EGU2020-10385_presentation LSTM algorithm
 
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model SafeSouth Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
South Ex @ℂall @Girls ꧁❤ 9711199012 ❤꧂Glamorous sonam Mehra Top Model Safe
 
LLM powered Contract Compliance Application.pptx
LLM powered Contract Compliance Application.pptxLLM powered Contract Compliance Application.pptx
LLM powered Contract Compliance Application.pptx
 
NPS_Presentation_V3.pptx it is regarding National pension scheme
NPS_Presentation_V3.pptx it is regarding National pension schemeNPS_Presentation_V3.pptx it is regarding National pension scheme
NPS_Presentation_V3.pptx it is regarding National pension scheme
 
Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)Sin Involves More Than You Might Think (We'll Explain)
Sin Involves More Than You Might Think (We'll Explain)
 
Seamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send MoneySeamlessly Pay Online, Pay In Stores or Send Money
Seamlessly Pay Online, Pay In Stores or Send Money
 
How We Added Replication to QuestDB - JonTheBeach
How We Added Replication to QuestDB - JonTheBeachHow We Added Replication to QuestDB - JonTheBeach
How We Added Replication to QuestDB - JonTheBeach
 
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeMalviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Malviya Nagar @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
 
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeSaket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
Saket @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
 
Streamlining Legacy Complexity Through Modernization
Streamlining Legacy Complexity Through ModernizationStreamlining Legacy Complexity Through Modernization
Streamlining Legacy Complexity Through Modernization
 
MUMBAI MONTHLY RAINFALL CAPSTONE PROJECT
MUMBAI MONTHLY RAINFALL CAPSTONE PROJECTMUMBAI MONTHLY RAINFALL CAPSTONE PROJECT
MUMBAI MONTHLY RAINFALL CAPSTONE PROJECT
 
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
Greater Kailash @ℂall @Girls ꧁❤ 9873777170 ❤꧂Glamorous sonam Mehra Top Model ...
 
RK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
RK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model SafeRK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
RK Puram @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Neha Singla Top Model Safe
 
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model SafePitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
Pitampura @ℂall @Girls ꧁❤ 9873777170 ❤꧂Fabulous sonam Mehra Top Model Safe
 
iot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptxiot paper presentation FINAL EDIT by kiran.pptx
iot paper presentation FINAL EDIT by kiran.pptx
 
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model SafeLajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
Lajpat Nagar @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Ruhi Singla Top Model Safe
 
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model SafeNehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
Nehru Place @ℂall @Girls ꧁❤ 9873940964 ❤꧂VIP Jina Singh Top Model Safe
 
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...
Cómo hemos implementado semántica de "Exactly Once" en nuestra base de datos ...
 

[D3T1S04] Aurora PostgreSQL performance monitoring and troubleshooting by use cases

  • 1. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Yun Cheol Ha Sr. PostgreSQL Specialist Solutions Architect Amazon Web Services Aurora PostgreSQL Performance Monitoring and troubleshooting
  • 2. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 2 Agenda • Performance monitoring approach • PostgreSQL and Amazon Aurora PostgreSQL architecture • Amazon Aurora PostgreSQL Performance monitoring tools and interfaces • Common Performance monitoring use cases
  • 3. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Performance Monitoring Approach
  • 4. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Root cause and symptoms of database performance issues Poor Database Performance High DB Connections High Memory Utilization High read/write latency High I/O Usage High CPU Utilization High query execution time Lower throughput High Active sessions
  • 5. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Performance Monitoring Approach System Monitoring Database Monitoring Analyzing and Identifying bottlenecks Optimization Establish Performance Baseline Monitoring Key Performance Indicators (KPI) Alert and Notifications Monitoring and analysis Tools and interface
  • 6. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 PostgreSQL and Aurora PostgreSQL Architecture
  • 7. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Understanding PostgreSQL Architecture Backend Process Backend Process Backend Process Postmaster Lock Space Shared Buffers WAL Buffers CLOG Buffers Other Buffers OS Buffers Storage Background Writer, WAL Writer, Checkpointer, Archiver, Logging Collector, Stats Collector, AutoVacuum Launcher Client Libraries (libpq, JDBC) Client Application Shared Memory
  • 8. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Amazon Aurora PostgreSQL distributed architecture 8 Shared storage volume Availability Zone 2 Availability Zone 3 SQL Transactions Caching SQL Transactions Caching SQL Transactions Caching • Purpose-built log-structured distributed storage system designed for databases • Storage volume is striped across hundreds of storage nodes distributed over 3 different availability zones • Six copies of data, two copies in each availability zone to protect against AZ+1 failures • 10GB of segment size • Primary and replicas (up to 15) all point to the same storage Availability Zone 1
  • 9. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 1. Receive log records and add to in-memory queue 2. Persist records in hot log and ACK 3. Organize records and identify gaps in log 4. Gossip with peers to fill in holes 5. Coalesce log records into new page versions 6. Periodically stage log and new page versions to Amazon S3 7. Periodically garbage collect old versions 8. Periodically validate CRC codes on blocks Notes: All steps are asynchronous Only steps 1 and 2 are in foreground latency path Log records Database Instance Incoming queue Storage node S3 BACKUP 1 2 3 4 5 6 7 8 Update queue ACK Hot Log Data pages Continuous backup GC Scrub Sort group Peer to peer gossip Peer Storage Nodes Coalesce Anatomy of storage node
  • 10. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Aurora PostgreSQL Performance Monitoring Tools and interfaces
  • 11. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Overview of monitoring in Amazon Aurora PostgreSQL Amazon Aurora comes with comprehensive monitoring built-in Publishing database logs (errors, audit, and slow queries) to a centralized log store Query and wait- level performance data Additional database- specific metrics at up to 1 second granularity Amazon CloudWatch Metrics Amazon CloudWatch Logs Performance Insights Enhanced Monitoring DevOps Guru for RDS ML-Powered Capability to detect Anomalous behavior Monitor core (CPU, memory) and transactional (throughput, latency) metrics PostgreSQL statistics views for database activity monitoring
  • 12. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 CloudWatch Metrics CloudWatch(CW) gathers metrics on the host underlying the RDS database. You can view these metrics in the RDS console under the monitoring tab. CloudWatch Metrics: • CPU Utilization • DB Connections • Free Storage • Free Memory • Write IOPS • Read IOPS • Network Throughput • BufferCacheHitRatio • Maximum Used TransactionID • VolumeBytesUsed • VolumeWriteIOPs • Choose time period • Compare RDS instances
  • 13. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Enhanced Monitoring Enhanced Monitoring gathers finer grained OS metrics from an agent installed on the RDS host. • By default metrics are stored for 30 days. Governed by RDSOSMetrics log group in CloudWatch • Incurs additional CloudWatch costs based on granularity (from 1 to 60 seconds). • Process list with Total CPU bandwidth (CPU%) and Total memory used (MEM%).
  • 14. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Using CloudWatch logs Publishing your Aurora database logs (Postgresql.log and Upgrade.log) to Amazon CloudWatch Logs is a best practice. • Ensures logs are preserved in highly durable storage • Perform real-time analysis of log data Enable Query Logging • log_min_duration_statement – Limit in milliseconds for a statement to be logged • log_statement – Determines which statements are logged [none, all, ddl, dml] • Note: Too much logging will degrade performance in production systems • Log_statement doesn’t have correlation with log_min_duration_statement but both are independent parameters • Query information is included in postgres.log file Retention • rds.log_retention_period (default 3 days)
  • 15. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Amazon RDS Performance Insights • Easy and powerful dashboard showing load on your database • Uses Average Active Session (AAS) as a load aggregation method over time • Helps you identify source of bottlenecks: • top SQL queries, wait statistics, DB engine counters • Consolidated Metrics • CloudWatch, os metrics, db metrics • Adjustable time frame (hour, day, week, month)
  • 16. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Performance Insights Example: Wait Bottleneck All engines have a connections list showing – active – idle We sample every second § For each active session, collect: – SQL, – State :CPU, I/O, Lock, Commit log wait, etc. – Host – User Expose as “Average Active Sessions” (AAS)
  • 17. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Performance Insights – Sampling Sampling every second for current activity( active, idle etc ) and wait event of each backend process Query run: often Fast query run: rarely Slow query User 1 User 2 User 3 Time
  • 18. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AAS compared to Max CPU Max vCPU Performance Insights – Max vCPU chart Wait events AAS < 1 : Database is not blocked AAS ~= 0 : Database basically idle. Problems are in the APP not DB AAS < # of CPUs : CPU available Are any single sessions 100% active? AAS > # of CPUs : Could have performance problems AAS >> # of CPUS : There is a bottleneck
  • 19. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 Wait events https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Reference.Waitevents.html • Wait event shows the type of event for which the backend is waiting. • This could commonly indicate performance problems. § List of the most common wait events
  • 20. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 20 SQL Statistics in Performance Insights • Correlating SQL level wait events with database level wait events • per second statistics and per call statistics • Calls per sec, Avg latency(ms) per call, Blk hits, Blk reads, Blk writes, Local blk hits, Temp blk read etc • The SQL statistics are an average for the selected time range.
  • 21. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 Consolidated Metrics Dashboard View 21 • Aurora PostgreSQL database health summary – pre defined • Custom dashboard • CloudWatch metrics • OS metrics • Database metrics
  • 22. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Performance Insights Example: Wait Bottleneck Get contextual help for wait events Identify problem statement
  • 23. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § PostgreSQL collects and reports information about server activities. § pg_locks, pg_stat_user_tables, pg_statio_user_tables PostgreSQL native monitoring statistics § pg_stat_activity view – One row per server process showing information related to the current activity of that process – Monitoring query connections, query processing status ( active/idle ), currently active query start time and wait events (locks/IOs etc) § pg_stat_statements view – One row for each distinct combination of database ID, user ID, query ID ( normalized query ) – The module tracks planning and execution statistics of all the SQL statements executed in the server • Identifying slow and top queries • Cumulative values – pg_stat_statements extension should be installed and registered in the database system.
  • 24. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Query Analysis § Slow Running Query Plan Logging – auto_explain module provides a means for Logging execution plans of slow statements without running EXPLAIN manually. – auto_explain.log_min_duration • Sets a minimum statement execution time, in milliseconds, that will cause the statement’s plan to be logged • Setting this to 0 logs all plans and -1 (the default) disables logging of plans. • auto_explain.log_analyze can be enabled with auto_explain.log_timing=off to print EXPLAIN ANALYZE output. – aurora_stat_plans function • pg_stat_statements.track : none, top(default), all § EXPLAIN – EXPLAIN command returns the query plan, which PostgreSQL chose, and help you understand what the query planner decides to execute a query. – The output of EXPLAIN has one line for each node in the plan tree. It shows node type and cost estimation for each node operation.
  • 25. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 AWS DATA & AI ROADSHOW 2024 • Finds database performance anomalies • Analyzes the anomaly • Highlights § Prevalent wait events § Prevalent SQL statements § Other anomalous metrics • Recommends next steps LOCKS 78% SELECT NAME FROM CUSTOMERS; SELECT ITEM FROM F; MEMORY What to do about locking issues . . . Amazon DevOps Guru for RDS
  • 26. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Common Performance monitoring use cases https://catalog.us-east-1.prod.workshops.aws/workshops/af784ecc-7ceb-4b86-8c7c-e03cbdbe4e0d/en-US • Low system memory due to query memory consumption • Impact of idle connections • High CPU due to run-away query • Vacuum not able to cleanup dead tuples
  • 27. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Low system memory due to query memory consumption § Problem – Our Aurora PostgreSQL writer instance memory is dropping rapidly with less than 10 connections. – This is an OLTP workload and we expect more users. – However we are concerned about running out of memory when more users login § Symptoms – Freeable memory dropped to below 5% within 10 minutes of workload startup – Number of database connections is less than 10
  • 28. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Monitoring from Performance Insight dashboard 1. Database Load 2. Metrics dashboard • Aurora PostgreSQL database health summary • CPU utilization • Free Memory • Connection utilization Low system memory due to query memory consumption BufferFileRead&Write wait event High wait CPU Low FreeableMemory Low # of Connections
  • 29. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Low system memory due to query memory consumption 1. Metrics dashboard 2. Custom dashboard 3. Add Widget • FreeableMemory under CloudWatch metrics • FreeableMemory size dropped to around 200MB from over 3G
  • 30. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Major memory consumers in PostgreSQL 1. Global shared memory for data cache 2. Query memory usage 3. Connection memory usage § Rule out 1 and 3 cases Low system memory due to query memory consumption SELECT name, setting, unit, boot_val, reset_val FROM pg_settings WHERE name in ( 'shared_buffers', 'work_mem', 'maintenance_work_mem', 'autovacuum_work_mem', 'logical_decoding_work_mem'); name | setting | unit | boot_val | reset_val ---------------------------+---------+------+----------+----------- autovacuum_work_mem | 499402 | kB | -1 | 499402 logical_decoding_work_mem | 65536 | kB | 65536 | 65536 maintenance_work_mem | 261120 | kB | 65536 | 261120 shared_buffers | 1309394 | 8kB | 16384 | 1309394 work_mem | 4096 | kB | 4096 | 4096 1 3
  • 31. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Review Query Memory usage using OS process list from Enhanced monitoring – RES displays the actual physical memory being used by the process. – 4 processes and its parallel work processes have high memory usages. § Check correlation between the process memory(RSS) and FreeableMemory usage from Performance Insight Metrics Custom dashboard Low system memory due to query memory consumption
  • 32. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Identify the top queries contributing the database load the most from Performance Insight Dimensions top SQL tab – The select statement has many block hit and temp writes per second with very high avg latency. – IPC:HashGrowBatchesAllocate and IPC:HashBuildHashOuter wait events are related to hash join and its memory allocation. – IO:BufFileRead and IO:BufFileWrite occur when PostgreSQL creates temporary files. Low system memory due to query memory consumption
  • 33. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Review query plan of the top SQL – This query has suboptimal plan due to outdated statistics on the tsmall table. Low system memory due to query memory consumption
  • 34. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Solutions – Stop query execution – Increase server memory – Query Optimization § The query is optimized after statistics update on the table with ANALYZE command § No more Freeable Memory drop Low system memory due to query memory consumption
  • 35. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Impact of idle connections § Problem – Our Aurora PostgreSQL is low on memory. We have a low volume, read-only workload running on the system. How can we find out what is consuming the memory ? § Symptoms – CloudWatch Freeable Memory metric is below 5%.
  • 36. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Monitoring from Performance Insight dashboard 1. Database Load 2. Metrics dashboard • Aurora PostgreSQL database health summary • CPU utilization • Free Memory • Connection utilization Impact of idle connections Hardly see Database load Very low Nice CPU usage Low FreeableMemory Very high # of Connections
  • 37. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Major memory consumers in PostgreSQL 1. Global shared memory for data cache 2. Query memory usage 3. Connection memory usage § Rule out 1 and 2 cases SELECT name, setting, unit, boot_val, reset_val FROM pg_settings WHERE name in ( 'shared_buffers', 'work_mem', 'maintenance_work_mem', 'autovacuum_work_mem', 'logical_decoding_work_mem'); name | setting | unit | boot_val | reset_val ---------------------------+---------+------+----------+----------- autovacuum_work_mem | 499402 | kB | -1 | 499402 logical_decoding_work_mem | 65536 | kB | 65536 | 65536 maintenance_work_mem | 261120 | kB | 65536 | 261120 shared_buffers | 1309394 | 8kB | 16384 | 1309394 work_mem | 4096 | kB | 4096 | 4096 1 2 Impact of idle connections
  • 38. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Impact of idle connections § Review connection memory usage from Performance Insight Metrics dashboard § Add widget from Custom dashboard • FreeableMemory CloudWatch metric and DB Resident Set Size(RSS) OS metric • User Max Connection Database metric and DatabaseConnections CloudWatch metric • Task Total, Tasks Sleeping, Tasks Running OS metrics 1000 database connections Almost 0 tasks.runnning
  • 39. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Impact of idle connections § Solutions – Client side Connection pooling – External Connection pooling such as PgBouncer, Pgpool-II, or RDS Proxy § RDS Proxy is deployed with the same workload – There is only slight Freeable Memory drop. – Aurora PostgreSQL can handle the same workload with 13 database connections. – The number of Tasks Running is < 1, which indicates connections are sitting in idle state most of time. There are opportunity to further reduce RDS Proxy connection pool size.
  • 40. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 High CPU due to run-away query § Problem – Our Aurora PostgreSQL database has been running fine until yesterday. Something happened today that drove the CPU usage to 100%. Everything takes much longer to run. Our production system is down because of that. What need help bringing things back to normal. § Symptoms – CPU Utilization total(Percent) metric is at 100 %.
  • 41. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Monitoring from Performance Insight dashboard 1. Database Load 2. Metrics dashboard • Aurora PostgreSQL database health summary • CPU utilization • Connection utilization High nice CPU usage Low # of Connections High CPU due to run-away query
  • 42. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § High nice CPU usage with 6 database connections § The most common reasons that can cause high CPU usage with PostgreSQL 1. High number of active connections 2. Inefficient or run-away query § Rule out 1 High CPU due to run-away query
  • 43. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Review query CPU usage using OS process list from Enhanced monitoring High CPU due to run-away query § Process id 22435 and its parallel worker processes consume 74.5% of the instance CPU. § Identify the SQL statement by querying pg_stat_activity dynamic statistics view
  • 44. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 High CPU due to run-away query § Solutions – Stop query execution – Increase available CPU – Query optimization § Cancel the SQL § CPU utilization goes back to normal.
  • 45. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § Problem – We have been seeing increasing query response time. • Frequent updates on the tables affected • autovacuum is enabled § Symptoms – Elevated query response time
  • 46. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 § Simulation of a long running transaction blocking vacuum from cleaning up dead tuples Vacuum not able to cleanup dead tuples user1 user2 2 x buffer cache hit increase Execution time increase
  • 47. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § The most common reasons that can increase query execution time 1. Change of query execution plan 2. Autovacuum is turned off 3. Table is bloated 4. Vacuum is blocked, and unable to cleanup dead tuples effectively • Long-running transactions • Abandon replication slots • Orphaned prepare transactions • Long-running transactions on read replica
  • 48. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § Review query plans – query plans of two runs are identical Query plan of Run #1 Query plan of Run #4
  • 49. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § Review global and table level autovacuum settings – No table level autovacuum configuration is set for pgbench_accounts table – Global configuration setting is used for the table
  • 50. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § Review table bloat – The n_live_tup and n_dead_tup indicate that half of the table is bloated. § Verify problem with vacuum cleaning up the dead tuples – 9,999,999 dead tuples are not able to be cleanup. – Any active long running transaction(s) that are accessing those tuples could prevent vacuum from cleaning the dead tuples.
  • 51. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § Identify vacuum blockers – Check any long running transactions – pid 28210 has a transaction opened, but not currently executing any commands. It is idle in transaction state. It has been running for over 40 minutes. – The SQL from user1 is the in the idle in transaction state.
  • 52. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § Identify vacuum blockers – Check for any abandon replication slots – Check for any orphaned prepare transactions – Check for any long running transactions on read replica
  • 53. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Vacuum not able to cleanup dead tuples § Solutions – End the long running transaction – Run vacuum verbose on table to manually cleanup dead tuples – For long term, follow the below practices to avoid future issues • Setup process for monitoring table bloat • Avoid long running transaction • Set idle_in_transaction_session_timeout § Manual vacuum after terminating the long running transaction
  • 54. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 Summary § Get used to Aurora PostgreSQL monitoring tools and PostgreSQL native statistics views – CloudWatch – Enhanced Monitoring and os process list – Performance insights and wait events – Top SQLs – Consolidated Metrics dashboard – pg_locks, pg_stat_user_tables, pg_statio_user_tables § Review database highest bottlenecks and related Top SQLs and metrics § List solutions based on the analysis on the monitoring information § Make a decision on the solution and apply it and verify the changes
  • 55. © 2024, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS DATA & AI ROADSHOW 2024 © 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you! Yun Cheol Ha yuncheol@amazon.com