SlideShare une entreprise Scribd logo
1  sur  23
병렬처리와 성능향상 A277032 정승휘
개요 PART Ⅰ. 병렬처리에서 성능 향상 PART Ⅱ. 병렬처리 전략 PART Ⅲ. 스레딩 모델
병렬처리에서 성능향상을 판단하는 두 가지 관점 암달의 법칙(Amdhal’s Law) “The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program.” “병렬처리를 통한 프로그램의 성능 향상은 프로그램의 직렬 처리부분에 의해 제한된다.” Gene Amdhal 구스타프슨의 법칙(Gustafson's Law) “The amount of work that can be done in parallel varies linearly with the number of processors.” “병렬로 처리할 수 있는 작업량은 프로세서의 개수에 따라 선형적으로 증가한다.” John Gustafson
아무리 많은 프로세서 코어를 사용하더라도, 직렬 부분들의 실행 속도는 절대 깨질 수 없다.  작업량 500 시간 300 속도증가 x1.7 암달의 법칙 작업량 500 시간 350 속도증가 x1.4 작업량 500 시간 500 속도증가 x1 작업량 500 시간 400 속도증가 x1.25
구스타프슨의 법칙 프로세서가 선형적으로 증가할수록 처리할 수 있는 작업량도 선형적으로 증가하므로 시간당 처리 속도도 선형적으로 증가한다. 작업량 500 시간 500 속도증가 x1 작업량 700 시간 500 속도증가 x1.4 작업량 1100 시간 500 속도증가 x2.2 작업량 2*N*100+300 시간 500 속도증가 O(n)
정리 암달의 법칙과 구스타프슨의 법칙은 같은 문제를 다른 관점에서 본 것.  암달- 직렬로 수행되는 작업을 최소화 구스타프슨-문제의 크기가 증가되는 것을 고려
병렬처리 전략 스레드를 어떻게 ‘사용’ 할 것인가? 기존 전략 - 프로그램을 여러 블록으로 나누고 각 블록에 개별 스레드를 할당. 문제점 - 확장성(Scalability)이 없다. 기능 블록의 개수가 고정되어 있기 때문에 프로세서가 늘어나도 더 많은 데이터를 처리할 수 없다.
병렬처리 전략 Divide & Conquer : 데이터를 더 작은 조각으로 나누고 각 조각마다 스레드 할당 프로세서가 많아질 수록 더 많은 데이터를 효율적으로 병렬 처리할 수 있다.
Example : Ray-Tracing
Example : Ray-Tracing 3D 렌더링 기술 데이터 양이 많고 계산 집중적인(CPU-Bound) 프로세스이므로 병렬처리에 아주 적합하다. (I/O-Bound 프로세스의 경우 병렬처리로 얻을 수 있는 이득이  적을 것) 그려질 이미지를 작은 영역으로 나누고 정해진 개수의 스레드가 각 영역을 처리한다.
Example : Ray-Tracing CPU-A : Intel Core Duo P7350 2.0GHz CPU-B : Intel Core i7 860 2.80GHz Sample Counts : 32 단 1회만 테스트 함.
Example : Ray-Tracing Intel Core Duo P7350 2.0GHz
Example : Ray-Tracing Intel Core i7 860 2.80GHz
Example : Ray-Tracing 스레드 개수가 많아질 수록 성능향상의 정도는 줄어든다.  스레드가  너무 많아지면 속도가 조금 빨라질 수는 있지만 응답성이 떨어진다. 프로세서 개수 대비 적당한 스레드 개수를 정해야한다. (프로그램의 성격, 환경마다 다를 것)
스레딩 모델 문제를 스레드를 이용해 병렬처리로 해결하고자 할 때 스레드를 사용하는 방식 Boss / Worker Model Client / Server Model Pipeline Model
Boss / Worker Model Boss 스레드(일반적으로 Main Thread)가 여러 개의 Worker 스레드에게 작업을 나누어 주는 방식 병렬처리에서 가장 흔한 방식
Example : sortMT
Client / Server Model 동시에 여러 개의 클라이언트들의 요구를 처리하기 위해서  스레드를 연결된 클라이언트마다 생성한다. 변형된 방법으로 스레드 풀을 사용한 클라이언트/서버 모델이 있다.
Example : serverNP
Pipeline Model 각 스레드 또는 스레드들의 그룹은 주어진 작업에 대한 특정한 처리를 수행하고, 그것을 다른 스레드에 넘겨서 나머지 처리가 일어나게 한다.  공장의 조립라인과 흡사한 방식.
Example : threeStage
참고 자료 뇌를 자극하는 윈도우 시스템 프로그래밍(한빛미디어, 윤성우) Windows 시스템 프로그래밍 3판(정보문화사, Johnson M. Hart) 인텔 스레딩 빌딩 블록(지앤선, James Reinders) Operating System Concepts 7th(홍릉과학출판사, Silberschatz)
Q&A BIO HAZARD 5(CAPCOM) – MT Framework Engine

Contenu connexe

En vedette

Introduction to Parallel Programming
Introduction to Parallel ProgrammingIntroduction to Parallel Programming
Introduction to Parallel ProgrammingUNIST
 
Gpu Systems
Gpu SystemsGpu Systems
Gpu Systemsjpaugh
 
2node cluster
2node cluster2node cluster
2node clustersprdd
 
Introduction to Linux #1
Introduction to Linux #1Introduction to Linux #1
Introduction to Linux #1UNIST
 
오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0sprdd
 

En vedette (8)

Introduction to Parallel Programming
Introduction to Parallel ProgrammingIntroduction to Parallel Programming
Introduction to Parallel Programming
 
ISBI MPI Tutorial
ISBI MPI TutorialISBI MPI Tutorial
ISBI MPI Tutorial
 
Gpu Systems
Gpu SystemsGpu Systems
Gpu Systems
 
2node cluster
2node cluster2node cluster
2node cluster
 
Introduction to Linux #1
Introduction to Linux #1Introduction to Linux #1
Introduction to Linux #1
 
Using MPI
Using MPIUsing MPI
Using MPI
 
오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0
 
Open MPI 2
Open MPI 2Open MPI 2
Open MPI 2
 

Similaire à 병렬처리와 성능향상

진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전
진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전
진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전Sukwoo Lee
 
[2B2]기계 친화성을 중심으로 접근한 최적화 기법
[2B2]기계 친화성을 중심으로 접근한 최적화 기법[2B2]기계 친화성을 중심으로 접근한 최적화 기법
[2B2]기계 친화성을 중심으로 접근한 최적화 기법NAVER D2
 
Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_ozlael ozlael
 
Exploring Deep Learning Acceleration Technology Embedded in LLMs
Exploring Deep Learning Acceleration Technology Embedded in LLMsExploring Deep Learning Acceleration Technology Embedded in LLMs
Exploring Deep Learning Acceleration Technology Embedded in LLMsTae Young Lee
 
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo,  and application case of SK TelecomSQL-on-Hadoop with Apache Tajo,  and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo, and application case of SK TelecomGruter
 
SQream DB, GPU-accelerated data warehouse
SQream DB, GPU-accelerated data warehouseSQream DB, GPU-accelerated data warehouse
SQream DB, GPU-accelerated data warehouseNAVER Engineering
 
모바일 게임 최적화
모바일 게임 최적화 모바일 게임 최적화
모바일 게임 최적화 tartist
 
midas NFX CFD Catalog
midas NFX CFD Catalogmidas NFX CFD Catalog
midas NFX CFD Catalogmidasnfx
 
[오픈소스컨설팅]Performance Tuning How To
[오픈소스컨설팅]Performance Tuning How To[오픈소스컨설팅]Performance Tuning How To
[오픈소스컨설팅]Performance Tuning How ToJi-Woong Choi
 
Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014Gruter
 
2021-11-16 모두콘 딥러닝 경량화 발표
2021-11-16 모두콘 딥러닝 경량화 발표2021-11-16 모두콘 딥러닝 경량화 발표
2021-11-16 모두콘 딥러닝 경량화 발표JongkukLim
 
deep encoder, shallow decoder reevaluating non-autoregressive machine transl...
deep encoder, shallow decoder  reevaluating non-autoregressive machine transl...deep encoder, shallow decoder  reevaluating non-autoregressive machine transl...
deep encoder, shallow decoder reevaluating non-autoregressive machine transl...taeseon ryu
 
초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기
초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기
초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기ksdc2019
 
[자바카페] 람다 일괄처리 계층
[자바카페] 람다 일괄처리 계층[자바카페] 람다 일괄처리 계층
[자바카페] 람다 일괄처리 계층용호 최
 
게임프로젝트에 적용하는 GPGPU
게임프로젝트에 적용하는 GPGPU게임프로젝트에 적용하는 GPGPU
게임프로젝트에 적용하는 GPGPUYEONG-CHEON YOU
 
Advanced nGrinder
Advanced nGrinderAdvanced nGrinder
Advanced nGrinderJunHo Yoon
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance TuningJi-Woong Choi
 
Tajo TPC-H Benchmark Test on AWS
Tajo TPC-H Benchmark Test on AWSTajo TPC-H Benchmark Test on AWS
Tajo TPC-H Benchmark Test on AWSGruter
 
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018Amazon Web Services Korea
 
carrier of_tricks_for_image_classification
carrier of_tricks_for_image_classificationcarrier of_tricks_for_image_classification
carrier of_tricks_for_image_classificationLEE HOSEONG
 

Similaire à 병렬처리와 성능향상 (20)

진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전
진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전
진화하는 컴퓨터 하드웨어와 게임 개발 기술의 발전
 
[2B2]기계 친화성을 중심으로 접근한 최적화 기법
[2B2]기계 친화성을 중심으로 접근한 최적화 기법[2B2]기계 친화성을 중심으로 접근한 최적화 기법
[2B2]기계 친화성을 중심으로 접근한 최적화 기법
 
Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_Optimizing the graphics_pipeline_
Optimizing the graphics_pipeline_
 
Exploring Deep Learning Acceleration Technology Embedded in LLMs
Exploring Deep Learning Acceleration Technology Embedded in LLMsExploring Deep Learning Acceleration Technology Embedded in LLMs
Exploring Deep Learning Acceleration Technology Embedded in LLMs
 
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo,  and application case of SK TelecomSQL-on-Hadoop with Apache Tajo,  and application case of SK Telecom
SQL-on-Hadoop with Apache Tajo, and application case of SK Telecom
 
SQream DB, GPU-accelerated data warehouse
SQream DB, GPU-accelerated data warehouseSQream DB, GPU-accelerated data warehouse
SQream DB, GPU-accelerated data warehouse
 
모바일 게임 최적화
모바일 게임 최적화 모바일 게임 최적화
모바일 게임 최적화
 
midas NFX CFD Catalog
midas NFX CFD Catalogmidas NFX CFD Catalog
midas NFX CFD Catalog
 
[오픈소스컨설팅]Performance Tuning How To
[오픈소스컨설팅]Performance Tuning How To[오픈소스컨설팅]Performance Tuning How To
[오픈소스컨설팅]Performance Tuning How To
 
Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014Vectorized processing in_a_nutshell_DeView2014
Vectorized processing in_a_nutshell_DeView2014
 
2021-11-16 모두콘 딥러닝 경량화 발표
2021-11-16 모두콘 딥러닝 경량화 발표2021-11-16 모두콘 딥러닝 경량화 발표
2021-11-16 모두콘 딥러닝 경량화 발표
 
deep encoder, shallow decoder reevaluating non-autoregressive machine transl...
deep encoder, shallow decoder  reevaluating non-autoregressive machine transl...deep encoder, shallow decoder  reevaluating non-autoregressive machine transl...
deep encoder, shallow decoder reevaluating non-autoregressive machine transl...
 
초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기
초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기
초초초 (초고속 초저지연 초연결) 5G IoT 플랫폼 개발 이야기
 
[자바카페] 람다 일괄처리 계층
[자바카페] 람다 일괄처리 계층[자바카페] 람다 일괄처리 계층
[자바카페] 람다 일괄처리 계층
 
게임프로젝트에 적용하는 GPGPU
게임프로젝트에 적용하는 GPGPU게임프로젝트에 적용하는 GPGPU
게임프로젝트에 적용하는 GPGPU
 
Advanced nGrinder
Advanced nGrinderAdvanced nGrinder
Advanced nGrinder
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning
 
Tajo TPC-H Benchmark Test on AWS
Tajo TPC-H Benchmark Test on AWSTajo TPC-H Benchmark Test on AWS
Tajo TPC-H Benchmark Test on AWS
 
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
Amazon Aurora 신규 서비스 알아보기::최유정::AWS Summit Seoul 2018
 
carrier of_tricks_for_image_classification
carrier of_tricks_for_image_classificationcarrier of_tricks_for_image_classification
carrier of_tricks_for_image_classification
 

Dernier

캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Wonjun Hwang
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Kim Daeun
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionKim Daeun
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)Tae Young Lee
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Wonjun Hwang
 

