Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page
Help Center/ MapReduce Service/ Component Operation Guide (Normal)/ Using MapReduce/ MapReduce Performance Tuning/ MapReduce Optimization Configuration for Multiple CPU Cores

MapReduce Optimization Configuration for Multiple CPU Cores

Updated on 2024-10-08 GMT+08:00

Scenario

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.

Procedure

You can set the following parameters in either of the following ways:

  • Configuration on the server:

    On the All Configurations page of the Yarn service, enter a parameter name in the search box. For details, see Modifying Cluster Service Configuration Parameters.

  • Configuration on the client:
    Modify the corresponding configuration file on the client.
    NOTE:
    • Path of configuration files on the HDFS client: Client installation directory/HDFS/hadoop/etc/hadoop/hdfs-site.xml
    • Path of configuration files on the Yarn client: Client installation directory/HDFS/hadoop/etc/hadoop/yarn-site.xml.
    • Path of configuration files on the MapReduce client: Client installation directory/HDFS/hadoop/etc/hadoop/mapred-site.xml.
Table 1 Settings of multiple CPU cores

Configuration

Parameter

Configuration Description

Number of slots in a node container

yarn.nodemanager.resource.memory-mb

  • Description: total physical memory that can be used by YARN on a node. The unit is MB.
  • Default value:

    Versions earlier than MRS 3.x:

    8192

    MRS 3.x or later:

    16384

  • Parameter configuration entry:

    For versions earlier than MRS 3.x, configure this parameter on the MRS console.

    For MRS 3.x or later: You need to configure this parameter on FusionInsight Manager.

  • The parameter combination determines the number of concurrent tasks (Map and Reduce tasks) on each node.
  • When multiple processes access the same disk simultaneously due to all Map/Reduce tasks requiring reading and writing data to a disk, it causes 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.
  • The maximum number of concurrent containers must be [2.5 x Number of disks configured in Hadoop].

mapreduce.map.memory.mb

  • Description: memory limit of a Map task. The unit is MB.
  • Default value: 4096
  • Parameter configuration entry: You need to set this parameter in the configuration file on the client in the Client installation directory/HDFS/hadoop/etc/hadoop/mapred-site.xml path.

mapreduce.reduce.memory.mb

  • Description: memory limit of a Reduce task. The unit is MB.
  • Default value: 4096
  • Parameter configuration entry: You need to set this parameter in the configuration file on the client in the Client installation directory/HDFS/hadoop/etc/hadoop/mapred-site.xml path.

Map output and compression

mapreduce.map.output.compress

  • Description: output of a Map task can be compressed before being transmitted over the network. It is a per-job configuration.
  • Default value: true
  • Parameter configuration entry: You need to set this parameter in the configuration file on the client in the Client installation directory/HDFS/hadoop/etc/hadoop/mapred-site.xml path.
  • Compressing the Map task output before writing it to disks can provide benefits such as saving disk space, faster data write, and reduced data traffic delivered to the Reducer. You need to perform the configuration on the client.
  • The disk I/O is the bottleneck. Therefore, use a compression algorithm with a high compression rate.
  • Snappy is used. The benchmark test results show that Snappy delivers high performance and efficiency.

mapreduce.map.output.compress.codec

  • Description: codec used for compression.
  • Default value: org.apache.hadoop.io.compress.Lz4Codec
  • Parameter configuration entry: You need to set this parameter in the configuration file on the client in the Client installation directory/HDFS/hadoop/etc/hadoop/mapred-site.xml path.

Spills

mapreduce.map.sort.spill.percent

  • Description: soft limit in the serialization buffer. Once this limit is reached, the thread will begin to overflow content to disk in the background.
  • Default value: 0.8
  • Parameter configuration entry: You need to set this parameter in the configuration file on the client in the Client installation directory/HDFS/hadoop/etc/hadoop/mapred-site.xml path.

Disk I/Os are the bottleneck. You can set the value of mapreduce.task.io.sort.mb to minimize the memory spilled to the disk.

Data packet size

dfs.client-write-packet-size

  • Description: size of the data packet. It can be specified by each job.
  • Default value: 262144
  • Parameter configuration entry: You need to set this parameter in the configuration file on the client in the Client installation directory/HDFS/hadoop/etc/hadoop/hdfs-site.xml path.
  • When the HDFS client writes data to a data node, the data will be accumulated until a packet is generated. The data packet is transmitted over the network.
  • 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.
  • dfs.client-write-packet-size = 262144

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback