All Products
Search
Document Center

Container Service for Kubernetes:Customize node pool OS parameters

Last Updated:Oct 28, 2026

When the default Linux OS parameters do not meet your workload requirements, customize the OS parameters of nodes at the node pool level to tune system performance. The system changes node configurations in batches: they take effect immediately on existing nodes, and newly added nodes use the new configuration.

Usage notes

This feature is supported only by version 1.28 or later of ACK managed clusters, ACK dedicated clusters (no longer available for new creation), and ACK Edge clusters. To upgrade a cluster, see Manually upgrade a cluster.

Notes

  • Dynamically modifying the OS configuration of a node can change the configuration of existing Pods on the node and trigger Pod recreation. Before you use this feature, make sure that your application provides high availability (HA).

  • Improper OS parameter adjustments change how the Linux kernel operates. This can degrade node performance or make a node unavailable, and in turn affect your workloads. Fully understand the purpose of each parameter before you modify it, and test the change thoroughly before you apply it in a production environment.

  • Do not delete sysctl configuration items. If you delete a configuration item directly, the configuration remains on the existing nodes.

Configure node pool OS parameters

Sysctl parameters and Transparent Huge Pages (THP) parameters can be configured for a node pool. All of these parameters can be configured by modifying configuration files. The THP parameters and some sysctl parameters can also be configured in the console or by using OpenAPI.

Configure using the console or OpenAPI

Console

Applying custom OS parameters changes the OS parameter configuration of existing nodes and may affect your workloads. Perform this operation during off-peak hours.

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Nodes > Node Pools.

  3. In the Actions column of the node pool list, click image> OS Configuration for the target node pool.

  4. Carefully read the notes on the current page. Click + Custom Parameters and select the parameters that you want to configure. Specify the nodes to configure and set Maximum Number of Nodes to Repair per Batch to a value up to 10. Then click Submit and follow the on-screen instructions to complete the operation.

    After you configure Maximum Number of Nodes to Repair per Batch, the OS configuration takes effect on nodes in batches. During execution, the Event History area shows the progress and lets you pause, resume, or cancel the job. Use the pause feature to validate the nodes that have been configured. When a job is paused, the nodes that are being configured continue until they are complete. Nodes that have not started do not receive the custom configuration until the job resumes.

    Important

    Complete the custom configuration job as soon as possible. A paused job is automatically canceled after seven days, and the associated event and log information is also cleared.

OpenAPI

In addition to the console, OS parameters can be customized by using the ModifyNodePoolNodeConfig operation.

Configure using a configuration file

ACK allows you to write custom parameters to /etc/sysctl.d/99-user-customized.conf. This file is reserved for custom configuration during node initialization and restart. The sysctl parameters written to this file take priority when the node restarts. They override the OS default values and the parameter values written by the node pool custom sysctl configuration feature.

Important

In addition to the precautions in the Notes section, adjusting sysctl parameters changes how the Linux kernel operates and can degrade node performance or make nodes unavailable, which affects normal workload operation. Fully assess the risks of a change, and test it in a non-production environment before you apply it in a production environment.

Existing nodes

For existing nodes in a node pool, log on to a node and modify the custom parameter configuration file. Then, manually run the sysctl -p /etc/sysctl.d/99-user-customized.conf command to apply the configuration.

Example configuration file (/etc/sysctl.d/99-user-customized.conf):

# Filesystem settings
fs.file-max = 2097152
fs.nr_open = 1048576

# Networking settings
net.core.somaxconn = 32768
net.ipv4.tcp_max_syn_backlog = 8096

# Memory / kernel settings
vm.max_map_count = 262144

Replace the parameter names and values with the ones you need for your workload.

New nodes (scale-out)

For nodes that the node pool adds during scale-out, add the script that writes the custom parameter configuration file to the Pre-defined Custom Data of the node pool. New nodes then use these custom parameter values by default. Configure this as follows.

In Pre-defined Custom Data of the node pool configuration, configure echo '${sysctl_key}=${sysctl_value}' > /etc/sysctl.d/99-user-customized.conf. Replace ${sysctl_key} and ${sysctl_value} with the actual values to write the custom configuration to a configuration file in the /etc/sysctl.d/ directory.

For more information, see Create and manage node pools.

image

Verify that changes took effect

