Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Kubernetes 지능형 리소스 최적화

kakao
November 01, 2024

Kubernetes 지능형 리소스 최적화

#Kubernetes #리소스최적화 #finops

"쿠버네티스 클러스터에 구성된 서비스의 리소스를 어떻게 관리하고 계신가요?" 에서 비롯된 지능형 리소스 최적화 시스템 구축 프로젝트 과정을 소개합니다.
이 영상을 통해 효율적 리소스 관리를 통한 비용절감 방법을 얻어가실 수 있습니다.

목차
1. 프로젝트 탄생 비화
2. 프로젝트 진행 여정
- Phase1 : CPU/Memory 리소스 추천
- Phase2 : Add on KEDA
- Phase3 : 지능형 시스템으로 업그레이드
3. 어떤 성과를 얻었을까?
- 리소스 절감으로 인한 비용절감
- 서비스 성능 향상
4. 예상치 못했던 일들
5. 앞으로의 계획

발표자 : steve.play
카카오페이증권 DevOps팀 스티브입니다.
카카오페이증권 서비스들을 위한 플랫폼 구축 및 운영, 표준화를 담당하고 있습니다.

kakao

November 01, 2024
Tweet

More Decks by kakao

Other Decks in Programming

Transcript

  1. 8BMMHB1MBUGPSN $* 5FTU $% #VJME 1VTI 4ZOD (JU)VCMPHPJTBUSBEFNBSLPGUIF(JU)VC *OD"MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF(JU)VC *OD

    +FOLJOTMPHPJTBUSBEFNBSLPGUIF+FOLJOTQSPKFDU"MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF+FOLJOTQSPKFDU "SHPMPHP )BSCPSMPHPBSFBUSBEFNBSLPGUIF$MPVE/BUJWF$PNQVUJOH'PVOEBUJPO $/$' "MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF$/$'
  2. 8BMMHB1MBUGPSN $* 5FTU $% 4ZOD #VJME 1VTI 3VO$%+PC 1VTI (JU)VCMPHPJTBUSBEFNBSLPGUIF(JU)VC

    *OD"MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF(JU)VC *OD +FOLJOTMPHPJTBUSBEFNBSLPGUIF+FOLJOTQSPKFDU"MMSJHIU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SJHIUTUPUIJTMPHPBSFPXOFECZUIF$/$' ,VCFSOFUFT1PEJDPOJTMJDFOTFEVOEFSBDIPJDFPGFJUIFS"QBDIFPS$$ - #:
  10. 1IBTF,&%"بੑҗ੿ীࢲҊ޹೮؍੼    ,&%"4DBMFE0CKFDU੄%FGBVMUч ‣$16 /P-JNJU 3FRVFTU੄੉࢚ੌ҃਋4DBMF੉غѱҳࢿ triggers: -

    type: cpu metricType: Utilization metadata: value: "150" - type: memory metricType: Utilization metadata: value: "80"
  11. 1IBTF,&%"بੑҗ੿ীࢲҊ޹೮؍੼    ,&%"4DBMFE0CKFDU੄%FGBVMUч ‣$16 /P-JNJU 3FRVFTU੄੉࢚ੌ҃਋4DBMF੉غѱҳࢿ ‣ .FNPSZ

    3FRVFTU-JNJU ੉࢚ੌ҃਋4DBMF੉غѱҳࢿ triggers: - type: cpu metricType: Utilization metadata: value: "150" - type: memory metricType: Utilization metadata: value: "80"
  12. 4DBMFJOPVU झா઴݂ 1IBTFѾҗ ܻࣗझ ୭੸ച ੸ਊ 8BMMHB 1SPNFUIFVT ࣻ૘ %S1ZN

    ࠙ࢳ୶ୌ +FOLJOTMPHPJTBUSBEFNBSLPGUIF+FOLJOTQSPKFDU"MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF+FOLJOTQSPKFDU "SHPMPHP 1SPNFUIFVTMPHP ,&%"MPHP ,VCFSOFUFTMPHPBSFBUSBEFNBSLPGUIF$MPVE/BUJWF$PNQVUJOH'PVOEBUJPO $/$' "MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF$/$' ,VCFSOFUFT1PEJDPOJTMJDFOTFEVOEFSBDIPJDFPGFJUIFS"QBDIFPS$$ - #:
  13. 1IBTFѾҗ 4DBMFJOPVU झா઴݂ ܻࣗझ ୭੸ച ੸ਊ 8BMMHB ࠙ࢳ୶ୌ6QHSBEF 1SPNFUIFVT ࣻ૘

    %S1ZN +FOLJOTMPHPJTBUSBEFNBSLPGUIF+FOLJOTQSPKFDU"MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF+FOLJOTQSPKFDU "SHPMPHP 1SPNFUIFVTMPHP ,&%"MPHP ,VCFSOFUFTMPHPBSFBUSBEFNBSLPGUIF$MPVE/BUJWF$PNQVUJOH'PVOEBUJPO $/$' "MMSJHIUTUPUIJTMPHPBSFPXOFECZUIF$/$' ,VCFSOFUFT1PEJDPOJTMJDFOTFEVOEFSBDIPJDFPGFJUIFS"QBDIFPS$$ - #:
  14. $16-JNJUઁѢ۽ੋೠࢿמೱ࢚ resources: limits: cpu: '4' memory: 8Gi requests: cpu: '2'

    memory: 8Gi resources: limits: memory: 8Gi requests: cpu: '2' memory: 8Gi ੉੹ ੉റ $16ࢎਊ۝
  15. $16-JNJUઁѢ۽ੋೠࢿמೱ࢚ ੉੹ ੉റ resources: limits: cpu: '4' memory: 8Gi requests:

    cpu: '2' memory: 8Gi resources: limits: memory: 8Gi requests: cpu: '2' memory: 8Gi $16ࢎਊ۝ $16ࢎਊ۝
  16. $16-JNJUઁѢ۽ੋೠࢿמೱ࢚ ੉੹ ੉റ resources: limits: cpu: '4' memory: 8Gi requests:

    cpu: '2' memory: 8Gi resources: limits: memory: 8Gi requests: cpu: '2' memory: 8Gi .FNPSZࢎਊ۝
  17. $16-JNJUઁѢ۽ੋೠࢿמೱ࢚ ੉੹ ੉റ resources: limits: cpu: '4' memory: 8Gi requests:

    cpu: '2' memory: 8Gi resources: limits: memory: 8Gi requests: cpu: '2' memory: 8Gi .FNPSZࢎਊ۝ .FNPSZࢎਊ۝
  18. ੉ग$16-JNJUઁѢ۽ੋ೧ߊࢤػ੉ग 8FC'MVYࢲ࠺झ ‣ അ࢚$16੄3FRVFTUੋ҃਋+7.झۨ٘оૐоೞݶࢲ00.ߊࢤ ‣ ਗੋ8FC'MVY੄झۨ٘ѐࣻܳ҅࢑ೞח௏٘ীࢲ֢٘੄$PSFࣻ۽оਊ1SPDFTTPSо߸҃ؽ int DEFAULT_IO_WORKER_COUNT = Integer.parseInt(System.getProperty(

    ReactorNetty.IO_WORKER_COUNT, "" + Math.max(Runtime.getRuntime().availableProcessors(), 4))); int CgroupV1Subsystem::cpu_shares() { GET_CONTAINER_INFO(int, _cpu->controller(), "/cpu.shares", "CPU Shares is: %d", "%d", shares); // Convert 1024 to no shares setup if (shares == 1024) return -1; return shares; }
  19. ੉ग୭ୡ҅ദҗ׳ۋ؍ࠗ࠙         

                        1IBTF੉റपઁदр؀߹$16.FUSJD ߓನद
  20. 2"