SlideShare ist ein Scribd-Unternehmen logo
1 von 40
Downloaden Sie, um offline zu lesen
Apache Hadoop YARN勉強会
8. Capacity Scheduler in YARN
Shuya Tsukamoto
2016/09/08
Apache Hadoop YARN勉強会
今回は8章
Capacity Scheduler in YARN
複数の組織・ユーザでクラスタを共有する話
Hadoop ver.1
Capacity Scheduling自体はVersion1時代からある概念
CapacityTaskScheduler
Ver1のリソース単位はスロット, Ver2はコンテナ
Ver2のCapacitySchedulerの概念の多くはVer1のCapacityTaskSchedulerを継承している
Capacity Scheduler Configuration
Capacity Scheduler Configuration
YARNではCapacitySchedulerがデフォルト
明示的に変更する必要がある場合は、ResourceManager上のyarn-site.xmlの以下を変更
yarn.resourcemanager.scheduler.class
org.apache.hadoop.yarn.server.resourcemanager.scheduler.capacity.CapacityScheduler
Capacity Scheduler Configuration
CapacitySchedulerはcapacity-scheduler.xmlに依存
capacity-scheduler.xmlを変更した後で、以下のコマンドで実行中に適用可能
yarn rmadmin -refreshQueues
クラスタの管理者(yarn.admin.aclで設定されたユーザ)のみ実行可能
Queues
Queues
YARNのスケジューリングの基本単位がqueue
queueは様々なユーザによって投稿されたアプリケーションの論理的集合か、複数の
キューの組み合わせのどちらか
CapacityScheduler内のqueueは以下のプロパティを持つ
Queues
● A short queue name
● A full queue path name
● A list of child queues and applications associated with them
● Guaranteed capacity of the queue
● Maximum capacity to which a queue can grow
● A list of active users and the corresponding limits of sharing between users
● State of the queue
● ACLs governing the access to the queue
いろいろあるけど全部後の節で詳しく語られる
Hierarchical Queues
Hierarchical Queues
2種類のQueue
● parent queues
● leaf queues
parent queues
● 組織やサブ組織のリソース管理を可能にする
● 親queueや葉queueを含むことができる
● 直接アプリケーションの投稿を受けることはできない
● 最上位の親queue(ROOTのところ?)はROOT queueと呼ばれる
● クラスタ自体を意味する
leaf queues
● 親queueの下にいる
● アプリケーションの投稿を受け付ける
● 子はいない
parent/leaf queuesで何ができる?
管理者は様々な組織・サブ組織にキャパシティ割当できる(詳細後述)
30%60%10%
Scheduling Among Queues
ROOT queueはfirst level親queue間で配るキャパシティの量と、
子queueスケジューリングの実行を理解している
各親queueも同じキャパシティ制約に従う
葉queueは同時に1ユーザがそのqueue内で取得できるリソースの制限を配慮しつつ、アク
ティブなアプリケーションのリストを持つ...?(自信なし)
(potentially from multiple users, and schedule resources)
Defining Hierarchical Queues
Hadoop ver1時代はフラットなqueueだったが、階層的に
ユニークなqueue pathsが必要
ROOT queueからドット区切りで記述(例、後述)
Queue Access Control
Queue Access Control
(Linux)ユーザ・グループごとにqueueへのアクセスを制御可能
yarn.scheduler.capacity.root.finance-wizards.acl_submit_applications
で設定可能
フォーマットは
カンマ区切りのユーザ名と半角スペースとカンマ区切りのグループ名
または
アスタリスク
Queue Access Control
e.g. “sherlock,pacioli cfo-group”
sherlock,pacioliユーザとcfo-groupグループがアクセス可能
e.g. “ cfo-group”
cfo-groupグループがアクセス可能
e.g. “*”
全員アクセス可能
Capacity Management with Queues
Capacity Management with Queues
複数の親queues, 葉queues(つまり複数の組織)がある中で、どうやってキャパシティを割り
当てるかの話
一言で言うとqueueごとに比率を設定して分配
Capacity Management with Queues
Capacity Management with Queues
yarn.scheduler.capacity.root.grumpy-engineers.capacity = 60
同様にfinance-wizards = 10, marketing-moguls = 30
(合計は100%以下でなければならない)
Capacity Management with Queues
葉queues にも設定可能
yarn.scheduler.capacity.root.grumpy-engineers.infinite-monkeys.capacity = 20
同様にpesky-testers = 80
Capacity Management with Queues
クラスタ全体で1000GBのキャパシティがあると想定
grumpy-engineersは60%なので600GB
infinite-monkeys 20%, pesky-testers 80%なので、それぞれ
120GB, 480GB割り当てられる
User Limits
User Limits
葉queueには様々なユーザによって投稿されたアプリケーションのスケジューリングを公平
にする責任もある
ユーザに対してキャパシティの制限をかけることができる
e.g.
yarn.scheduler.capacity.root.finance-wizards.thrifty-treasurers.minimum-user-limit-perce
nt
20
User Limits
thrifty-treasurersで各ユーザが利用できるキャパシティの下限が20%
2ユーザがアプリを投稿した場合は50%ずつ、3ユーザなら33%ずつ
5ユーザなら20%ずつ
6ユーザなら6人目は待たされる
User Limits
yarn.scheduler.capacity.root.finance-wizards.user-limit-factor
queueに設定されたキャパシティを越えてリソース確保できる度合い?(自身なし)
値が2なら、通常の2倍確保可能
Reservations
Reservations
大量にリソースを利用する大きいアプリがqueueに積まれたが、空きが無い場合
他の小さいアプリを実行するといつまでも空きができず、
大きいアプリが実行できない
予約という仕組みで解決
(翻訳間に合わず)
State of the Queues
State of the Queues
queueにはRUNNINGとSTOPPEDの2つの状態がある
デフォルトはRUNNING
STOPPEDだとアプリケーション投稿を受け付けない
親queueも葉queueも停止可能
親queueを停止すると子孫のqueueuも無効に
State of the Queues
設定例
yarn.scheduler.capacity.root.finance-wizards.state
RUNNING
ユーザが他のキューを利用するように移行するときなどに使える
現在実行中のアプリの完了を待ちつつ、新規実行を停止できる
Limits on Applications
Limits on Applications
投稿されたアプリケーションの最大数の制限(running + pending)
デフォルトは10000
アクシデントや悪意のあるユーザによる手に負えない負荷に起因するスラッシン
グ?(system thrash)を防ぐためのもの
yarn.scheduler.capacity.maximum-applications で調整可能
yarn.scheduler.capacity.<queue-path>.maximum-applications で上書き可能
Limits on Applications (ApplicationMaster)
ApplicationMaster(AM)が大量に立ち上がってコンテナリリース待ち(cross-application
deadlock)になるとマズい
AMがクラスタ内で利用できるリソースの制限。デフォルト10%
yarn.scheduler.capacity.maximum-am-resource-percent
これも
yarn.scheduler.capacity.<queue-path>.maximum-am-resource-percent
で上書き可能
User Interface
User Interface
Capacity schedulerとともにResourceManager(RM)が開始されるとschedulerのページも見
れるようになる。
いつもの。

