hadoop叢集balance工具詳解

來源:互聯網
上載者:User

      線上上的hadoop叢集營運過程中,hadoop 的balance工具通常用於平衡hadoop叢集中各datanode中的檔案塊分布,以避免出現部分datanode磁碟佔用率高的問題(這問題也很有可能導致該節點CPU使用率較其他伺服器高)。

     1) hadoop balance工具的用法:

To start:bin/start-balancer.sh [-threshold <threshold>]Example: bin/ start-balancer.shstart the balancer with a default threshold of 10%bin/ start-balancer.sh -threshold 5start the balancer with a threshold of 5%To stop:bin/ stop-balancer.sh 

      2)影響hadoop balance工具的幾個參數:

             -threshold 預設設定:10,參數取值範圍:0-100,參數含義:判斷叢集是否平衡的目標參數,每一個 datanode 儲存使用率和叢集總儲存使用率的差值都應該小於這個閥值 ,理論上,該參數設定的越小,整個叢集就越平衡,但是線上上環境中,hadoop叢集在進行balance時,還在並發的進行資料的寫入和刪除,所以有可能無法到達設定的平衡參數值。

            dfs.balance.bandwidthPerSec  預設設定:1048576(1 M/S),參數含義:設定balance工具在運行中所能佔用的頻寬,設定的過大可能會造成mapred運行緩慢

     3)hadoop balance工具其他特點:

           balance工具在運行過程中,迭代的將檔案塊從高使用率的datanode移動到低使用率的datanode上,每一個迭代過程中移動的資料量不超過下面兩個值的較小者:10G或者指定閥值*容量,且每次迭代不超過20分鐘。每次迭代結束後,balance工具將更新該datanode的檔案塊分布情況。以下為官方文檔英文描述:

The  tool moves  blocks from  highly utilized datanodes  to  poorly utilized datanodesiteratively. In each iteration a datanode moves or receives no more than the lesser of 10Gbytes or the threshold fraction of its capacity. Each iteration runs no more than 20minutes. At the end of each iteration, the balancer obtains updated datanodes informationfrom the namenode.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.