WEBBOOK CHAPTER

PostgreSQL 18, 입문에서 시니어까지: 34장. Capacity 계산 실습

34장. Capacity 계산 실습

월간 주문 3천만 건, 행+TOAST 평균 420B, index 평균 310B, update WAL 1.8KB, 35% 여유, 보존 13개월을 가정한다. 데이터와 index만 계산하지 말고 WAL peak, temporary spill, vacuum headroom, replica, backup, restore workspace를 분리한다.


base/month = 30,000,000 × (420 + 310)B ≈ 21.9GB
13 months with 35% headroom ≈ 384GB
WAL/day at one update/order ≈ 54GB before compression/measurement

위 값은 구매 수치가 아니라 실측 가설이다. pg_column_size, relation/index size, WAL LSN 차이, daily growth, peak temp bytes로 보정한다. storage alarm은 잔여 퍼센트와 소진 예상 일수를 함께 본다.

connection capacity는 pod count × pool max 대신 steady/peak concurrency, query duration, pool wait으로 계산한다. DB max connection의 일부는 admin·migration·monitoring·incident 접속으로 남겨 둔다.