2. 데이터베이스 서버의 낮은 클라우드 스토리지 활용률
Database on Cloud
2
새로 개발되고 있는 데이터베이
스는 유연성, 확장성에만 초점
기존 데이터베이스는 클라우드
환경을 고려하지 않고 설계됨
* Mainstream DB: MySQL, MariaDB, PostgreSQL, MongoDB * New DB: Cockroach, YugaByte, TiDB, Vitess
14. 14
AppOS Internals
Virtual File
System
Page Cache
Block I/O
Context-aware
I/O Scheduler
Appos core API
I/O API
Postgres Context Classifier
POSIX file API
checkpointer
autovacuum
backend
…Cached Direct
Linux
15. 15
AppOS Internals
File Level Read/Write Lock
D D CDD C D
write
D DD D DD CC
I/O Level Range Lock
Linux page cache AppOS page cache
PostgreSQL shared buffer
readwrite
BLOCK!!!
AppOS uses range lock instead of big file lock
PostgreSQL shared buffer
readwrite
16. 16
AppOS Internals
AppOS
Page Cache
D C
Appos
I/O Scheduler Context-Aware I/O Sheduler
checkpointer: 200 shares
autovacuum: 200 shares
backend: 500 shares
writeback: 100 shares
Example:
D D
Linux kernel
backend
read
writeback
write
control
inflight I/Os
AppOS schedules I/Os based on context and congestion
21. Local SSD Caching
21
로컬 SSD 메모리 확장으로 활용
write
네트워크
스토리지
로컬 SSD
Write through
write ack
ack write
Write back
async
write
+ 데이터 안전
- 느린 쓰기
네트워크
스토리지
로컬 SSD
ack
+ 빠른 쓰기
- 데이터 손실
write
Flush on sync
async
write
네트워크
스토리지
로컬 SSD
ack
+ 데이터 안전
+ 빠른 쓰기
sync
flush
22. Local SSD Caching
22
로컬 SSD 메모리 확장으로 활용
NVMe
SSD
1000GB
(3000 iops)
300GB
(AWS 기준 월 $60)
기존 EBS 단일 구성 Apposha 로컬 SSD 솔루션
VS.EBS16 코어
64GB 메모리
1000GB
(3000 iops)
EBS16 코어
64GB 메모리
AppOS
네트워크 네트워크
23. Local SSD Caching
23
월 $60 추가로 AWS에서 5~13배 처리량 향상 가능
처리량 13배
62,0005,000 20,0003,800
처리량 5배
29. 29
TimescaleDB Performance
TimescaleDB 쿼리 시간 1/5 감소
Aggregate on across
both time and host,
giving the average of all
(10) CPU metrics per host
per hour for 24 hours