Dernier (6)

캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차캐드앤그래픽스 2024년 5월호 목차
캐드앤그래픽스 2024년 5월호 목차
 
Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)Console API (Kitworks Team Study 백혜인 발표자료)
Console API (Kitworks Team Study 백혜인 발표자료)
 
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
Continual Active Learning for Efficient Adaptation of Machine LearningModels ...
 
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution DetectionMOODv2 : Masked Image Modeling for Out-of-Distribution Detection
MOODv2 : Masked Image Modeling for Out-of-Distribution Detection
 
A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)A future that integrates LLMs and LAMs (Symposium)
A future that integrates LLMs and LAMs (Symposium)
 
Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)Merge (Kitworks Team Study 이성수 발표자료 240426)
Merge (Kitworks Team Study 이성수 발표자료 240426)
 

병렬처리와 성능향상

  • 2. 개요 PART Ⅰ. 병렬처리에서 성능 향상 PART Ⅱ. 병렬처리 전략 PART Ⅲ. 스레딩 모델
  • 3. 병렬처리에서 성능향상을 판단하는 두 가지 관점 암달의 법칙(Amdhal’s Law) “The speedup of a program using multiple processors in parallel computing is limited by the time needed for the sequential fraction of the program.” “병렬처리를 통한 프로그램의 성능 향상은 프로그램의 직렬 처리부분에 의해 제한된다.” Gene Amdhal 구스타프슨의 법칙(Gustafson's Law) “The amount of work that can be done in parallel varies linearly with the number of processors.” “병렬로 처리할 수 있는 작업량은 프로세서의 개수에 따라 선형적으로 증가한다.” John Gustafson
  • 4. 아무리 많은 프로세서 코어를 사용하더라도, 직렬 부분들의 실행 속도는 절대 깨질 수 없다. 작업량 500 시간 300 속도증가 x1.7 암달의 법칙 작업량 500 시간 350 속도증가 x1.4 작업량 500 시간 500 속도증가 x1 작업량 500 시간 400 속도증가 x1.25
  • 5. 구스타프슨의 법칙 프로세서가 선형적으로 증가할수록 처리할 수 있는 작업량도 선형적으로 증가하므로 시간당 처리 속도도 선형적으로 증가한다. 작업량 500 시간 500 속도증가 x1 작업량 700 시간 500 속도증가 x1.4 작업량 1100 시간 500 속도증가 x2.2 작업량 2*N*100+300 시간 500 속도증가 O(n)
  • 6. 정리 암달의 법칙과 구스타프슨의 법칙은 같은 문제를 다른 관점에서 본 것. 암달- 직렬로 수행되는 작업을 최소화 구스타프슨-문제의 크기가 증가되는 것을 고려
  • 7. 병렬처리 전략 스레드를 어떻게 ‘사용’ 할 것인가? 기존 전략 - 프로그램을 여러 블록으로 나누고 각 블록에 개별 스레드를 할당. 문제점 - 확장성(Scalability)이 없다. 기능 블록의 개수가 고정되어 있기 때문에 프로세서가 늘어나도 더 많은 데이터를 처리할 수 없다.
  • 8. 병렬처리 전략 Divide & Conquer : 데이터를 더 작은 조각으로 나누고 각 조각마다 스레드 할당 프로세서가 많아질 수록 더 많은 데이터를 효율적으로 병렬 처리할 수 있다.
  • 10. Example : Ray-Tracing 3D 렌더링 기술 데이터 양이 많고 계산 집중적인(CPU-Bound) 프로세스이므로 병렬처리에 아주 적합하다. (I/O-Bound 프로세스의 경우 병렬처리로 얻을 수 있는 이득이 적을 것) 그려질 이미지를 작은 영역으로 나누고 정해진 개수의 스레드가 각 영역을 처리한다.
  • 11. Example : Ray-Tracing CPU-A : Intel Core Duo P7350 2.0GHz CPU-B : Intel Core i7 860 2.80GHz Sample Counts : 32 단 1회만 테스트 함.
  • 12. Example : Ray-Tracing Intel Core Duo P7350 2.0GHz
  • 13. Example : Ray-Tracing Intel Core i7 860 2.80GHz
  • 14. Example : Ray-Tracing 스레드 개수가 많아질 수록 성능향상의 정도는 줄어든다. 스레드가 너무 많아지면 속도가 조금 빨라질 수는 있지만 응답성이 떨어진다. 프로세서 개수 대비 적당한 스레드 개수를 정해야한다. (프로그램의 성격, 환경마다 다를 것)
  • 15. 스레딩 모델 문제를 스레드를 이용해 병렬처리로 해결하고자 할 때 스레드를 사용하는 방식 Boss / Worker Model Client / Server Model Pipeline Model
  • 16. Boss / Worker Model Boss 스레드(일반적으로 Main Thread)가 여러 개의 Worker 스레드에게 작업을 나누어 주는 방식 병렬처리에서 가장 흔한 방식
  • 18. Client / Server Model 동시에 여러 개의 클라이언트들의 요구를 처리하기 위해서 스레드를 연결된 클라이언트마다 생성한다. 변형된 방법으로 스레드 풀을 사용한 클라이언트/서버 모델이 있다.
  • 20. Pipeline Model 각 스레드 또는 스레드들의 그룹은 주어진 작업에 대한 특정한 처리를 수행하고, 그것을 다른 스레드에 넘겨서 나머지 처리가 일어나게 한다. 공장의 조립라인과 흡사한 방식.
  • 22. 참고 자료 뇌를 자극하는 윈도우 시스템 프로그래밍(한빛미디어, 윤성우) Windows 시스템 프로그래밍 3판(정보문화사, Johnson M. Hart) 인텔 스레딩 빌딩 블록(지앤선, James Reinders) Operating System Concepts 7th(홍릉과학출판사, Silberschatz)
  • 23. Q&A BIO HAZARD 5(CAPCOM) – MT Framework Engine