MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
효율적 클러스터 활용을 위한 job scheduler
1. 효율적 클러스터 활용을 위한
job scheduler 솔루션
IBM Spectrum LSF 소개
2019 1Q
2. AGENDA
§ Job scheduler의 가치
§ LSF의 도입 효과
§ LSF의 아키텍처
§ LSF의 Add-on Module 및 Suites
§ LSF 특장점 및 경쟁 비교
§ LSF와 container, k8s, cloud
§ LSF의 고객 사례
2
3. Welcome to the Waitless World - 3 -
Job Scheduler의 가치
PC나 web, 모바일 기기를 통한
보편적이고 편리한 사용자 접근
Heterogeneous Compute cluster
/ cloud에서 실제 연산 수행
다양한 기능의 스케쥴러
솔루션
§ 더 높은 throughput, 더 빠른
수행시간
§ 유연한 self-healing Cluster
§ SLA 충족을 위한 효율적
스케쥴링
§ 표준화, 단순화, 더 높은
가용성
§ 일정한 자원으로 더 많은
사용자를 지원
§ 더 큰 ROI, 더 낮은 TCO
4. Welcome to the Waitless World - 4 -
LSF의 도입 효과
Enterprise-class job scheduler 솔루션인 IBM Spectrum LSF는 더 향상된
자원 활용률과 더 빠른 결과 산출을 통해 비용을 절감하고 사용자
만족도를 제고합니다.
업무 부하 가속 생산성 증가 관리 단순화
5. Welcome to the Waitless World - 5 -
LSF의 필요성 – 사례 #1
GPU 0
김박사
GPU 2
GPU 4
GPU 6
GPU 1
GPU 3
GPU 5
GPU 7
김박사
김박사김박사
이박사
이박사
이박사
Without LSF
With LSF
새벽 2시까지 기다린 후 실행
OR
다음날 출근 후 실행
Job submit 후 퇴근
다음날 출근시 training 완료
New
Job
New
Job
다음날 주간에
사용할 GPU가
없음. 결국 GPU
추가 구매 필요.
다음날 주간에
사용할 GPU가
있음. GPU 추가
구매 필요 없음.
사용 가능한 GPU는 8개 뿐. 이미 김박사가 4개, 최박사가 3개를 사용 중이고, 대략 새벽 2시에 끝난다고
함. 내가 지금 수행해야 하는 training은 GPU 2개를 이용해서 약 6시간 돌려야 함. 밤 사이에 돌리면 좋을
텐데, 내가 새벽 2시까지 연구소에 남아 있다가 돌려놓고 퇴근해야 하는가 ?
6. Welcome to the Waitless World - 6 -
LSF의 필요성 – 사례 #2
• Job A와 Job B가 모두 default인 GPU 0,1을 사용함
• Job B는 exit code 134를 내며 error 발생하거나 두
job이 모두 lock을 일으켜 hang 걸림
• 이를 피하기 위해 연구원들은 GPU 서버 상황을 면밀히
모니터링하고, 상호 협조하여 사용 순번을 정해야 함
• 모든 job은 LSF를 통해 submit됨
• 연구원 B가 GPU 0,1번을 사용하도록 job script를
작성하더라도, LSF는 Job A가 GPU 0,1번을 사용하는 것을
인식하고 자동으로 GPU 2,3번에 Job B를 할당
• 연구원들과 시스템 관리자의 부담을 크게 덜어줌
With LSF
GPU#3
GPU#2
GPU#1
GPU#0
연구원
A
Job
A
연구원
B
Job
B
LSF
GPU#3
GPU#2
GPU#1
GPU#0
연구원
A
Job
A
연구원
B
Job
B
Without LSF
7. Welcome to the Waitless World - 7 -
LSF 아키텍처 개괄
LSF
Scheduler
ResourceInformation& Status
Work
Submission Compute
Farm / Cluster /
Grid / Cloud
WorkDispatch
• LSF는 다양한 requirement를 가진 대량의 job을 신속하고 원활하게 적재적소에 배치하여 적은 자원으로
많은 업무를 처리하게 해주는 SW 솔루션
8. Welcome to the Waitless World - 8 -
LSF를 통한 Job 수행 개요
고성능 병렬파일시스템
Login 서버 #1
LSF master
LSF
slave
GPU#0
GPU#1
GPU#2
GPU#3
Login 서버 #2
LSF standby
LSF
slave
GPU#0
GPU#1
GPU#2
GPU#3
LSF
slave
GPU#0
GPU#1
GPU#2
GPU#3
GPU 서버 pool
• 각 연구원은 GPU 가용 여부 등을 신경쓸 필요없이 job scheduler의 queue로 training job을 제출하기만
하면 job scheduler가 어느 서버의 어느 GPU에서 job을 수행할지 알아서 정해줍니다.
• 모든 data는 병렬파일시스템 상에 존재하므로 training이 어느 서버에서 수행되든 상관없습니다.
9. Welcome to the Waitless World - 9 -
LSF daemon 아키텍처
• LSF는 enterprise-class의 안정성과 확장성, 다양한 기능을 위해 open source 기반의 job scheduler보다
훨씬 정교한 daemon 아키텍처를 갖추고 있습니다.
Batch API MBD
MLIM LIM
SBD
Child SBD
RES
User job
bsub app
다른 host들
Submission
Host
Master
Host
Execution
Host
queue
LIM : Load Info Manager
MLIM : Master LIM
MBD : Master Batch Daemon
SBD : Slave Batch Daemon
RES : Remote Execution Server
load
info
10. Welcome to the Waitless World - 10 -
LSF의 Add-on Modules
Report와 dashboard
생성 및 열람을 위한
경량 data analysis
Data transfer 및
caching의 스케쥴링
복잡한 연산 workflow를
설계, 문서화, 자동화
제한된 수의 상용 SW
license를 여러 사용자간에
효율적으로 공유
하나의 LSF job 안에서
여러개의 짧은 workload를
효율적으로 스케쥴링
Cluster 사용자 및
관리자에게 쉽고 유연한
GUI 인터페이스를 제공
LSF job 상태 및 사용
자원을 추적, 관찰,
보고, 관리하는 운영
dashboard
LSF workload data를
분석 및 시각화
11. Welcome to the Waitless World - 11 -
LSF의 Add-on Module의 예 : Process Manager
• Cluster 내의 다양한 수행 환경 및 조건에 따라, job 수행시 array_size를 다르게 하거나 수행 모드를 병렬
또는 순차로 지정해야 하는 경우도 있습니다.
• IBM Spectrum LSF Process Manager는 그러한 복잡한 workflow에 따라 job 수행을 제어해주는 역할을
합니다.
12. Welcome to the Waitless World - 12 -
LSF의 다양한 ‘Suite’별 기능상 차이
Suite for Enterprise
Suite for HPC
Suite for Workgroups
Cluster
Deployment
and
Monitoring
Application
Centric User
Portal
Lightweight
Reporting &
Dashboards
Workflow
Automation
Intelligent
Data Staging
Software
License
Optimization
Enterprise
Scalability
Hybrid Cloud
Auto-scaling
13. Welcome to the Waitless World - 13 -
LSF의 다양한 ‘Suite’들에 포함된 모듈
Suite for Enterprise
Suite for HPC
Suite for Workgroups
Ansible+
RPM Installer
SCF-CE
Application
Center
Standard
Edition
Explorer
Process
Manager
Data Manager
Software
License
Optimization
Enterprise
Scalability
Resource
Connector
LSF Std Edition
Spectrum MPI
MultiCluster
(Send only)
RTM Data
Collectors*
* RTM SERVER is NOT included – needs to be bought separately Full MultiCluster Enabled
14. Welcome to the Waitless World - 14 -
LSF의 각 Suite별 특징 (v10.2)
• Suite for Workgroups
§ LSF Standard Edition
§ Application Center Standard Edition
§ Spectrum MPI (Power & x86)
§ LSF Explorer for reports and dashboards, and monitoring
§ 최대 서버 128대, 동시 수행 job 25,000건 (queued & running)
§ IBM Design Thinking principals 기반의 새로운 GUI
§ 전체 suite에 대한 Ansible driven RPM installer
• Suite for HPC
§ 최대 서버 1024대, 동시 수행 job 250,000건
§ Cloud로의 ‘bursting’을 위한 Resource Connector
§ Cluster간, 그리고 cloud로의 pre/post data staging을 위한
Data Manager
• Suite for Enterprise
§ License가 있는 SW들에게 가용 license를 고려한 여러가지
scheduling policy를 적용해주는 License Scheduler
§ 서버 및 동시 수행 job 수 무제한
15. Welcome to the Waitless World - 15 -
LSF 고효율의 비결 #1 : “FairShare” scheduling policy
[user_name, #_of_shares]
할당되는
총 share 수
전체 자원 중
User1이 받는 %
비고
[User1, 1] [GroupB, 1] 2 1/2 = 50%
[User1, 10] [GroupB@, 2] 10 + 그룹B인원수*2 10/(10+10*2) = 33% GroupB의 인원이 10명일 경우
[User1, 10] [User2, 9] [others, 8] 27 10/27 = 37% Others가 몇명이든 8을 나눠씀
[User1, 10] [User2, 6] [default, 4] 16 + 나머지인원수*4 10/(16+10*4) = 18% 나머지 인원이 10명일 경우
• Cluster 운영시 가장 큰 난제 중 하나는 사용자들에 대한 자원 분배 정책 수립
• 1% vs. 99%의 대립은 HPC cluster에서도 존재
§ 기계적인 공평성 à 중요업무에 대한 지원 미흡
§ 중요업무에 절대적 우선순위 à 대다수 사용자들의 불만
§ 어느 쪽이든 결과는 cluster 자원의 비효율적인 활용
• LSF는 “FairShare” scheduling policy를 통해 이러한 난제를 해결
§ 중요업무에 우선권을 주되, 다중 사용자 환경 변화에 따라 scheduling policy가 동적으로 변화
§ 높은 사용자 만족도와 효율적인 cluster 자원 활용
16. Welcome to the Waitless World - 16 -
LSF 고효율의 비결 #2 : Dynamic user priority
• 일부 사용자에 의한 전체 cluster 자원 독점을 방지하며 Cluster 전체 자원 사용률의 최적화
ü 예약 및 사용되는 job slot 수
ü 수행 중인 job의 수행 시간
ü 누적 CPU 사용시간 (최근 사용시간에 가중치)
ü 수행 중인 job의 decay 처리된 수행 시간
ü 완료된 과거 job들의 수행 시간
ü 사용자가 job sumit 시 commit한 job 수행 시간 (-W 옵션)
ü Fairshare plugin에 의한 메모리 사용량 조정 (libfairshareadjust.*)
기본
계산요소
선택적
계산요소
Cluster 자원
사용률의
최적화 +
사용자 만족도
향상
Default 값 : CPU_TIME_FACTOR : 0.7, RUN_TIME_FACTOR : 0.7, RUN_JOB_FACTOR : 3, FAIRSHARE_ADJUSTMENT_FACTOR : 0, HIST_HOURS : 5
Dynamic priority = number_shares / (cpu_time * CPU_TIME_FACTOR + run_time * RUN_TIME_FACTOR
+ ( 1 + job_slots) * RUN_JOB_FACTOR + fairshare_adjustment*FAIRSHARE_ADJUSTMENT_FACTOR)
17. Welcome to the Waitless World - 17 -
Mount Sinai Hospital의 결정과 그 이유
0
50,000
100,000
150,000
200,000
250,000
300,000
350,000
400,000
450,000
9.1.3 10.1 10.1.0.4
JobsperHour
Enhanced Job Throughput
Default New Features
• 모든 job scheduler는 ‘scheduling’을 수행 – 그러나 heavy workload에서의 동작은 다른 문제
• Mount Sinai Hospital
§ Moab/Torque à LSF 교체
§ Heavy load에서의 Moab/Torque crash 때문
• 경쟁사를 압도하는 enterprise-class 솔루션 LSF
§ GPU 및 container 기술 지원
§ 더 다양한 제어 및 기능 제공 LSF는 version up
만으로도
같은 HW에서
최대 2배의
연산업무를 처리
18. Welcome to the Waitless World - 18 -
LSF의 방대한 기능
ü Unmatched Scheduler Performance
ü Hybrid Cloud (Host Factory)
ü Control Groups and Affinity
ü Container Support (Docker, etc.)
ü Compute Units & Job Packing
ü Event/Relaxed Scheduling
ü 5th Generation GPU Support
ü Spectrum LSF Application Center
ü Spectrum LSF Data Manager
ü Global Fairshare
ü Multi Cluster
ü Session Scheduling
ü Block Scheduling
ü Multi-Pass Resource Requirements
ü Spectrum LSF RTM
ü Guaranteed Resources
ü Multi-threaded Dispatch
ü Key Pending Reasons
ü Start Time Prediction
ü Dynamic Resource Scheduling
ü Resource Preemption
ü License Scheduling
ü Resizable Jobs
ü Backfill Scheduling
ü Delegation of Administrative Authority
ü Alternative Resource Requirements
ü Application Profiles
ü Large Array Support
19. Welcome to the Waitless World - 19 -
LSF version history
9.1.3 (4Q2015)
– GPU 할당 강행을 위한
cgroup 지원
– Idle일 경우 GPU 전력을
줄이도록 전력 관리 지원
– AutoBoost 제어
– NVIDIA MPS 지원
10.1.0.1 (3Q2016)
– 향상된 job accounting을
위한 NVIDIA DCGM 지원
– bjobs/bhost/bacct 명령에
–gpu 옵션 추가
10.1.0.3 (3Q2017)
– bsub 명령에 –gpu 옵션
– GPU mode의 사용자 제어
– 기본 GPU 옵션에
GPU_REQ 추가
– MPI의 rank level에서
CUDA_VISIBLE_DEVICES
지원
10.1.0.4 (4Q2017)
– 향상된 DCGM Health
Check 및 Accounting
– POWER9 지원
LSF 7.0.6 (2008)
– GPU 초기 지원 시작
– CUDA_VISIBLE_DEVICES
에 의한 GPU 제어
LSF 8.0 (2010)
– GPU를 정상 스케쥴링
대상 자원으로 취급
– GPU 계량화 지원
LSF 9.1.2 (2013)
– 계량 수집을 스케쥴링용과
정보용의 2가지로 분리
– CUDA_VISIBLE_DEVICES
를 host마다 각기 다르게
설정 가능
LSF 9.1.3 (1Q2015)
– POWER8 지원
– GPU 사용률 리포트
– Shared Mode 할당
알고리즘
– CPU-GPU Affinity
20. Welcome to the Waitless World - 20 -
LSF의 enterprise-class 기술 지원
미검증된 사용 이력
제한된 L3 지원
오픈소스 기반
솔루션
“Build it Yourself”
SchedMD only provided L3 support for Slurm.
Altair only provides L3 support for their
opensource version of PBSPro
20년간 국내 대기업에서 사용LSF 전문 파트너의 현장 지원IBM의 end-to-end 지원
21. Welcome to the Waitless World - 21 -
LSF의 Suite별, 그리고 경쟁제품과의 비교
LSF
Workgroup
LSF
HPC
LSF
Enterprise
Slurm
Workload Scheduling (i.e. LSF Standard) ü ü ü ü
Web Portal ü ü ü û
Remote 3D Visualisation Support ü ü ü û
Monitoring & Reporting ü ü ü û
Web Services/Restful API ü ü ü û
Mobile Support ü ü ü û
Systems Monitoring ü ü ü û
Bare Metal Provisioning ü ü ü û
Receive workload from other clusters ü ü û
Cloud Scaling Policies ü ü û
Job Dependencies ü ü ü ü
Graphical computational workflows ü ü û
Transfer of files before and after job execution ü ü ü ü
Intelligent pre/post staging of data ü ü û $
Deduplication of data transfers ü ü û
Scheduling based on the availability of ISV licenses ü ü ü ü
ISV License Allocation and Prioritisation Policies ü û
22. Welcome to the Waitless World - 22 -
GPU에 대한 LSF의 native 지원
• IBM Spectrum LSF는 별도의 설정
없이도 GPU를 자동으로 탐지하여
구성합니다.
• Job submit 명령인 ‘bsub’에
‘-gpu’ 옵션을 추가하여 간편하게
GPU 사용 업무를 스케쥴링 할 수
있습니다.
• ‘bsub -R’ 옵션으로 더 복잡한
GPU 스케쥴링도 가능합니다.
GPU “Zero Config”
2Q2018
23. Welcome to the Waitless World - 23 -
LSF queue로의 job 제출과 수행
Login 서버 #1
LSF master
LSF
slave
GPU#0
GPU#1
GPU#2
GPU#3
LSF
slave
GPU#0
GPU#1
GPU#2
GPU#3
LSF
slave
GPU#0
GPU#1
GPU#2
GPU#3
GPU_pool queue 소속 서버들
Job#1 Job#2 Job#3
My
Job
“사용자가 gpu 0,1번을 사용하도록 지정해도, gpu
0,1번이 이미 사용 중일 경우 error를 내지 않고
자동으로 gpu 2,3번으로 변환하여 수행”
• LSF job scheduler는 연구원이 원하는 GPU 종류와 개수 등의 조건을 충족시키며 정확하게 training을
수행하며, 전체 GPU pool의 활용률을 극대화해주어 추가 GPU 구매를 줄여줍니다.
login1:~/lab1 $ bsub -R "select[ngpus>0] rusage[ngpus_excl_p=2]" -q P100_pool nvidia-docker run
lab1/caffe:ppc64le ./caffe train -gpu 0,1 --solver=/gpfs/solver.prototxt
24. Welcome to the Waitless World - 24 -
IBM Spectrum Scale와 연계된 per LSF job I/O accounting
• Job이 스토리지에 끼치는 부하 측정은
난제
§ 스토리지 tool에서 보여주는 per
host I/O 부하는 host에서 측정되는
I/O 부하와 상이 (cache 등)
• Spectrum Scale와의 협업에 의해 LSF는
per job I/O 부하를 정확히 모니터링
§ LSF CLI 및 LSF Explorer를 통해
보고
• I/O 부하까지 감안한 정확한 스케쥴링과
그에 따른 cluster 자원 사용률 개선
효과
25. Welcome to the Waitless World - 25 -
LSF와 container 기술
• Container는 app을 패키징하고 배포하는
강력한 기술로서, HPC 및 Deep
Learning에서도 사용량이 크게 증가하는
추세
• Container 기술을 위한 LSF의 지원 :
§ Docker, Shifter, Singularity 등의 containerized
app을 수행하는 것을 통합적으로 지원
§ Transparent container access – 사용자들은
복잡한 container 문법을 몰라도 됨
§ Admin이 어떤 container를 어떻게 구동하고,
어떤 파일시스템을 mount할 것인지 등에 대해
절대적인 제어권을 가짐
26. Welcome to the Waitless World - 26 -
LSF와 Kubernetes : IBM Cloud Private, Redhat OpenShift
• 전통적 HPC와 Kubernetes
모두를 위한 단일 스케쥴러로
LSF를 구성
§ Kubernetes는 외부
스케쥴러를 사용할 수
있도록 허용
• 이를 통해 LSF의 진보된
scheduling policy를
Kubernetes 업무부하에 사용
가능
Admin
Charts
Defines Application (Chart)
scheduler: lsf
resources:
mem: 256M
cpu: 100m
Deploys Application
LSF – K8s
Scheduler
Pending
Bsub
Reservation
Job
Deployed
Job Host
Allocated
Query
Pending
Update
host
IBM Cloud
private
27. Welcome to the Waitless World - 27 -
HPC에서의 hybrid cloud 활용
Google
IBM Cloud
Microsoft
Amazon
28. Welcome to the Waitless World - 28 -
LSF에서의 CWLEXEC 도입
• CWL (Common Workflow Language)은
생명공학 커뮤니티에서 주도하는 떠오르는
표준
• LSF에는 CWLEXEC을 통해 CWL을
통합되었으며, IBM이 공식 지원
• LSF의 다양한 기능들 (native container 지원,
hybrid cloud 지원 등)을 CWLEXEC에서 사용
• CWLEXEC은 open source이며, github에
공개될 예정
ü Efficient checking of job
completion with maximum
parallelism
ü Self-healing of workflows
ü Docker integration
ü Cloud bursting
ü Rerun and interruption
29. Welcome to the Waitless World - 29 -
LSF 고객 사례 : IBM and Aston Martin Red Bull Racing
Analysis
& Design
Simulate
Test
Race
Data Management with
IBM Spectrum Scale
IBM Spectrum Protect
IBM Aspera
Wind tunnel data analysis
and race analytics
supported by IBM
Spectrum Symphony
LSF
License Scheduler
Application Center
Process Manager
RTM30,000 changes/season
1,000 changes/week
100’s simulations/week
100’s Millions/Billions
DOF/Simulation
100’s of Separate Processes
(CAD to Results)
10’s TB Data/Day
30. Welcome to the Waitless World - 30 -
LSF 고객 사례 : 수많은 대학과 기업 연구소