[Perf] 실제 BGE-M3 Batch Size 최적화 및 기본값 조정 - #130
Conversation
|
Warning Review limit reached
Next review available in: 51 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough실제 BGE-M3 ChangesBGE-M3 배치 크기 benchmark
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Developer
participant Gradle
participant BenchmarkCLI
participant EmbeddingServer
participant Docker
participant ResultJSON
Developer->>Gradle: bgeBatchPerformanceTest 실행
Gradle->>BenchmarkCLI: benchmark_batch_size.py 실행
BenchmarkCLI->>EmbeddingServer: /health 확인
BenchmarkCLI->>EmbeddingServer: Batch별 /embed/batch 요청
BenchmarkCLI->>Docker: 컨테이너 RSS 조회
BenchmarkCLI->>ResultJSON: 지표와 추천 결과 저장
Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/test-results/gimin-`#128-bge-m3-batch-size-performance.md:
- Around line 119-122: 프로젝트 루트에서 실행해도 테스트 파일을 찾도록 pytest 명령을 수정하세요.
`test_benchmark_batch_size.py`와 `test_main.py` 경로에 `embedding-server/` 접두사를
추가하거나 명령 실행 전에 `cd embedding-server`를 포함하고, 두 테스트가 동일하게 실행되도록 유지하세요.
In `@embedding-server/benchmark_batch_size.py`:
- Line 24: 제품 기본값과 일치하도록 embedding-server/benchmark_batch_size.py 24-24의
CURRENT_DEFAULT_BATCH_SIZE를 32로 변경하세요. 해당 변경에 맞춰
embedding-server/test_benchmark_batch_size.py 115-125의 현재 기본값 Fixture를 Batch 32로
업데이트하고, 5% 정책 검증을 위해 Batch 32는 96.0, Batch 64는 100.0으로 설정하세요.
- Around line 252-263: Update the exception handling around the response
decoding in the benchmark request flow to include UnicodeDecodeError alongside
the existing exceptions caught by the handler after validate_batch_response.
Ensure invalid UTF-8 responses are recorded as failed request samples so the
benchmark continues and previously completed profile results can still be saved.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c99878cf-2022-4582-aecb-572d6b285685
📒 Files selected for processing (9)
.env.examplebuild.gradledocs/design/gimin-#128-bge-m3-batch-size-performance.mddocs/test-results/gimin-#128-bge-m3-batch-size-performance.mdembedding-server/benchmark_batch_size.pyembedding-server/test_benchmark_batch_size.pysrc/main/java/com/opensource/docgrid/domain/embedding/config/EmbeddingBatchProperties.javasrc/main/resources/application.ymlsrc/test/java/com/opensource/docgrid/domain/embedding/config/EmbeddingBatchPropertiesTest.java
🔍️ 작업 내용
✨ 상세 설명
기존 Batch Size 기본값은 실제 BGE-M3 처리량과 꼬리 지연, 메모리 사용량을 함께 비교한 근거가 없었습니다. 최고 처리량만 선택하지 않고 운영 안정성과 처리량의 균형을 확인할 수 있도록 반복 가능한 측정 도구와 결과를 추가했습니다.
측정 결과
처리량 차이는 1.76%인 반면 Batch 64의 p95가 Batch 32의 1.88배여서 기본값으로 Batch 32를 선택했습니다.
영향
검증
🛠️ 추후 리팩토링 및 고도화 계획
💬 리뷰 요구사항
Summary by CodeRabbit
새로운 기능
변경 사항
테스트