Weitere ähnliche Inhalte

Andere mochten auch

07 logistic regression and stochastic gradient descent
07 logistic regression and stochastic gradient descent07 logistic regression and stochastic gradient descent
07 logistic regression and stochastic gradient descent
Subhas Kumar Ghosh
 
Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014
Tsuyoshi OZAWA
 
Treasure Data on The YARN - Hadoop Conference Japan 2014
Treasure Data on The YARN - Hadoop Conference Japan 2014Treasure Data on The YARN - Hadoop Conference Japan 2014
Treasure Data on The YARN - Hadoop Conference Japan 2014
Ryu Kobayashi
 

Andere mochten auch (20)

07 logistic regression and stochastic gradient descent
07 logistic regression and stochastic gradient descent07 logistic regression and stochastic gradient descent
07 logistic regression and stochastic gradient descent
 
Hadoop Scheduling - a 7 year perspective
Hadoop Scheduling - a 7 year perspectiveHadoop Scheduling - a 7 year perspective
Hadoop Scheduling - a 7 year perspective
 
Scale 12 x Efficient Multi-tenant Hadoop 2 Workloads with Yarn
Scale 12 x   Efficient Multi-tenant Hadoop 2 Workloads with YarnScale 12 x   Efficient Multi-tenant Hadoop 2 Workloads with Yarn
Scale 12 x Efficient Multi-tenant Hadoop 2 Workloads with Yarn
 
Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive

Apache Kudu: Technical Deep Dive


Apache Kudu: Technical Deep Dive


 
Securing the Data Hub--Protecting your Customer IP (Technical Workshop)
Securing the Data Hub--Protecting your Customer IP (Technical Workshop)Securing the Data Hub--Protecting your Customer IP (Technical Workshop)
Securing the Data Hub--Protecting your Customer IP (Technical Workshop)
 
Architecting a multi-tenanted platform
Architecting a multi-tenanted platform Architecting a multi-tenanted platform
Architecting a multi-tenanted platform
 
The Vortex of Change - Digital Transformation (Presented by Intel)
The Vortex of Change - Digital Transformation (Presented by Intel)The Vortex of Change - Digital Transformation (Presented by Intel)
The Vortex of Change - Digital Transformation (Presented by Intel)
 
Using Big Data to Transform Your Customer’s Experience - Part 1

Using Big Data to Transform Your Customer’s Experience - Part 1
Using Big Data to Transform Your Customer’s Experience - Part 1

Using Big Data to Transform Your Customer’s Experience - Part 1

 
Analyzing Hadoop Data Using Sparklyr

Analyzing Hadoop Data Using Sparklyr
Analyzing Hadoop Data Using Sparklyr

Analyzing Hadoop Data Using Sparklyr

 
Effective Spark on Multi-Tenant Clusters
Effective Spark on Multi-Tenant ClustersEffective Spark on Multi-Tenant Clusters
Effective Spark on Multi-Tenant Clusters
 
