# 성능 최적화 (Go) > 프로파일링, 벤치마킹, CPU 프로파일링, 메모리 프로파일링, 병목 분석, 최적화 - 22 면접 질문 - Senior - [면접 질문: Go](https://sharpskill.dev/ko/technologies/go/interview-questions.md) ## 1. Go의 pprof 도구란 무엇인가요? **답변** pprof는 Go에 내장된 프로파일링 도구로 CPU, 메모리, goroutine 및 기타 메트릭의 성능을 분석할 수 있습니다. 바이너리 형식의 프로파일을 생성하며 go tool pprof로 분석할 수 있습니다. 이 도구는 성능 병목을 식별하고 프로덕션 환경의 Go 애플리케이션을 최적화하는 데 필수적입니다. ## 2. Go 애플리케이션에서 CPU 프로파일링을 활성화하려면 어떻게 하나요? **답변** CPU 프로파일링은 pprof.StartCPUProfile(file)로 활성화하고 pprof.StopCPUProfile()로 중지합니다. 이 방식은 프로그램 실행 중 CPU 사용량을 캡처합니다. 웹 애플리케이션의 경우 net/http/pprof 패키지를 사용하면 프로파일링 엔드포인트가 자동으로 노출됩니다. ## 3. CPU 프로파일링과 메모리 프로파일링의 차이는 무엇인가요? **답변** CPU 프로파일링은 각 함수에서 소비된 시간을 측정하여 실행 병목을 식별하고, 메모리 프로파일링은 메모리 할당을 측정하여 누수와 과도한 사용을 감지합니다. CPU 프로파일링은 기본적으로 10ms마다 샘플링하고, 메모리 프로파일링은 설정에 따라 모든 할당 또는 샘플을 캡처합니다. ## 19개 추가 질문 이용 가능 - testing 패키지로 Go에서 벤치마크를 어떻게 만드나요? - Go 벤치마크에서 '1000 ns/op' 결과는 무엇을 의미하나요? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Go 면접 주제 - [Go 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/go-basics.md): 25개 질문, Junior - [Go 데이터 구조](https://sharpskill.dev/ko/technologies/go/interview-questions/go-data-structures.md): 20개 질문, Junior - [Go 인터페이스](https://sharpskill.dev/ko/technologies/go/interview-questions/go-interfaces.md): 18개 질문, Junior - [에러 처리](https://sharpskill.dev/ko/technologies/go/interview-questions/error-handling.md): 20개 질문, Junior - [Goroutine 기초](https://sharpskill.dev/ko/technologies/go/interview-questions/goroutines-basics.md): 20개 질문, Junior - [Channels](https://sharpskill.dev/ko/technologies/go/interview-questions/channels.md): 22개 질문, Junior - [Go Modules](https://sharpskill.dev/ko/technologies/go/interview-questions/go-modules.md): 18개 질문, Mid-Level - [HTTP 서버](https://sharpskill.dev/ko/technologies/go/interview-questions/http-server.md): 24개 질문, Mid-Level - [HTTP 클라이언트](https://sharpskill.dev/ko/technologies/go/interview-questions/http-client.md): 18개 질문, Mid-Level - [JSON 인코딩](https://sharpskill.dev/ko/technologies/go/interview-questions/json-encoding.md): 20개 질문, Mid-Level - [Database/SQL](https://sharpskill.dev/ko/technologies/go/interview-questions/database-sql.md): 22개 질문, Mid-Level - [context 패키지](https://sharpskill.dev/ko/technologies/go/interview-questions/context-package.md): 20개 질문, Mid-Level - [Testing](https://sharpskill.dev/ko/technologies/go/interview-questions/testing.md): 22개 질문, Mid-Level - [동시성 패턴](https://sharpskill.dev/ko/technologies/go/interview-questions/concurrency-patterns.md): 24개 질문, Mid-Level - [동기화 프리미티브](https://sharpskill.dev/ko/technologies/go/interview-questions/sync-primitives.md): 22개 질문, Mid-Level - [Go 웹 프레임워크](https://sharpskill.dev/ko/technologies/go/interview-questions/go-web-frameworks.md): 20개 질문, Mid-Level - [REST API 설계](https://sharpskill.dev/ko/technologies/go/interview-questions/rest-api-design.md): 20개 질문, Mid-Level - [gRPC](https://sharpskill.dev/ko/technologies/go/interview-questions/grpc.md): 22개 질문, Mid-Level - [Reflection](https://sharpskill.dev/ko/technologies/go/interview-questions/reflection.md): 20개 질문, Senior - [메모리 관리](https://sharpskill.dev/ko/technologies/go/interview-questions/memory-management.md): 24개 질문, Senior - [Generics](https://sharpskill.dev/ko/technologies/go/interview-questions/generics.md): 20개 질문, Senior - [Go Design Patterns](https://sharpskill.dev/ko/technologies/go/interview-questions/design-patterns.md): 24개 질문, Senior - [Microservices](https://sharpskill.dev/ko/technologies/go/interview-questions/microservices.md): 24개 질문, Senior - [보안 및 인증](https://sharpskill.dev/ko/technologies/go/interview-questions/security-authentication.md): 24개 질문, Senior - [Docker & Containerization](https://sharpskill.dev/ko/technologies/go/interview-questions/docker-containerization.md): 20개 질문, Senior - [Kubernetes Basics](https://sharpskill.dev/ko/technologies/go/interview-questions/kubernetes-basics.md): 22개 질문, Senior - [고급 Go](https://sharpskill.dev/ko/technologies/go/interview-questions/advanced-go.md): 20개 질문, Senior - [CLI 개발](https://sharpskill.dev/ko/technologies/go/interview-questions/cli-development.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/go/interview-questions/performance-optimization