# 성능 최적화 (Spring Boot) > 성능 최적화: profiling, caching, lazy loading, 페이지네이션, connection pooling, DB 인덱싱 - 30 면접 질문 - Senior - [면접 질문: Spring Boot](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions.md) ## 1. Spring Boot 맥락에서 HikariCP란 무엇인가요? **답변** HikariCP는 버전 2.0부터 Spring Boot의 기본 connection pool 관리자입니다. 최적화된 구현(낮은 오버헤드, 효율적인 동시성 관리)을 통해 뛰어난 성능을 제공하며, 시장에서 가장 빠른 connection pool로 널리 알려져 있습니다. Spring Boot는 의존성에 spring-boot-starter-data-jpa 또는 spring-boot-starter-jdbc가 있을 때 자동으로 이를 사용합니다. ## 2. 어떤 HikariCP 파라미터가 pool의 최대 연결 수를 정의하나요? **답변** maximumPoolSize 파라미터는 HikariCP가 pool에서 유지할 최대 연결 수(활성 및 유휴)를 정의합니다. HikariCP가 권장하는 값은 일반적으로 connections = ((core_count * 2) + effective_spindle_count) 공식을 기반으로 하며, 일반적인 애플리케이션에서는 보통 10에서 20 사이입니다. 값이 너무 높으면 데이터베이스가 포화될 수 있고, 너무 낮으면 연결 대기가 발생할 수 있습니다. ## 3. HikariCP에서 maximumPoolSize와 minimumIdle의 차이점은 무엇인가요? **답변** maximumPoolSize는 pool 내 총 최대 연결 수(활성 및 유휴)를 정의하고, minimumIdle은 HikariCP가 영구적으로 유지하는 최소 유휴 연결 수를 정의합니다. HikariCP는 minimumIdle을 설정하지 않고 maximumPoolSize가 pool을 관리하도록 하는 것(기본 동작: minimumIdle = maximumPoolSize)을 권장합니다. pool이 부하에 따라 자동으로 조정되어 성능을 최적화하기 때문입니다. ## 27개 추가 질문 이용 가능 - maximumPoolSize를 계산하기 위해 HikariCP가 권장하는 공식은 무엇인가요? - 어떤 HikariCP 파라미터가 pool에서 연결을 얻기 위한 최대 대기 시간을 제어하나요? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Spring Boot 면접 주제 - [Spring Core - IoC & DI](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-core-ioc-di.md): 22개 질문, Junior - [Spring Boot Auto-Configuration](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-boot-auto-configuration.md): 20개 질문, Junior - [Spring Boot Starters](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-boot-starters.md): 18개 질문, Junior - [Application Properties & YAML](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/application-properties-yml.md): 16개 질문, Junior - [SLF4J 및 Logback을 사용한 로깅](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/logging.md): 20개 질문, Junior - [Spring Boot DevTools](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-boot-devtools.md): 15개 질문, Junior - [Spring MVC Basics](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-mvc-basics.md): 20개 질문, Mid-Level - [Spring REST Controllers](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-rest-controllers.md): 20개 질문, Mid-Level - [Request & Response Handling](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/request-response-handling.md): 20개 질문, Mid-Level - [예외 처리](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/exception-handling.md): 25개 질문, Mid-Level - [Bean Validation](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/bean-validation.md): 25개 질문, Mid-Level - [Spring Data JPA 기초](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-data-jpa-basics.md): 25개 질문, Mid-Level - [JPA 엔티티 및 관계](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/jpa-entities-relationships.md): 30개 질문, Mid-Level - [JPA 쿼리](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/jpa-queries.md): 30개 질문, Mid-Level - [Spring Data Repositories](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-data-repositories.md): 25개 질문, Mid-Level - [Spring Security 기초](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-security-basics.md): 25개 질문, Mid-Level - [Spring Boot Actuator](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-boot-actuator.md): 20개 질문, Mid-Level - [JUnit과 Mockito를 사용한 단위 테스트](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/testing-junit-mockito.md): 30개 질문, Mid-Level - [Spring Boot 테스트](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-boot-testing.md): 30개 질문, Mid-Level - [Profiles와 Environment](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/profiles-environment.md): 20개 질문, Mid-Level - [RestTemplate 및 WebClient](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/resttemplate-webclient.md): 24개 질문, Mid-Level - [Async와 스케줄링](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/async-scheduling.md): 25개 질문, Mid-Level - [Spring을 사용한 캐싱](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/caching.md): 25개 질문, Mid-Level - [Spring WebFlux (리액티브)](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-webflux.md): 25개 질문, Mid-Level - [Spring 트랜잭션](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/transactions.md): 30개 질문, Senior - [고급 인증 및 인가](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/authentication-authorization.md): 30개 질문, Senior - [JWT 및 스테이트리스 보안](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/jwt-stateless-security.md): 20개 질문, Senior - [OAuth2와 Authorization Server](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/oauth2-authorization-server.md): 20개 질문, Senior - [Spring Boot와 Docker](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-boot-docker.md): 19개 질문, Senior - [Spring을 활용한 마이크로서비스](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/microservices-basics.md): 25개 질문, Senior - [Spring Cloud Config](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/spring-cloud-config.md): 19개 질문, Senior - [GraalVM Native Images](https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/graalvm-native-images.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/spring-boot/interview-questions/performance-optimization