Part 1: Cloudera’s Analytic Database: BI & SQL Analytics in a Hybrid Cloud World
Part 1: Cloudera’s Analytic Database: BI & SQL Analytics in a Hybrid Cloud WorldPart 1: Cloudera’s Analytic Database: BI & SQL Analytics in a Hybrid Cloud World
Part 1: Cloudera’s Analytic Database: BI & SQL Analytics in a Hybrid Cloud World
 
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
Hadoop Operations Powered By ... Hadoop (Hadoop Summit 2014 Amsterdam)
 
Top 5 IoT Use Cases
Top 5 IoT Use CasesTop 5 IoT Use Cases
Top 5 IoT Use Cases
 
Multi-Tenant Operations with Cloudera 5.7 & BT
Multi-Tenant Operations with Cloudera 5.7 & BTMulti-Tenant Operations with Cloudera 5.7 & BT
Multi-Tenant Operations with Cloudera 5.7 & BT
 
Data Engineering: Elastic, Low-Cost Data Processing in the Cloud
Data Engineering: Elastic, Low-Cost Data Processing in the CloudData Engineering: Elastic, Low-Cost Data Processing in the Cloud
Data Engineering: Elastic, Low-Cost Data Processing in the Cloud
 
Part 1: Lambda Architectures: Simplified by Apache Kudu
Part 1: Lambda Architectures: Simplified by Apache KuduPart 1: Lambda Architectures: Simplified by Apache Kudu
Part 1: Lambda Architectures: Simplified by Apache Kudu
 
Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014Taming YARN @ Hadoop conference Japan 2014
Taming YARN @ Hadoop conference Japan 2014
 
Treasure Data on The YARN - Hadoop Conference Japan 2014
Treasure Data on The YARN - Hadoop Conference Japan 2014Treasure Data on The YARN - Hadoop Conference Japan 2014
Treasure Data on The YARN - Hadoop Conference Japan 2014
 
Gartner Data and Analytics Summit: Bringing Self-Service BI & SQL Analytics ...
 Gartner Data and Analytics Summit: Bringing Self-Service BI & SQL Analytics ... Gartner Data and Analytics Summit: Bringing Self-Service BI & SQL Analytics ...
Gartner Data and Analytics Summit: Bringing Self-Service BI & SQL Analytics ...
 
Enabling the Connected Car Revolution

Enabling the Connected Car Revolution
Enabling the Connected Car Revolution

Enabling the Connected Car Revolution

 

Mehr von Shuya Tsukamoto (6)

AdTech Scala Meetup 7 spray-can
AdTech Scala Meetup 7 spray-canAdTech Scala Meetup 7 spray-can
AdTech Scala Meetup 7 spray-can
 
Kamonを理解する
Kamonを理解するKamonを理解する
Kamonを理解する
 
bean-validation-scala
bean-validation-scalabean-validation-scala
bean-validation-scala
 
Scala勉強会 2015 02_03
Scala勉強会 2015 02_03Scala勉強会 2015 02_03
Scala勉強会 2015 02_03
 
とりあえず使うScalaz
とりあえず使うScalazとりあえず使うScalaz
とりあえず使うScalaz
 
Scala勉強会_2014_11_18
Scala勉強会_2014_11_18Scala勉強会_2014_11_18
Scala勉強会_2014_11_18
 

Kürzlich hochgeladen

Kürzlich hochgeladen (12)

NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
NewSQLの可用性構成パターン(OCHaCafe Season 8 #4 発表資料)
 
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアルLoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
LoRaWAN スマート距離検出デバイスDS20L日本語マニュアル
 
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
LoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイスLoRaWANスマート距離検出センサー  DS20L  カタログ  LiDARデバイス
LoRaWANスマート距離検出センサー DS20L カタログ LiDARデバイス
 
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その32024/04/26の勉強会で発表されたものです。
 
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
論文紹介:Selective Structured State-Spaces for Long-Form Video Understanding
 
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
論文紹介: The Surprising Effectiveness of PPO in Cooperative Multi-Agent Games
 
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
論文紹介:Video-GroundingDINO: Towards Open-Vocabulary Spatio-Temporal Video Groun...
 
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
知識ゼロの営業マンでもできた!超速で初心者を脱する、悪魔的学習ステップ3選.pptx
 
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
Observabilityは従来型の監視と何が違うのか(キンドリルジャパン社内勉強会:2022年10月27日発表)
 
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
Amazon SES を勉強してみる その22024/04/26の勉強会で発表されたものです。
 
Utilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native IntegrationsUtilizing Ballerina for Cloud Native Integrations
Utilizing Ballerina for Cloud Native Integrations
 
新人研修 後半 2024/04/26の勉強会で発表されたものです。
新人研修 後半        2024/04/26の勉強会で発表されたものです。新人研修 後半        2024/04/26の勉強会で発表されたものです。
新人研修 後半 2024/04/26の勉強会で発表されたものです。
 

Apache hadoop yarn 勉強会 8. capacity scheduler in yarn