hdfsのレプリケーション速度を上げる方法



How Increase Replication Speed Hdfs



序文

オンライン操作と保守のクラスタープロセスでは、データノードノードがダウンするという問題が発生します。デフォルトでは、10分を超えて応答がありません。 Namenodeは、このノードをデッドノードと見なし、レプリケーションの実行を開始します。 hdfsのWebページを観察すると、レプリケーション速度が非常に遅いことがわかります。

重要なデータに対してコピーアップ操作を実行するシナリオもあります。例:。この記事では、主にレプリケーション速度を向上させる方法を紹介します。



レプリケーション速度を向上させる

レプリケーション作業の速度は、通常のクラスターのロード中に障害が発生したときにクラスタートラフィックに干渉しないように、HDFSによって調整されます。

これを制御するいくつかのプロパティは、dfs.namenode.replication.work.multiplier.per.iteration、dfs.namenode.replication.max-streams、およびdfs.namenode.replication.max-streams-hard-limitです。最も重要なのは、発生するすべてのハートビートでDNにスケジュールされる作業の速度を制御し、他の2つは、DataNodeによって一度に実行される最大の並列スレッドネットワーク転送をさらに制限します。これについての説明は、https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/hdfs-default.xmlで入手できます。



特定の構成の説明を見てください。

dfs.namenode.replication.max-streams 2 Hard limit for the number of highest-priority replication streams. dfs.namenode.replication.max-streams-hard-limit 4 Hard limit for all replication streams. dfs.namenode.replication.work.multiplier.per.iteration 2 *Note*: Advanced property. Change with caution. This determines the total amount of block transfers to begin in parallel at a DN, for replication, when such a command list is being sent over a DN heartbeat by the NN. The actual number is obtained by multiplying this multiplier with the total number of live nodes in the cluster. The result number is the number of blocks to begin transfers immediately for, per DN heartbeat. This number can be any positive, non-zero integer.

したがって、クラスターの状況に応じて構成を適切に調整できます。たとえば、同時フローの制限を適切に増やすことができます。