After you apply custom OS parameters, verify that the changes took effect on your nodes.

  1. Log on to a node in the node pool. For more information, see Choose a connection method.

  2. Run the sysctl command to check the current value of a parameter. For example:

    sysctl fs.file-max

    Expected output:

    fs.file-max = 2097152
  3. For THP parameters, read the corresponding sysfs file. For example:

    cat /sys/kernel/mm/transparent_hugepage/enabled
  4. In the ACK console, check the Event History section of the node pool for the configuration task status.

sysctl parameter list

Note
  • The Default value in the following tables is the value that ACK sets by default when it initializes a node pool.

  • For the valid ranges of the following parameters, see the Linux kernel sysctl parameters documentation.

  • For parameters that are not yet supported in the console or by using OpenAPI, and for parameters that are not listed in the tables, see Configure using a configuration file to modify them.

Filesystem parameters

These parameters control file handle limits, inotify watches, and filesystem behavior. Tune these settings for I/O-intensive workloads or applications that open large numbers of files.

Field name

Description

Default value

Supported in the console or by OpenAPI

fs.aio-max-nr

Maximum number of asynchronous I/O operations.

65536

Yes

fs.file-max

Maximum number of file handles that the system can open.

2097152

Yes

fs.inotify.max_user_watches

Maximum number of inotify watches that a single user can create.

524288

Yes

fs.nr_open

Maximum number of file descriptors that each process can open.

This value should be less than the value of fs.file-max.

1048576

Yes

fs.inotify.max_user_instances

Limits the number of inotify instances that a single user can create to prevent resource exhaustion.

16384

No

fs.inotify.max_queued_events

Sets the number of file system (FS) events that can be buffered in the kernel queue.

16384

No

fs.may_detach_mounts

Allows the kernel to safely detach a mount point from a namespace while processes are still accessing it, which prevents the entire namespace from being locked.

1

No

Networking parameters

These parameters govern socket buffers, connection queuing, TCP memory, and ARP cache behavior. Tune these settings for high-traffic or high-concurrency workloads.

Field name

Description

Default value

Supported in the console or by OpenAPI

net.core.netdev_max_backlog

Maximum number of data packets that can be queued at INPUT when an interface receives data packets faster than the kernel can process them.

16384

Yes

net.core.optmem_max

Maximum ancillary buffer size allowed for each network socket, in bytes.

20480

Yes

net.core.rmem_max

Maximum receive buffer size for each network socket, in bytes.

16777216

Yes

net.core.wmem_max

Maximum send buffer size for each network socket, in bytes.

16777216

Yes

net.core.wmem_default

Default send buffer size for each network socket, in bytes.

212992

Yes

net.ipv4.tcp_mem

Amount of memory available to the TCP stack, measured in memory pages, which are typically 4 KB. This parameter consists of three integer values that represent the low, pressure, and high watermarks, and the values must be set in this exact order.

Dynamically calculated based on total system memory

Yes

net.ipv4.neigh.default.gc_thresh1

Minimum number of entries retained in the ARP cache. The system does not perform garbage collection when the number of cached entries is below this value.

System preset

Yes

net.ipv4.neigh.default.gc_thresh2

Maximum number of entries in the ARP cache. This is a soft limit. When the number of cached entries reaches this value, the system considers garbage collection but does not enforce it immediately. It waits for a 5-second delay.

1024

Yes

net.ipv4.neigh.default.gc_thresh3

Maximum number of entries retained in the ARP cache. This is a hard limit: when the number of cached entries reaches this value, the system immediately performs garbage collection. If the number of cached entries continues to exceed this value, the system keeps cleaning up entries.

8192

Yes

net.core.somaxconn

Sets the maximum number of connections in the socket listen queue to control concurrent connection capacity.

32768

No

net.ipv4.tcp_wmem

Configures the minimum, default, and maximum sizes of the TCP send buffer. Unit: bytes.

This setting directly affects the network throughput and memory consumption of TCP connections.

4096 12582912 16777216

No

net.ipv4.tcp_rmem

Configures the minimum, default, and maximum sizes of the TCP receive buffer. Unit: bytes.

This setting directly affects the network throughput and memory consumption of TCP connections.

4096 12582912 16777216

No

net.ipv4.tcp_max_syn_backlog

Limits the number of connection requests in the SYN queue that have not completed the three-way handshake.

8096

No

net.ipv4.tcp_slow_start_after_idle

Controls whether a TCP connection reuses the slow start algorithm after being idle for a long time.

0

No

net.ipv4.ip_forward

