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
Situation Awareness
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

Changing Process ID Limits (kernel.pid_max)

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

Context

Process IDs (PIDs) are a fundamental resource on nodes. It is trivial to hit the task limit without hitting any other resource limits, which can then cause instability to a host machine.

You can adjust the PID limit (kernel.pid_max) according to service requirements.

kernel.pid_max Defaults

Starting from January 2022, CCE changes the default value of kernel.pid_max to 4194304 for EulerOS 2.5, CentOS 7.6, and Ubuntu 18.04 nodes in clusters of v1.17 or later. Specific conditions:

  • Cluster version: v1.17.17 or later
  • Node creation: after January 30, 2022

If the preceding two conditions are not met, kernel.pid_max on EulerOS 2.5, CentOS 7.6, and Ubuntu 18.04 nodes defaults to 32768.

Table 1 kernel.pid_max defaults

OS

Clusters of 1.17.9 and Earlier

Clusters of 1.17.17 and Later

Nodes Created on or Before January 30, 2022

Nodes Created After January 30, 2022

EulerOS 2.5

32768

32768

4194304

CentOS 7.6

32768

32768

4194304

Ubuntu 18.04

N/A

32768

4194304

EulerOS 2.3

57344

57344

57344

EulerOS 2.9

N/A

4194304

4194304

Change Suggestion

Viewing kernel.pid_max

Log in to the node and run the following command to obtain the value of kernel.pid_max:

sysctl kernel.pid_max

# sysctl kernel.pid_max
kernel.pid_max = 32768

Change kernel.pid_max, if necessary, as instructed in Changing kernel.pid_max of a Node.

Checking Node PIDs

Log in to the node and run the following command to check how many PIDs are in use:

ps -eflL | wc -l

# ps -eflL | wc -l
691

Changing kernel.pid_max of a Node

Log in to the node and run the following command. 4194304 indicates the value of kernel.pid_max and is used as an example here.

echo kernel.pid_max = 4194304 >> /etc/sysctl.conf && sysctl -p

echo 4194304 > /sys/fs/cgroup/pids/kubepods/pids.max

Run the following commands to check whether the returned value is the same as that you configured:

# sysctl kernel.pid_max
kernel.pid_max = 4194304
# cat /sys/fs/cgroup/pids/kubepods/pids.max
4194304

Configuring kernel.pid_max When Creating a Node Pool

EulerOS 2.3: Configuration required.

EulerOS 2.5, CentOS 7.6, and Ubuntu 18.04: Configuration required for clusters of v1.17.9 and earlier. Configuration NOT required for clusters of v1.17.17 and later because the value has been changed.

You can configure kernel.pid_max in the pre-installation script to create a node from a node pool.

When creating a node pool, choose Advanced Settings > Post-installation Command and add the following command:

echo kernel.pid_max = 4194304 >> /etc/sysctl.conf && sysctl -p

Configuring kernel.pid_max When Creating a Node

EulerOS 2.3: Configuration required.

EulerOS 2.5, CentOS 7.6, and Ubuntu 18.04: Configuration required for clusters of v1.17.9 and earlier. Configuration NOT required for clusters of v1.17.17 and later because the value has been changed.

You can configure kernel.pid_max by using the pre-installation script when creating a node.

Choose Advanced Settings > Post-installation Command and add the following command:

echo kernel.pid_max = 4194304 >> /etc/sysctl.conf && sysctl -p

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