From 3b14f4a27e13d7edfa007854dcb3bd4124f683b6 Mon Sep 17 00:00:00 2001 From: LocKey Date: Mon, 3 Aug 2026 18:46:09 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20HikariCP=20=EC=B5=9C=EB=8C=80=20?= =?UTF-8?q?=EC=BB=A4=EB=84=A5=EC=85=98=20=EC=84=A4=EC=A0=95=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 2 ++ src/main/resources/application.yml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 8707629..14c2c26 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,6 +22,8 @@ services: CACHE_ENABLED: ${CACHE_ENABLED:-true} + DB_POOL_MAX_SIZE: ${DB_POOL_MAX_SIZE:-10} + depends_on: mysql: condition: service_healthy diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 3e21191..8626b6b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -14,6 +14,9 @@ spring: username: ${DB_USERNAME:url_shortener} password: ${DB_PASSWORD} + hikari: + maximum-pool-size: ${DB_POOL_MAX_SIZE:10} + jpa: hibernate: ddl-auto: update From 7086913486a94284bb93b46c0c5cf6cc80263a9e Mon Sep 17 00:00:00 2001 From: LocKey Date: Mon, 3 Aug 2026 18:46:18 +0900 Subject: [PATCH 2/2] =?UTF-8?q?test:=20HikariCP=20=ED=92=80=20=ED=81=AC?= =?UTF-8?q?=EA=B8=B0=20=EB=B9=84=EA=B5=90=20=EA=B2=B0=EA=B3=BC=20=EA=B8=B0?= =?UTF-8?q?=EB=A1=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/04-experiment.md | 162 +++++++++--- .../pool-10-100vu-1m.txt | 243 ++++++++++++++++++ .../pool-20-100vu-1m.txt | 243 ++++++++++++++++++ .../pool-5-100vu-1m.txt | 243 ++++++++++++++++++ 4 files changed, 859 insertions(+), 32 deletions(-) create mode 100644 results/hikari-pool-comparison/pool-10-100vu-1m.txt create mode 100644 results/hikari-pool-comparison/pool-20-100vu-1m.txt create mode 100644 results/hikari-pool-comparison/pool-5-100vu-1m.txt diff --git a/docs/04-experiment.md b/docs/04-experiment.md index 1fdceba..090c885 100644 --- a/docs/04-experiment.md +++ b/docs/04-experiment.md @@ -24,16 +24,34 @@ MySQL만 사용하는 초기 리다이렉트 구조에서 VU 증가에 따라 ## 4. 통제 변수 +### 공통 조건 + - 동일한 단축 URL 1개 반복 조회 - 애플리케이션 인스턴스 1개 - MySQL 인스턴스 1개 - Java 25 -- Platform Thread 사용 -- HikariCP 기본 설정 - Redirect 추적 비활성화 - Think Time 없음 - 조건별 테스트 시간 1분 +### Redis 비교 + +- Platform Thread 사용 +- HikariCP 최대 커넥션 10개 +- 캐시 활성화 여부만 변경 + +### Thread 비교 + +- DB Only +- HikariCP 최대 커넥션 10개 +- Platform Thread와 Virtual Thread만 변경 + +### HikariCP 비교 + +- DB Only +- Platform Thread +- HikariCP 최대 커넥션만 5, 10, 20으로 변경 + ## 5. 실험 환경 | 항목 | 값 | @@ -88,11 +106,14 @@ MySQL만 사용하는 초기 리다이렉트 구조에서 VU 증가에 따라 ### 서버 관점 -- CPU +- Process CPU - JVM Heap -- 활성 스레드 -- HikariCP 활성·대기 연결 +- Platform Thread 수 +- HikariCP Active·Pending - MySQL 조회량 +- Virtual Thread Mounted·Queued +- Carrier Pool Size +- Virtual Thread Pinning·제출 실패 CPU, JVM, HikariCP, DB Lookup 지표는 100 VU 비교 실험에서 기록했다. @@ -225,57 +246,134 @@ Redis 적용 후 모든 VU 구간에서 실패율 0%를 유지하면서 처리 100 VU 서버 지표에서 DB Only는 모든 요청마다 MySQL을 조회했다. HikariCP의 10개 커넥션이 모두 사용됐고 최대 약 85개의 요청이 커넥션을 기다렸다. -Redis 적용 후에는 최초 1회를 제외한 요청이 Cache Hit로 처리됐다. -DB 조회와 커넥션 대기가 제거되면서 응답 지연이 감소하고 처리량이 증가했다. +Redis 적용 후에는 최초 1회를 제외한 요청이 Cache Hit로 처리됐다. +반복적인 DB 조회가 사실상 제거됐으며, +Prometheus 수집 시점에서는 HikariCP 연결 사용과 대기가 관찰되지 않았다. +이에 따라 응답 지연이 감소하고 처리량이 증가했다. 따라서 반복 조회가 많은 리다이렉트 경로에서는 Redis Cache Aside가 DB 접근과 커넥션 풀 병목을 줄이는 데 효과적이었다. ## 13. Platform Thread와 Virtual Thread 비교 -Redis 적용 실험 이후 동일한 조건으로 비교한다. +DB Only, HikariCP 최대 커넥션 10개, 100 VU, 1분 조건에서 +스레드 방식만 변경해 비교했다. -### 실험 A +| 지표 | Platform Thread | Virtual Thread | +|---|---:|---:| +| 요청 수 | 337,498 | 238,090 | +| RPS | 5,576.15 | 3,942.58 | +| 평균 응답 시간 | 17.56ms | 25.04ms | +| p95 | 50.24ms | 56.39ms | +| p99 | 105.40ms | 152.11ms | +| 최대 응답 시간 | 1.07s | 1.28s | +| Process CPU 최대 | 약 90% | 약 62% | +| Platform Live Threads 최대 | 약 121 | 약 34 | +| HikariCP Active 최대 | 10 | 10 | +| HikariCP Pending 최대 | 약 85 | 약 87 | +| 오류율 | 0% | 0% | + +Virtual Thread 적용 후 Platform Thread 수와 Process CPU 사용량은 감소했다. + +하지만 RPS는 감소했고 평균, p95, p99 응답 시간은 증가했다. +두 방식 모두 HikariCP 최대 커넥션 10개를 사용했으며, +약 80개 이상의 요청이 DB 커넥션을 기다렸다. + +따라서 이번 조건에서는 Virtual Thread만으로 처리량이 개선되지 않았고, +DB 커넥션 풀이 주요 제한 요소로 남았다. + +다만 조건별 한 번만 측정했으므로 +Virtual Thread가 항상 Platform Thread보다 느리다고 일반화할 수는 없다. + +### Virtual Thread 실행 지표 + +| 지표 | 결과 | +|---|---:| +| Mounted 관찰 최대 | 약 8 | +| Queued 관찰 최대 | 약 9 | +| Carrier Pool Size 최대 | 8 | +| Target Parallelism | 8 | +| Pinned Events | 0 | +| Submit Failed | 0 | + +Virtual Thread는 최대 8개의 Carrier Thread 위에서 실행됐다. +부하 테스트 중 Carrier Thread를 점유한 채 대기하는 Pinning과 +Virtual Thread 제출 실패는 발생하지 않았다. -```text -Java 25 + Platform Thread -VIRTUAL_THREADS_ENABLED=false -``` +#### Grafana 측정 결과 -### 실험 B +**Platform Thread** -```text -Java 25 + Virtual Thread -VIRTUAL_THREADS_ENABLED=true -``` +![Platform Thread 100 VU 성능 지표](images/platform-thread-100vu-performance.png) -| 지표 | Platform Thread | Virtual Thread | -|---|---:|---:| -| RPS | 미측정 | 미측정 | -| p95 | 미측정 | 미측정 | -| p99 | 미측정 | 미측정 | -| CPU | 미측정 | 미측정 | -| 활성 스레드 | 미측정 | 미측정 | -| DB Pool 대기 | 미측정 | 미측정 | -| 오류율 | 미측정 | 미측정 | +![Platform Thread 100 VU DB 및 커넥션 풀 지표](images/platform-thread-100vu-db-pool.png) + +**Virtual Thread** + +![Virtual Thread 100 VU 성능 지표](images/virtual-thread-100vu-performance.png) + +![Virtual Thread 100 VU DB 및 커넥션 풀 지표](images/virtual-thread-100vu-db-pool.png) + +![Virtual Thread 실행 지표](images/virtual-thread-100vu-metrics.png) + +## 14. HikariCP Pool 크기 비교 + +Thread 비교에서 HikariCP Active가 최대 커넥션 10개에 도달하고 +Pending 요청이 발생했다. + +커넥션 풀 크기가 실제 처리량과 응답 시간에 미치는 영향을 확인하기 위해 +DB Only, Platform Thread, 100 VU, 1분 조건에서 +최대 커넥션 수만 5, 10, 20으로 변경했다. + +| 지표 | Pool 5 | Pool 10 | Pool 20 | +|---|---:|---:|---:| +| 요청 수 | 341,196 | 466,563 | 438,566 | +| RPS | 5,670.37 | 7,753.05 | 7,288.71 | +| 평균 응답 시간 | 17.47ms | 12.66ms | 13.49ms | +| p95 | 51.37ms | 36.01ms | 38.87ms | +| p99 | 99.99ms | 74.36ms | 70.45ms | +| 최대 응답 시간 | 830.87ms | 598.46ms | 335.53ms | +| 오류율 | 0% | 0% | 0% | + +Pool 5에서 Pool 10으로 증가했을 때 처리량이 증가하고 +평균, p95, p99 응답 시간이 모두 감소했다. +Pool 5는 100개의 동시 요청을 처리하기에 커넥션 수가 부족했던 것으로 보인다. + +반면 Pool 20은 Pool 10보다 p99와 최대 응답 시간은 감소했지만, +RPS가 낮아지고 평균과 p95가 증가했다. + +이번 단일 실행에서는 Pool 10이 처리량과 일반적인 응답 지연 측면에서 +가장 균형 있는 결과를 보였다. +커넥션 수를 늘린다고 성능이 계속 향상되는 것은 아니며, +동시에 실행되는 쿼리 증가에 따른 DB 경합과 로컬 실행 환경의 변동도 +함께 고려해야 한다. + +Pool 20 실험에서는 k6 iterations와 DB Lookup이 모두 438,566건으로 일치했다. +Cache Hit과 Cache Miss는 모두 0건이므로 +모든 리다이렉트 요청이 MySQL 조회로 처리됐음을 확인했다. + +> 조건별 한 번만 실행한 결과이므로 Pool 10을 최적값으로 확정할 수는 없다. +> 정확한 최적값을 결정하려면 조건별 반복 측정과 MySQL 서버 지표가 필요하다. -## 14. 실험 한계 +## 15. 실험 한계 - 로컬 Docker 환경에서 실행했다. - k6, 애플리케이션, MySQL, Redis가 같은 장비의 자원을 사용했다. -- 조건별 테스트를 한 번씩만 수행했다. +- 조건별 한 번만 측정해 실행 환경의 변동이 포함될 수 있다. - 테스트 시간이 조건별 1분으로 짧다. - 하나의 단축 URL만 반복 조회했다. -- Prometheus 수집 간격 사이의 짧은 HikariCP 사용은 그래프에서 누락될 수 있다. +- Prometheus 수집 간격 사이의 짧은 지표 변화는 누락될 수 있다. - 고정 VU 방식이므로 응답 시간이 짧을수록 같은 시간에 더 많은 요청을 전송한다. +- HikariCP Pool 비교에서 MySQL CPU, 실행 중인 쿼리 수, 락 대기까지는 측정하지 않았다. -## 15. 후속 실험 +## 16. 후속 실험 - [x] Redis Cache Aside 적용 - [x] Redis 적용 전후 부하 테스트 - [x] Prometheus·Grafana 서버 지표 비교 - [x] 캐시 ON/OFF 환경변수 적용 +- [x] Platform Thread와 Virtual Thread 비교 +- [x] HikariCP Pool 크기 비교 - [ ] 조건별 3회 측정 후 중앙값 비교 -- [ ] Platform Thread와 Virtual Thread 비교 - [ ] 더 높은 VU로 Stress Test 수행 - [ ] 단축 코드 생성 전략 비교 - Sequence ID + Base62 diff --git a/results/hikari-pool-comparison/pool-10-100vu-1m.txt b/results/hikari-pool-comparison/pool-10-100vu-1m.txt new file mode 100644 index 0000000..2601307 --- /dev/null +++ b/results/hikari-pool-comparison/pool-10-100vu-1m.txt @@ -0,0 +1,243 @@ + + /\ Grafana /‾‾/ + /\ / \ |\ __ / / + / \/ \ | |/ / / ‾‾\ + / \ | ( | (‾) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: /scripts/db-only-redirect.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m30s max duration (incl. graceful stop): + * default: 100 looping VUs for 1m0s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 572 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 0m00.8s/1m0s + +running (0m02.0s), 100/100 VUs, 1508 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 0m01.8s/1m0s + +running (0m03.0s), 100/100 VUs, 2625 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 0m02.8s/1m0s + +running (0m04.0s), 100/100 VUs, 3800 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 0m03.8s/1m0s + +running (0m05.0s), 100/100 VUs, 5454 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 0m04.8s/1m0s + +running (0m06.0s), 100/100 VUs, 7817 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 0m05.8s/1m0s + +running (0m07.0s), 100/100 VUs, 9376 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 0m06.8s/1m0s + +running (0m08.0s), 100/100 VUs, 12394 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 0m07.8s/1m0s + +running (0m09.0s), 100/100 VUs, 16532 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 0m08.8s/1m0s + +running (0m10.0s), 100/100 VUs, 21174 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 0m09.8s/1m0s + +running (0m11.0s), 100/100 VUs, 25778 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 0m10.8s/1m0s + +running (0m12.0s), 100/100 VUs, 29777 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 0m11.8s/1m0s + +running (0m13.0s), 100/100 VUs, 34528 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 0m12.8s/1m0s + +running (0m14.0s), 100/100 VUs, 40321 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 0m13.8s/1m0s + +running (0m15.0s), 100/100 VUs, 46572 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 0m14.8s/1m0s + +running (0m16.0s), 100/100 VUs, 53890 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 0m15.8s/1m0s + +running (0m17.0s), 100/100 VUs, 62000 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 0m16.8s/1m0s + +running (0m18.0s), 100/100 VUs, 70974 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 0m17.8s/1m0s + +running (0m19.0s), 100/100 VUs, 80175 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 0m18.8s/1m0s + +running (0m20.0s), 100/100 VUs, 89569 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 0m19.8s/1m0s + +running (0m21.0s), 100/100 VUs, 98866 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 0m20.8s/1m0s + +running (0m22.0s), 100/100 VUs, 107462 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 0m21.8s/1m0s + +running (0m23.0s), 100/100 VUs, 116563 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 0m22.8s/1m0s + +running (0m24.0s), 100/100 VUs, 125996 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 0m23.8s/1m0s + +running (0m25.0s), 100/100 VUs, 135517 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 0m24.8s/1m0s + +running (0m26.0s), 100/100 VUs, 144870 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 0m25.8s/1m0s + +running (0m27.0s), 100/100 VUs, 153475 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 0m26.8s/1m0s + +running (0m28.0s), 100/100 VUs, 162717 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 0m27.8s/1m0s + +running (0m29.0s), 100/100 VUs, 172124 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 0m28.8s/1m0s + +running (0m30.0s), 100/100 VUs, 181652 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 0m29.8s/1m0s + +running (0m31.0s), 100/100 VUs, 191203 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 0m30.8s/1m0s + +running (0m32.0s), 100/100 VUs, 200059 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 0m31.8s/1m0s + +running (0m33.0s), 100/100 VUs, 209190 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 0m32.8s/1m0s + +running (0m34.0s), 100/100 VUs, 218782 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 0m33.8s/1m0s + +running (0m35.0s), 100/100 VUs, 228319 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 0m34.8s/1m0s + +running (0m36.0s), 100/100 VUs, 237552 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 0m35.8s/1m0s + +running (0m37.0s), 100/100 VUs, 246267 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 0m36.8s/1m0s + +running (0m38.0s), 100/100 VUs, 255736 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 0m37.8s/1m0s + +running (0m39.0s), 100/100 VUs, 265311 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 0m38.8s/1m0s + +running (0m40.0s), 100/100 VUs, 274873 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 0m39.8s/1m0s + +running (0m41.0s), 100/100 VUs, 284635 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 0m40.8s/1m0s + +running (0m42.0s), 100/100 VUs, 293566 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 0m41.8s/1m0s + +running (0m43.0s), 100/100 VUs, 302956 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 0m42.8s/1m0s + +running (0m44.0s), 100/100 VUs, 312677 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 0m43.8s/1m0s + +running (0m45.0s), 100/100 VUs, 322385 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 0m44.8s/1m0s + +running (0m46.0s), 100/100 VUs, 332040 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 0m45.8s/1m0s + +running (0m47.0s), 100/100 VUs, 340967 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 0m46.8s/1m0s + +running (0m48.0s), 100/100 VUs, 350390 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 0m47.8s/1m0s + +running (0m49.0s), 100/100 VUs, 359879 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 0m48.8s/1m0s + +running (0m50.0s), 100/100 VUs, 369591 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 0m49.8s/1m0s + +running (0m51.0s), 100/100 VUs, 379267 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 0m50.8s/1m0s + +running (0m52.0s), 100/100 VUs, 388545 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 0m51.8s/1m0s + +running (0m53.0s), 100/100 VUs, 398115 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 0m52.8s/1m0s + +running (0m54.0s), 100/100 VUs, 407711 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 0m53.8s/1m0s + +running (0m55.0s), 100/100 VUs, 417415 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 0m54.8s/1m0s + +running (0m56.0s), 100/100 VUs, 427077 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 0m55.8s/1m0s + +running (0m57.0s), 100/100 VUs, 436099 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 0m56.8s/1m0s + +running (0m58.0s), 100/100 VUs, 445765 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 0m57.8s/1m0s + +running (0m59.0s), 100/100 VUs, 455119 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 0m58.8s/1m0s + +running (1m00.0s), 100/100 VUs, 464801 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 0m59.8s/1m0s + + + █ THRESHOLDS + + checks + ✓ 'rate>0.99' rate=100.00% + + http_req_duration{endpoint:redirect} + ✓ 'p(95)<500' p(95)=36.01ms + + http_req_failed + ✓ 'rate<0.01' rate=0.00% + + + █ TOTAL RESULTS + + checks_total.......: 1399691 23259.190453/s + checks_succeeded...: 100.00% 1399691 out of 1399691 + checks_failed......: 0.00% 0 out of 1399691 + + ✓ 단축 URL 생성 상태는 201이다 + ✓ shortCode가 반환된다 + ✓ 리다이렉트 상태는 302이다 + ✓ Location 헤더가 존재한다 + ✓ 원본 URL이 올바르다 + + HTTP + http_req_duration..............: avg=12.66ms min=468.2µs med=8.93ms p(90)=27.18ms p(95)=36.01ms p(99)=74.36ms max=598.46ms + { endpoint:redirect }........: avg=12.66ms min=468.2µs med=8.93ms p(90)=27.18ms p(95)=36.01ms p(99)=74.34ms max=598.46ms + { expected_response:true }...: avg=12.66ms min=468.2µs med=8.93ms p(90)=27.18ms p(95)=36.01ms p(99)=74.36ms max=598.46ms + http_req_failed................: 0.00% 0 out of 466564 + http_reqs......................: 466564 7753.069023/s + + EXECUTION + iteration_duration.............: avg=12.84ms min=526.5µs med=9.1ms p(90)=27.36ms p(95)=36.19ms p(99)=74.64ms max=598.61ms + iterations.....................: 466563 7753.052406/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 50 MB 831 kB/s + data_sent......................: 34 MB 558 kB/s + + + + +running (1m00.2s), 000/100 VUs, 466563 complete and 0 interrupted iterations +default ✓ [ 100% ] 100 VUs 1m0s diff --git a/results/hikari-pool-comparison/pool-20-100vu-1m.txt b/results/hikari-pool-comparison/pool-20-100vu-1m.txt new file mode 100644 index 0000000..4106bba --- /dev/null +++ b/results/hikari-pool-comparison/pool-20-100vu-1m.txt @@ -0,0 +1,243 @@ + + /\ Grafana /‾‾/ + /\ / \ |\ __ / / + / \/ \ | |/ / / ‾‾\ + / \ | ( | (‾) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: /scripts/db-only-redirect.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m30s max duration (incl. graceful stop): + * default: 100 looping VUs for 1m0s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 831 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 0m00.8s/1m0s + +running (0m02.0s), 100/100 VUs, 2422 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 0m01.8s/1m0s + +running (0m03.0s), 100/100 VUs, 4446 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 0m02.8s/1m0s + +running (0m04.0s), 100/100 VUs, 6605 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 0m03.8s/1m0s + +running (0m05.0s), 100/100 VUs, 9114 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 0m04.8s/1m0s + +running (0m06.0s), 100/100 VUs, 11694 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 0m05.8s/1m0s + +running (0m07.0s), 100/100 VUs, 15498 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 0m06.8s/1m0s + +running (0m08.0s), 100/100 VUs, 19680 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 0m07.8s/1m0s + +running (0m09.0s), 100/100 VUs, 23922 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 0m08.8s/1m0s + +running (0m10.0s), 100/100 VUs, 28713 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 0m09.8s/1m0s + +running (0m11.0s), 100/100 VUs, 32978 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 0m10.8s/1m0s + +running (0m12.0s), 100/100 VUs, 37989 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 0m11.8s/1m0s + +running (0m13.0s), 100/100 VUs, 42496 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 0m12.8s/1m0s + +running (0m14.0s), 100/100 VUs, 47315 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 0m13.8s/1m0s + +running (0m15.0s), 100/100 VUs, 52495 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 0m14.8s/1m0s + +running (0m16.0s), 100/100 VUs, 57324 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 0m15.8s/1m0s + +running (0m17.0s), 100/100 VUs, 62799 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 0m16.8s/1m0s + +running (0m18.0s), 100/100 VUs, 68507 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 0m17.8s/1m0s + +running (0m19.0s), 100/100 VUs, 74159 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 0m18.8s/1m0s + +running (0m20.0s), 100/100 VUs, 80771 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 0m19.8s/1m0s + +running (0m21.0s), 100/100 VUs, 86868 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 0m20.8s/1m0s + +running (0m22.0s), 100/100 VUs, 93457 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 0m21.8s/1m0s + +running (0m23.0s), 100/100 VUs, 100231 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 0m22.8s/1m0s + +running (0m24.0s), 100/100 VUs, 107323 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 0m23.8s/1m0s + +running (0m25.0s), 100/100 VUs, 114179 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 0m24.8s/1m0s + +running (0m26.0s), 100/100 VUs, 120023 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 0m25.8s/1m0s + +running (0m27.0s), 100/100 VUs, 127174 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 0m26.8s/1m0s + +running (0m28.0s), 100/100 VUs, 135139 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 0m27.8s/1m0s + +running (0m29.0s), 100/100 VUs, 144390 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 0m28.8s/1m0s + +running (0m30.0s), 100/100 VUs, 154099 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 0m29.8s/1m0s + +running (0m31.0s), 100/100 VUs, 162872 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 0m30.8s/1m0s + +running (0m32.0s), 100/100 VUs, 172151 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 0m31.8s/1m0s + +running (0m33.0s), 100/100 VUs, 181728 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 0m32.8s/1m0s + +running (0m34.0s), 100/100 VUs, 191401 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 0m33.8s/1m0s + +running (0m35.0s), 100/100 VUs, 200907 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 0m34.8s/1m0s + +running (0m36.0s), 100/100 VUs, 209427 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 0m35.8s/1m0s + +running (0m37.0s), 100/100 VUs, 219035 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 0m36.8s/1m0s + +running (0m38.0s), 100/100 VUs, 228721 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 0m37.8s/1m0s + +running (0m39.0s), 100/100 VUs, 237965 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 0m38.8s/1m0s + +running (0m40.0s), 100/100 VUs, 247758 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 0m39.8s/1m0s + +running (0m41.0s), 100/100 VUs, 256765 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 0m40.8s/1m0s + +running (0m42.0s), 100/100 VUs, 266231 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 0m41.8s/1m0s + +running (0m43.0s), 100/100 VUs, 275756 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 0m42.8s/1m0s + +running (0m44.0s), 100/100 VUs, 285471 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 0m43.8s/1m0s + +running (0m45.0s), 100/100 VUs, 294965 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 0m44.8s/1m0s + +running (0m46.0s), 100/100 VUs, 303684 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 0m45.8s/1m0s + +running (0m47.0s), 100/100 VUs, 313161 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 0m46.8s/1m0s + +running (0m48.0s), 100/100 VUs, 322623 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 0m47.8s/1m0s + +running (0m49.0s), 100/100 VUs, 331895 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 0m48.8s/1m0s + +running (0m50.0s), 100/100 VUs, 341642 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 0m49.8s/1m0s + +running (0m51.0s), 100/100 VUs, 350437 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 0m50.8s/1m0s + +running (0m52.0s), 100/100 VUs, 360234 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 0m51.8s/1m0s + +running (0m53.0s), 100/100 VUs, 369858 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 0m52.8s/1m0s + +running (0m54.0s), 100/100 VUs, 379729 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 0m53.8s/1m0s + +running (0m55.0s), 100/100 VUs, 389536 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 0m54.8s/1m0s + +running (0m56.0s), 100/100 VUs, 398786 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 0m55.8s/1m0s + +running (0m57.0s), 100/100 VUs, 408058 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 0m56.8s/1m0s + +running (0m58.0s), 100/100 VUs, 417774 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 0m57.8s/1m0s + +running (0m59.0s), 100/100 VUs, 427383 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 0m58.8s/1m0s + +running (1m00.0s), 100/100 VUs, 436948 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 0m59.8s/1m0s + + + █ THRESHOLDS + + checks + ✓ 'rate>0.99' rate=100.00% + + http_req_duration{endpoint:redirect} + ✓ 'p(95)<500' p(95)=38.87ms + + http_req_failed + ✓ 'rate<0.01' rate=0.00% + + + █ TOTAL RESULTS + + checks_total.......: 1315700 21866.163896/s + checks_succeeded...: 100.00% 1315700 out of 1315700 + checks_failed......: 0.00% 0 out of 1315700 + + ✓ 단축 URL 생성 상태는 201이다 + ✓ shortCode가 반환된다 + ✓ 리다이렉트 상태는 302이다 + ✓ Location 헤더가 존재한다 + ✓ 원본 URL이 올바르다 + + HTTP + http_req_duration..............: avg=13.49ms min=505.04µs med=8.49ms p(90)=29.52ms p(95)=38.87ms p(99)=70.45ms max=335.53ms + { endpoint:redirect }........: avg=13.49ms min=505.04µs med=8.49ms p(90)=29.52ms p(95)=38.87ms p(99)=70.44ms max=335.53ms + { expected_response:true }...: avg=13.49ms min=505.04µs med=8.49ms p(90)=29.52ms p(95)=38.87ms p(99)=70.45ms max=335.53ms + http_req_failed................: 0.00% 0 out of 438567 + http_reqs......................: 438567 7288.726839/s + + EXECUTION + iteration_duration.............: avg=13.66ms min=554.54µs med=8.68ms p(90)=29.7ms p(95)=39.03ms p(99)=70.6ms max=335.6ms + iterations.....................: 438566 7288.710219/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 47 MB 781 kB/s + data_sent......................: 32 MB 525 kB/s + + + + +running (1m00.2s), 000/100 VUs, 438566 complete and 0 interrupted iterations +default ✓ [ 100% ] 100 VUs 1m0s diff --git a/results/hikari-pool-comparison/pool-5-100vu-1m.txt b/results/hikari-pool-comparison/pool-5-100vu-1m.txt new file mode 100644 index 0000000..4880477 --- /dev/null +++ b/results/hikari-pool-comparison/pool-5-100vu-1m.txt @@ -0,0 +1,243 @@ + + /\ Grafana /‾‾/ + /\ / \ |\ __ / / + / \/ \ | |/ / / ‾‾\ + / \ | ( | (‾) | + / __________ \ |_|\_\ \_____/ + + + execution: local + script: /scripts/db-only-redirect.js + output: - + + scenarios: (100.00%) 1 scenario, 100 max VUs, 1m30s max duration (incl. graceful stop): + * default: 100 looping VUs for 1m0s (gracefulStop: 30s) + + +running (0m01.0s), 100/100 VUs, 626 complete and 0 interrupted iterations +default [ 1% ] 100 VUs 0m00.8s/1m0s + +running (0m02.0s), 100/100 VUs, 1234 complete and 0 interrupted iterations +default [ 3% ] 100 VUs 0m01.8s/1m0s + +running (0m03.0s), 100/100 VUs, 1969 complete and 0 interrupted iterations +default [ 5% ] 100 VUs 0m02.8s/1m0s + +running (0m04.0s), 100/100 VUs, 3114 complete and 0 interrupted iterations +default [ 6% ] 100 VUs 0m03.8s/1m0s + +running (0m05.0s), 100/100 VUs, 5727 complete and 0 interrupted iterations +default [ 8% ] 100 VUs 0m04.8s/1m0s + +running (0m06.0s), 100/100 VUs, 8519 complete and 0 interrupted iterations +default [ 10% ] 100 VUs 0m05.8s/1m0s + +running (0m07.0s), 100/100 VUs, 11062 complete and 0 interrupted iterations +default [ 11% ] 100 VUs 0m06.8s/1m0s + +running (0m08.0s), 100/100 VUs, 13958 complete and 0 interrupted iterations +default [ 13% ] 100 VUs 0m07.8s/1m0s + +running (0m09.0s), 100/100 VUs, 16724 complete and 0 interrupted iterations +default [ 15% ] 100 VUs 0m08.8s/1m0s + +running (0m10.0s), 100/100 VUs, 19234 complete and 0 interrupted iterations +default [ 16% ] 100 VUs 0m09.8s/1m0s + +running (0m11.0s), 100/100 VUs, 21770 complete and 0 interrupted iterations +default [ 18% ] 100 VUs 0m10.8s/1m0s + +running (0m12.0s), 100/100 VUs, 25887 complete and 0 interrupted iterations +default [ 20% ] 100 VUs 0m11.8s/1m0s + +running (0m13.0s), 100/100 VUs, 31287 complete and 0 interrupted iterations +default [ 21% ] 100 VUs 0m12.8s/1m0s + +running (0m14.0s), 100/100 VUs, 35236 complete and 0 interrupted iterations +default [ 23% ] 100 VUs 0m13.8s/1m0s + +running (0m15.0s), 100/100 VUs, 38854 complete and 0 interrupted iterations +default [ 25% ] 100 VUs 0m14.8s/1m0s + +running (0m16.0s), 100/100 VUs, 42779 complete and 0 interrupted iterations +default [ 26% ] 100 VUs 0m15.8s/1m0s + +running (0m17.0s), 100/100 VUs, 47441 complete and 0 interrupted iterations +default [ 28% ] 100 VUs 0m16.8s/1m0s + +running (0m18.0s), 100/100 VUs, 53762 complete and 0 interrupted iterations +default [ 30% ] 100 VUs 0m17.8s/1m0s + +running (0m19.0s), 100/100 VUs, 60718 complete and 0 interrupted iterations +default [ 31% ] 100 VUs 0m18.8s/1m0s + +running (0m20.0s), 100/100 VUs, 67294 complete and 0 interrupted iterations +default [ 33% ] 100 VUs 0m19.8s/1m0s + +running (0m21.0s), 100/100 VUs, 72499 complete and 0 interrupted iterations +default [ 35% ] 100 VUs 0m20.8s/1m0s + +running (0m22.0s), 100/100 VUs, 78627 complete and 0 interrupted iterations +default [ 36% ] 100 VUs 0m21.8s/1m0s + +running (0m23.0s), 100/100 VUs, 82559 complete and 0 interrupted iterations +default [ 38% ] 100 VUs 0m22.8s/1m0s + +running (0m24.0s), 100/100 VUs, 87566 complete and 0 interrupted iterations +default [ 40% ] 100 VUs 0m23.8s/1m0s + +running (0m25.0s), 100/100 VUs, 93664 complete and 0 interrupted iterations +default [ 41% ] 100 VUs 0m24.8s/1m0s + +running (0m26.0s), 100/100 VUs, 98263 complete and 0 interrupted iterations +default [ 43% ] 100 VUs 0m25.8s/1m0s + +running (0m27.0s), 100/100 VUs, 104543 complete and 0 interrupted iterations +default [ 45% ] 100 VUs 0m26.8s/1m0s + +running (0m28.0s), 100/100 VUs, 110537 complete and 0 interrupted iterations +default [ 46% ] 100 VUs 0m27.8s/1m0s + +running (0m29.0s), 100/100 VUs, 117197 complete and 0 interrupted iterations +default [ 48% ] 100 VUs 0m28.8s/1m0s + +running (0m30.0s), 100/100 VUs, 124158 complete and 0 interrupted iterations +default [ 50% ] 100 VUs 0m29.8s/1m0s + +running (0m31.0s), 100/100 VUs, 131130 complete and 0 interrupted iterations +default [ 51% ] 100 VUs 0m30.8s/1m0s + +running (0m32.0s), 100/100 VUs, 137969 complete and 0 interrupted iterations +default [ 53% ] 100 VUs 0m31.8s/1m0s + +running (0m33.0s), 100/100 VUs, 144442 complete and 0 interrupted iterations +default [ 55% ] 100 VUs 0m32.8s/1m0s + +running (0m34.0s), 100/100 VUs, 151518 complete and 0 interrupted iterations +default [ 56% ] 100 VUs 0m33.8s/1m0s + +running (0m35.0s), 100/100 VUs, 158681 complete and 0 interrupted iterations +default [ 58% ] 100 VUs 0m34.8s/1m0s + +running (0m36.0s), 100/100 VUs, 165982 complete and 0 interrupted iterations +default [ 60% ] 100 VUs 0m35.8s/1m0s + +running (0m37.0s), 100/100 VUs, 173165 complete and 0 interrupted iterations +default [ 61% ] 100 VUs 0m36.8s/1m0s + +running (0m38.0s), 100/100 VUs, 179715 complete and 0 interrupted iterations +default [ 63% ] 100 VUs 0m37.8s/1m0s + +running (0m39.0s), 100/100 VUs, 185935 complete and 0 interrupted iterations +default [ 65% ] 100 VUs 0m38.8s/1m0s + +running (0m40.0s), 100/100 VUs, 193221 complete and 0 interrupted iterations +default [ 66% ] 100 VUs 0m39.8s/1m0s + +running (0m41.0s), 100/100 VUs, 200406 complete and 0 interrupted iterations +default [ 68% ] 100 VUs 0m40.8s/1m0s + +running (0m42.0s), 100/100 VUs, 207677 complete and 0 interrupted iterations +default [ 70% ] 100 VUs 0m41.8s/1m0s + +running (0m43.0s), 100/100 VUs, 214078 complete and 0 interrupted iterations +default [ 71% ] 100 VUs 0m42.8s/1m0s + +running (0m44.0s), 100/100 VUs, 221440 complete and 0 interrupted iterations +default [ 73% ] 100 VUs 0m43.8s/1m0s + +running (0m45.0s), 100/100 VUs, 228751 complete and 0 interrupted iterations +default [ 75% ] 100 VUs 0m44.8s/1m0s + +running (0m46.0s), 100/100 VUs, 236298 complete and 0 interrupted iterations +default [ 76% ] 100 VUs 0m45.8s/1m0s + +running (0m47.0s), 100/100 VUs, 243727 complete and 0 interrupted iterations +default [ 78% ] 100 VUs 0m46.8s/1m0s + +running (0m48.0s), 100/100 VUs, 250722 complete and 0 interrupted iterations +default [ 80% ] 100 VUs 0m47.8s/1m0s + +running (0m49.0s), 100/100 VUs, 258166 complete and 0 interrupted iterations +default [ 81% ] 100 VUs 0m48.8s/1m0s + +running (0m50.0s), 100/100 VUs, 265877 complete and 0 interrupted iterations +default [ 83% ] 100 VUs 0m49.8s/1m0s + +running (0m51.0s), 100/100 VUs, 273395 complete and 0 interrupted iterations +default [ 85% ] 100 VUs 0m50.8s/1m0s + +running (0m52.0s), 100/100 VUs, 280713 complete and 0 interrupted iterations +default [ 86% ] 100 VUs 0m51.8s/1m0s + +running (0m53.0s), 100/100 VUs, 287873 complete and 0 interrupted iterations +default [ 88% ] 100 VUs 0m52.8s/1m0s + +running (0m54.0s), 100/100 VUs, 295376 complete and 0 interrupted iterations +default [ 90% ] 100 VUs 0m53.8s/1m0s + +running (0m55.0s), 100/100 VUs, 303020 complete and 0 interrupted iterations +default [ 91% ] 100 VUs 0m54.8s/1m0s + +running (0m56.0s), 100/100 VUs, 310440 complete and 0 interrupted iterations +default [ 93% ] 100 VUs 0m55.8s/1m0s + +running (0m57.0s), 100/100 VUs, 317919 complete and 0 interrupted iterations +default [ 95% ] 100 VUs 0m56.8s/1m0s + +running (0m58.0s), 100/100 VUs, 325064 complete and 0 interrupted iterations +default [ 96% ] 100 VUs 0m57.8s/1m0s + +running (0m59.0s), 100/100 VUs, 332446 complete and 0 interrupted iterations +default [ 98% ] 100 VUs 0m58.8s/1m0s + +running (1m00.0s), 100/100 VUs, 339919 complete and 0 interrupted iterations +default [ 100% ] 100 VUs 0m59.8s/1m0s + + + █ THRESHOLDS + + checks + ✓ 'rate>0.99' rate=100.00% + + http_req_duration{endpoint:redirect} + ✓ 'p(95)<500' p(95)=51.37ms + + http_req_failed + ✓ 'rate<0.01' rate=0.00% + + + █ TOTAL RESULTS + + checks_total.......: 1023590 17011.144343/s + checks_succeeded...: 100.00% 1023590 out of 1023590 + checks_failed......: 0.00% 0 out of 1023590 + + ✓ 단축 URL 생성 상태는 201이다 + ✓ shortCode가 반환된다 + ✓ 리다이렉트 상태는 302이다 + ✓ Location 헤더가 존재한다 + ✓ 원본 URL이 올바르다 + + HTTP + http_req_duration..............: avg=17.47ms min=417.04µs med=13.29ms p(90)=37.8ms p(95)=51.37ms p(99)=99.99ms max=830.87ms + { endpoint:redirect }........: avg=17.47ms min=417.04µs med=13.29ms p(90)=37.8ms p(95)=51.37ms p(99)=99.99ms max=830.87ms + { expected_response:true }...: avg=17.47ms min=417.04µs med=13.29ms p(90)=37.8ms p(95)=51.37ms p(99)=99.99ms max=830.87ms + http_req_failed................: 0.00% 0 out of 341197 + http_reqs......................: 341197 5670.386987/s + + EXECUTION + iteration_duration.............: avg=17.57ms min=458.95µs med=13.38ms p(90)=37.9ms p(95)=51.5ms p(99)=100.19ms max=831.03ms + iterations.....................: 341196 5670.370368/s + vus............................: 100 min=100 max=100 + vus_max........................: 100 min=100 max=100 + + NETWORK + data_received..................: 37 MB 608 kB/s + data_sent......................: 25 MB 408 kB/s + + + + +running (1m00.2s), 000/100 VUs, 341196 complete and 0 interrupted iterations +default ✓ [ 100% ] 100 VUs 1m0s