Enables IPv4 packet forwarding, which allows the system to act as a router and forward packets.

1

No

net.bridge.bridge-nf-call-iptables

Enables bridge devices to apply iptables Layer 3 rules when forwarding at Layer 2, so that network security policies take effect.

1

No

Memory and kernel parameters

These parameters control process limits, thread counts, memory mapping, and kernel diagnostics. Tune these settings when your workloads require a large number of processes or threads, or when you need to adjust kernel behavior for stability.

Field name

Description

Default value

Supported in the console or by OpenAPI

kernel.pid_max

Maximum number of PIDs that the system can allocate.

4194303

Yes

kernel.threads-max

Maximum number of threads that the system can create.

504581

Yes

user.max_user_namespaces

Maximum number of user namespaces that a single user can create.

0

Yes

kernel.softlockup_panic

When this parameter is set to 1 and a soft lockup occurs, the kernel triggers a panic and restarts the system to quickly restore its state.

1

No

kernel.softlockup_all_cpu_backtrace

When this parameter is set to 1, the system captures debug information from all CPUs if a soft lockup is detected, to help diagnose issues.

1

No

vm.max_map_count

Limits the number of memory mapping regions that a single process can have, preventing excessive memory use.

262144

No

THP parameter list

Transparent Huge Pages (THP) is a general feature of the Linux kernel that automatically combines small pages, typically 4 KB, into large pages, typically 2 MB or larger. This reduces the size of the Page Table Entries (PTEs) used for memory access and the number of memory accesses. It also relieves pressure on the Translation Lookaside Buffer (TLB) and improves memory access efficiency.

Note
  • All of the following parameters can be configured in the console or by using OpenAPI.

  • The default values of the following parameters vary by operating system and kernel version. For more information, see the Linux kernel THP parameters documentation.

Field name

Description

Possible values

transparent_enabled

Controls whether THP is enabled system-wide.

  • always: Enables THP system-wide.

  • never: Disables THP system-wide.

  • madvise: Enables THP only in memory regions where a madvise() system call sets the MADV_HUGEPAGE flag.

transparent_defrag

Controls whether to enable THP defragmentation. When enabled, small pages in memory can be combined into a large page, which reduces the page table size and improves system performance.

  • always: When the system cannot allocate a transparent huge page, it pauses memory allocation and always waits for direct memory reclamation and direct memory defragmentation. If enough contiguous free memory is available after reclamation and defragmentation, transparent huge page allocation continues.

  • defer: When the system cannot allocate a transparent huge page, it allocates a normal 4 KB page instead. The system also wakes the kswapd daemon to reclaim memory in the background, and wakes the kcompactd daemon to defragment memory in the background. After some time, if enough contiguous free memory is available, the khugepaged daemon can combine the previously allocated 4 KB pages into 2 MB transparent huge pages.

  • madvise: Memory allocation behaves as it does for always, but only in memory regions where a madvise() system call sets the MADV_HUGEPAGE flag.

    For all other memory regions, memory allocation remains the same: when a page fault occurs, a normal 4 KB page is allocated.

  • defer+madvise: Memory allocation behaves as it does for always, but only in memory regions where a madvise() system call sets the MADV_HUGEPAGE flag. For all other memory regions, memory allocation remains the same as defer.

  • never: Defragmentation is disabled.

khugepaged_defrag

khugepaged is a kernel thread that manages and defragments huge pages to reduce memory fragmentation and improve performance. It monitors huge pages in the system, and when it finds scattered huge pages, it attempts to combine them into larger pages to improve memory utilization and performance.

Because this operation performs locking in the memory path, and the khugepaged daemon can start scanning and converting huge pages at an unsuitable time, application performance can be affected.

  • 0: Disables khugepaged defragmentation.

  • 1: The khugepaged daemon periodically wakes up when the system is idle and attempts to combine contiguous 4 KB pages into 2 MB transparent huge pages.

khugepaged_alloc_sleep_millisecs

When a THP allocation fails, the khugepaged daemon waits for this amount of time before it attempts the next huge page allocation. This prevents consecutive huge page allocation failures within a short period. Unit: milliseconds.

See khugepaged defragmentation.

khugepaged_scan_sleep_millisecs

The interval at which the khugepaged daemon wakes up. Unit: milliseconds.

khugepaged_pages_to_scan

The number of memory pages that the khugepaged daemon scans after each wakeup. Unit: pages.