Yang, Tong 6182f91ba8 MRS component operation guide_normal 2.0.38.SP20 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Yang, Tong <yangtong2@huawei.com>
Co-committed-by: Yang, Tong <yangtong2@huawei.com>
2022-12-09 14:55:21 +00:00

144 lines
17 KiB
HTML

<a name="mrs_01_0844"></a><a name="mrs_01_0844"></a>
<h1 class="topictitle1">Optimization Configuration for Multiple CPU Cores</h1>
<div id="body1590130629917"><div class="section" id="mrs_01_0844__sa122ff06bc974e94b1a3bb430719b056"><h4 class="sectiontitle">Scenario</h4><p id="mrs_01_0844__a05a49da902d142f78183d430417526c0">Optimization can be performed when the number of CPU cores is large, for example, the number of CPU cores is three times the number of disks.</p>
</div>
<div class="section" id="mrs_01_0844__s4825270f1f844a67a30fc2ee4f4410df"><h4 class="sectiontitle">Procedure</h4><p id="mrs_01_0844__a0134017fee9f415daaef0f9fa712be42">You can set the following parameters in either of the following ways:</p>
<ul id="mrs_01_0844__u8ed61d89a8674c53954eb1608a0379b2"><li id="mrs_01_0844__la7b654dab66f48f5a138dbbcef01a333">Configuration on the server:<p id="mrs_01_0844__p21172338305"><a name="mrs_01_0844__la7b654dab66f48f5a138dbbcef01a333"></a><a name="la7b654dab66f48f5a138dbbcef01a333"></a>On the <strong id="mrs_01_0844__b1992216341914">All Configurations</strong> page of the Yarn service, enter a parameter name in the search box. For details, see <a href="mrs_01_2125.html">Modifying Cluster Service Configuration Parameters</a>.</p>
</li><li id="mrs_01_0844__l25acd6127ad54f0e943ee0378f1353ae">Configuration on the client:<div class="p" id="mrs_01_0844__a956b6a00fe744b30abfe95dae1d08a86"><a name="mrs_01_0844__l25acd6127ad54f0e943ee0378f1353ae"></a><a name="l25acd6127ad54f0e943ee0378f1353ae"></a>Modify the corresponding configuration file on the client.<div class="note" id="mrs_01_0844__n5cdcfde77f51435f9c55f48148c02668"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_0844__ucae6331ef55a48c2800e6e63e238f278"><li id="mrs_01_0844__l4980bb1022dc46b990389adebe9b5227">Path of configuration files on the HDFS client: <em id="mrs_01_0844__i20543101815338">Client installation directory</em><strong id="mrs_01_0844__b88227152117">/HDFS/hadoop/etc/hadoop/hdfs-site.xml</strong></li></ul>
<ul id="mrs_01_0844__u2911754722034f98bc23ec0a791614e7"><li id="mrs_01_0844__ldb6461052eb744199b9f2740c258f5f4">Path of configuration files on the Yarn client: <em id="mrs_01_0844__i1959422213312">Client installation directory</em><strong id="mrs_01_0844__b1514281612149">/HDFS/hadoop/etc/hadoop/yarn-site.xml</strong>.</li></ul>
<ul id="mrs_01_0844__u87fafd8a30284a5b9fba5252582ec7fc"><li id="mrs_01_0844__l1f015bc5935c406fb7c8c9880307d154">Path of configuration files on the MapReduce client: <em id="mrs_01_0844__i589162683312">Client installation directory</em><strong id="mrs_01_0844__b114871336181320">/HDFS/hadoop/etc/hadoop/mapred-site.xml</strong>.</li></ul>
</div></div>
</div>
</li></ul>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_01_0844__t2da2cf9d47b3438c879b6a13024f2c69" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Settings of multiple CPU cores</caption><thead align="left"><tr id="mrs_01_0844__rdd4e8e00ed3841f49f0f0bacbe7bf798"><th align="left" class="cellrowborder" valign="top" width="9.340000000000002%" id="mcps1.3.2.4.2.8.1.1"><p id="mrs_01_0844__a31f667e57e4d4b57804099dfa2f1adee"><strong id="mrs_01_0844__b1628785712146">Configuration</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.290000000000003%" id="mcps1.3.2.4.2.8.1.2"><p id="mrs_01_0844__af71ef5a36f524451afb4d74d9c985a82"><strong id="mrs_01_0844__b156691616157">Description</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.860000000000007%" id="mcps1.3.2.4.2.8.1.3"><p id="mrs_01_0844__a6967752807114798b87c551cc5814552"><strong id="mrs_01_0844__b1546515291514">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.830000000000002%" id="mcps1.3.2.4.2.8.1.4"><p id="mrs_01_0844__ab540ba2069cd4a0da0fd7ed2e6aec489"><strong id="mrs_01_0844__b42712318156">Default Value</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.500000000000004%" id="mcps1.3.2.4.2.8.1.5"><p id="mrs_01_0844__a619e708d50e949b4a7a796adced999bf"><strong id="mrs_01_0844__ac58eedf71ef34c41aac2aa0b8f7b7f41">Server/Client</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.210000000000004%" id="mcps1.3.2.4.2.8.1.6"><p id="mrs_01_0844__a10b140d53eee40d4bc5d327739c8202c"><strong id="mrs_01_0844__b168418541513">Impact</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.970000000000002%" id="mcps1.3.2.4.2.8.1.7"><p id="mrs_01_0844__a9231a3bcd22d49c7a62417f9c8c7ea54"><strong id="mrs_01_0844__b1056310817158">Remarks</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="mrs_01_0844__r6d45e97a1bb544a78724a0801be8f766"><td class="cellrowborder" rowspan="3" valign="top" width="9.340000000000002%" headers="mcps1.3.2.4.2.8.1.1 "><p id="mrs_01_0844__acd2b74b46adc47d1aad119a7d1e0bc32">Number of slots in a node container</p>
</td>
<td class="cellrowborder" rowspan="3" valign="top" width="16.290000000000003%" headers="mcps1.3.2.4.2.8.1.2 "><p id="mrs_01_0844__acab1e4b81b5f4475adef574744fec526">The combination of the following parameters determines the number of concurrent tasks (Map and Reduce tasks) of each node:</p>
<ul id="mrs_01_0844__u4f765129d2a04bb6a3bb4be2304e8fb9"><li id="mrs_01_0844__lf46fb290a3484a199f0e8fe5385328b7">yarn.nodemanager.resource.memory-mb</li><li id="mrs_01_0844__l07a72337280d4d45be97999b10457aa9">mapreduce.map.memory.mb</li><li id="mrs_01_0844__l158772950b5a43d7ab843959e9e14d50">mapreduce.reduce.memory.mb</li></ul>
</td>
<td class="cellrowborder" valign="top" width="19.860000000000007%" headers="mcps1.3.2.4.2.8.1.3 "><p id="mrs_01_0844__aed4acb1e6bf14eb9ba444718deb9ec23">yarn.nodemanager.resource.memory-mb</p>
<div class="note" id="mrs_01_0844__n244cf0af613a4bafb893da80b9a3554c"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_0844__p02853240410">For versions earlier than MRS 3.x: You need to configure this parameter on the MRS console.</p>
<p id="mrs_01_0844__ae95e065fbbea4ef5b8b89ffabfa00f1f">For MRS 3.<em id="mrs_01_0844__i1793014218292">x</em> or later: You need to configure this parameter on FusionInsight Manager.</p>
</div></div>
<p id="mrs_01_0844__a86cb9afd36014e33a777f98e1195c250"></p>
</td>
<td class="cellrowborder" valign="top" width="9.830000000000002%" headers="mcps1.3.2.4.2.8.1.4 "><p id="mrs_01_0844__p165921219284">Versions earlier than MRS 3.<em id="mrs_01_0844__i175281130121110">x</em>:</p>
<p id="mrs_01_0844__a93f1c1f6440042f69cd804dea5d4c889">8192</p>
<p id="mrs_01_0844__p13197192210813">MRS 3.<em id="mrs_01_0844__i19428171910810">x</em> or later:</p>
<p id="mrs_01_0844__p4352230181">16384</p>
</td>
<td class="cellrowborder" valign="top" width="9.500000000000004%" headers="mcps1.3.2.4.2.8.1.5 "><p id="mrs_01_0844__abbc046726a20480e9560163029091ee5">Server</p>
</td>
<td class="cellrowborder" rowspan="3" valign="top" width="20.210000000000004%" headers="mcps1.3.2.4.2.8.1.6 "><p id="mrs_01_0844__ae058db46f20343a8a9a8547091316f2e">If data needs to be read from and written into disks for all tasks (Map/Reduce tasks), a disk may be accessed by multiple processes at the same time, which leads to poor disk I/O performance. To ensure disk I/O performance, the number of concurrent access requests from a client to a disk cannot exceed 3.</p>
</td>
<td class="cellrowborder" rowspan="3" valign="top" width="14.970000000000002%" headers="mcps1.3.2.4.2.8.1.7 "><p id="mrs_01_0844__a5e0e1e4335ae4669a7922261e7a3dae8">The maximum number of concurrent containers must be [2.5 x Number of disks configured in Hadoop].</p>
</td>
</tr>
<tr id="mrs_01_0844__r008296861ba54b9e8fb82a211704c6db"><td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.1 "><p id="mrs_01_0844__a181c0b81e48e41bf98bed984426649bb">mapreduce.map.memory.mb</p>
<div class="note" id="mrs_01_0844__n6bc08046bb35439fb09d22b1ec76e311"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_0844__aa2c808b3cefd4989820ab71d62b69e61">You need to set this parameter in the configuration file on the client in the <em id="mrs_01_0844__a401b3cf0efe04a9dbde28e9588b78207">Client installation directory</em><strong id="mrs_01_0844__b10599192194">/HDFS/hadoop/etc/hadoop/mapred-site.xml</strong> path.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.2 "><p id="mrs_01_0844__p840312176179">4096</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.3 "><p id="mrs_01_0844__a1f16ff0741b644a3929b7b7e34923a0e">Client</p>
</td>
</tr>
<tr id="mrs_01_0844__r448cf09faec3470b928146b8ca51fe01"><td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.1 "><p id="mrs_01_0844__a01203e5d270649c192ee7525ee8c6f89">mapreduce.reduce.memory.mb</p>
<div class="note" id="mrs_01_0844__n472ae56c93f042f1abc14ecd6750ec56"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_0844__a00048962479d43c0a53653d51350dd24">You need to set this parameter in the configuration file on the client in the <em id="mrs_01_0844__i65166426198">Client installation directory</em><strong id="mrs_01_0844__b3516104218198">/HDFS/hadoop/etc/hadoop/mapred-site.xml</strong> path.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.2 "><p id="mrs_01_0844__p102533510182">4096</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.3 "><p id="mrs_01_0844__aa2d80bd2078f4d9b8ebb3c72421641c4">Client</p>
</td>
</tr>
<tr id="mrs_01_0844__r23729c81564d4d67a38c2c3166605c3b"><td class="cellrowborder" rowspan="2" valign="top" width="9.340000000000002%" headers="mcps1.3.2.4.2.8.1.1 "><p id="mrs_01_0844__a65be3751492a4482b8678c4e8e54fe61">Map output and compression</p>
</td>
<td class="cellrowborder" rowspan="2" valign="top" width="16.290000000000003%" headers="mcps1.3.2.4.2.8.1.2 "><p id="mrs_01_0844__afac8d26f32c94423a881e0fad459219e">The Map task output before being written into disks can be compressed. This can save disk space, offer faster data write, and reduce the data traffic delivered to Reducer. You need to configure the following parameters on the client:</p>
<ul id="mrs_01_0844__u9d3fcf205fb54b868ad2409fa85cf725"><li id="mrs_01_0844__lf34ce54397a44306a63dcda90198dcee"><strong id="mrs_01_0844__b182511878241">mapreduce.map.output.compress</strong>: The Map task output can be compressed before it is transmitted over the network. It is a per-job configuration.</li><li id="mrs_01_0844__l8d5bacc1a3ea4180afdf8833cfebfaff"><strong id="mrs_01_0844__b147445132516">mapreduce.map.output.compress.codec</strong>: the codec used for data compression</li></ul>
</td>
<td class="cellrowborder" valign="top" width="19.860000000000007%" headers="mcps1.3.2.4.2.8.1.3 "><p id="mrs_01_0844__ad957bebdf8ef48488b15b9f4eefd50a8">mapreduce.map.output.compress</p>
<div class="note" id="mrs_01_0844__n63f5d3a969084e0b8a8e8fb19b9f72d1"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_0844__a45ab8141847540409c5d9900040ace0c">You need to set this parameter in the configuration file on the client in the <em id="mrs_01_0844__i167961744142510">Client installation directory</em><strong id="mrs_01_0844__b18797124452520">/HDFS/hadoop/etc/hadoop/mapred-site.xml</strong> path.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="9.830000000000002%" headers="mcps1.3.2.4.2.8.1.4 "><p id="mrs_01_0844__a4a2d200819394e848e3002f0221a36ff">true</p>
</td>
<td class="cellrowborder" valign="top" width="9.500000000000004%" headers="mcps1.3.2.4.2.8.1.5 "><p id="mrs_01_0844__a871b59fd94814c42a56593e6eed3c303">Client</p>
</td>
<td class="cellrowborder" rowspan="2" valign="top" width="20.210000000000004%" headers="mcps1.3.2.4.2.8.1.6 "><p id="mrs_01_0844__ac329dab77b9749a2b03c6e0a9d00e56e">The disk I/O is the bottleneck. Therefore, use a compression algorithm with a high compression rate.</p>
</td>
<td class="cellrowborder" rowspan="2" valign="top" width="14.970000000000002%" headers="mcps1.3.2.4.2.8.1.7 "><p id="mrs_01_0844__a1e9ab4b6eda144fb89cfbd838e261ecb">Snappy is used. The benchmark test results show that Snappy delivers high performance and efficiency.</p>
</td>
</tr>
<tr id="mrs_01_0844__r6d108916ca2a41d1981191c890b7803f"><td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.1 "><p id="mrs_01_0844__a629b95b79f3b4f80934182105f18b1ee">mapreduce.map.output.compress.codec</p>
<div class="note" id="mrs_01_0844__nf7160ae9bf58469e8378c0cbd8059e29"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_0844__acb34f0cd91f14ede9bb5454173820fee">You need to set this parameter in the configuration file on the client in the <em id="mrs_01_0844__i15266188172718">Client installation directory</em><strong id="mrs_01_0844__b112676816279">/HDFS/hadoop/etc/hadoop/mapred-site.xml</strong> path.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.2 "><p id="mrs_01_0844__aafdc1927e8d84943ac3eeae9806e5e17">org.apache.hadoop.io.compress.Lz4Codec</p>
</td>
<td class="cellrowborder" valign="top" headers="mcps1.3.2.4.2.8.1.3 "><p id="mrs_01_0844__a6249fc6c49ee422bbc11d02423797d6a">Client</p>
</td>
</tr>
<tr id="mrs_01_0844__r0b285bbbc136476a96408d41455c558e"><td class="cellrowborder" valign="top" width="9.340000000000002%" headers="mcps1.3.2.4.2.8.1.1 "><p id="mrs_01_0844__a2887a4c4f5c449eb87b7dcc9e333d646">Spills</p>
</td>
<td class="cellrowborder" valign="top" width="16.290000000000003%" headers="mcps1.3.2.4.2.8.1.2 "><p id="mrs_01_0844__a76325f03953d4338a8d3683eaa7516f7">mapreduce.map.sort.spill.percent</p>
</td>
<td class="cellrowborder" valign="top" width="19.860000000000007%" headers="mcps1.3.2.4.2.8.1.3 "><p id="mrs_01_0844__a770c97e1bbcc458c83e456dae1cbfada">mapreduce.map.sort.spill.percent</p>
<div class="note" id="mrs_01_0844__n7cfe18ad44494bb4b6a83c55123d0b5c"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_0844__adf3252b488fb4304b11ac84689b96a1e">You need to set this parameter in the configuration file on the client in the <em id="mrs_01_0844__i16675216202719">Client installation directory</em><strong id="mrs_01_0844__b1668012163275">/HDFS/hadoop/etc/hadoop/mapred-site.xml</strong> path.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="9.830000000000002%" headers="mcps1.3.2.4.2.8.1.4 "><p id="mrs_01_0844__a335393e239524d908fe7f107f90d42fc">0.8</p>
</td>
<td class="cellrowborder" valign="top" width="9.500000000000004%" headers="mcps1.3.2.4.2.8.1.5 "><p id="mrs_01_0844__a760267c626d4438a8d98fa7a2ff81a7b">Client</p>
</td>
<td class="cellrowborder" valign="top" width="20.210000000000004%" headers="mcps1.3.2.4.2.8.1.6 "><p id="mrs_01_0844__a2cd27386b36e483b9aebc1ded7eda439">Disk I/Os are the bottleneck. You can set the value of <span class="parmname" id="mrs_01_0844__pa0d0c48e54fc4f25bb2a5955e907b19b"><b>mapreduce.task.io.sort.mb</b></span> to minimize the memory spilled to the disk.</p>
</td>
<td class="cellrowborder" valign="top" width="14.970000000000002%" headers="mcps1.3.2.4.2.8.1.7 "><p id="mrs_01_0844__a0931fb92bbef4d36ba0d2ae5bbbaebea">-</p>
</td>
</tr>
<tr id="mrs_01_0844__r3b81f082e0c6495ab7840c881d0cfcf5"><td class="cellrowborder" valign="top" width="9.340000000000002%" headers="mcps1.3.2.4.2.8.1.1 "><p id="mrs_01_0844__a01d5858d71ad485b8b16efffff9d9a92">Data packet size</p>
</td>
<td class="cellrowborder" valign="top" width="16.290000000000003%" headers="mcps1.3.2.4.2.8.1.2 "><p id="mrs_01_0844__a62601a6a911246a89bb1d97e07806f8a">When the HDFS client writes data to a data node, the data will be accumulated until a packet is generated. Then, the packet is transmitted over the network. <strong id="mrs_01_0844__b38820226295">dfs.client-write-packet-size</strong> specifies the data packet size. It can be specified by each job.</p>
</td>
<td class="cellrowborder" valign="top" width="19.860000000000007%" headers="mcps1.3.2.4.2.8.1.3 "><p id="mrs_01_0844__acfdcdb9ba8654028a118affc56bb5cd9">dfs.client-write-packet-size</p>
<div class="note" id="mrs_01_0844__n52bf71630c554e749c20888245893d31"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="mrs_01_0844__a1ce93ea63569424093fe8cbdf0f4cbdb">You need to set this parameter in the configuration file on the client in the <em id="mrs_01_0844__i913214232915">Client installation directory</em><strong id="mrs_01_0844__b013719427298">/HDFS/hadoop/etc/hadoop/hdfs-site.xml/</strong> path.</p>
</div></div>
</td>
<td class="cellrowborder" valign="top" width="9.830000000000002%" headers="mcps1.3.2.4.2.8.1.4 "><p id="mrs_01_0844__aa6e330aeb8984f99b59b7b483e56535d">262144</p>
</td>
<td class="cellrowborder" valign="top" width="9.500000000000004%" headers="mcps1.3.2.4.2.8.1.5 "><p id="mrs_01_0844__af5f74bf167594dc39f213840cbfd0331">Client</p>
</td>
<td class="cellrowborder" valign="top" width="20.210000000000004%" headers="mcps1.3.2.4.2.8.1.6 "><p id="mrs_01_0844__a770339e3bcf24d4cbf0c107f17ca72a6">The data node receives data packets from the HDFS client and writes data into disks through single threads. When disks are in the concurrent write state, increasing the data packet size can reduce the disk seek time and improve the I/O performance.</p>
</td>
<td class="cellrowborder" valign="top" width="14.970000000000002%" headers="mcps1.3.2.4.2.8.1.7 "><p id="mrs_01_0844__a4bfdb628dd194500b1b93377c785fa28">dfs.client-write-packet-size = 262144</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_0843.html">MapReduce Performance Tuning</a></div>
</div>
</div>