본문으로 건너뛰기
버전: In Development

성능 개요

aerospike-py (Rust/PyO3, native async)와 공식 aerospike Python client (C extension을 loop.run_in_executor로 래핑) 의 실측 벤치마크 결과. 이 저장소의 benchmark/ 에서 재현 가능합니다.

낮을수록 좋음, 높을수록 좋음, 🔥 50%+ 개선. 기본 테스트 조건: FastAPI + DLRM + Aerospike CE, k6 10 VUs × 60s.

누적 효과 — DLRM serving p95

단계p95원본 대비
원본 (공식 client + Python 3.11 + gather)324 msbaseline
+ aerospike-py로 교체189 ms−42%
+ gather(N) → 단일 batch_read(mixed keys)126 ms−61%
+ Python 3.14t free-threaded97 ms−70% 🔥 (3.3× 빠름)

권장 조치

#조치효과
1공식 client → aerospike-py로 교체p95 −42% (Python 3.11)
2런타임을 Python 3.14t free-threaded로 전환p95 −49% 추가, TPS +47% (Rust 변경 불필요)
3gather(N) → 단일 batch_read(mixed keys)p95 −33% (GIL 환경)
4AEROSPIKE_PY_INTERNAL_METRICS=1 상시 ONE2E 오버헤드 ≈ 0, 장애 시 stage 단위 즉시 attribution

환경별 요약 (Python 3.11 + GIL)

주변 스택이 얇을수록 격차가 큽니다. 다만 tail latency 우위는 실 serving에서도 유지됩니다.

환경aerospike-py vs 공식상세
A) 순수 DB client (HTTP·ML 없음)avg −80% (108→22 ms), TPS +171% (138→374) 🔥Benchmarks → A
B) uvicorn ASGI (FastAPI + DB)mean −21% (290→228 ms), TPS +17%Benchmarks → B
C) uvicorn + DLRM (실 serving)p95 −42% (324→189 ms), avg −19%Benchmarks → C

더 보기

로컬 재현은 benchmark/README.md 참조.