Skip to content

Files

Latest commit

9e021ee · Jan 28, 2021

History

History
250 lines (247 loc) · 40.8 KB

tuning_params_os.csv

File metadata and controls

250 lines (247 loc) · 40.8 KB
1
Categoryname (Parameter to be adjusted)desc (Parameter description)get (Command for querying parameter values.)set (Command for setting parameter values)needrestart(Whether require restart or not)type (discrete/continuous)options (For the discrete type, use";"to split different values.)dtype (For discrete, the parameter value type can only be int or string.)scope (Minimum value of the parameter)scope (Maximum Value of the parameter)step (Step of the parameter value)items (Enumerated values out of parameter values. Use ";" to split different values)select (whether to select the parameter)
2
Kernel scheduling parameterskernel.sched_migration_cost_nsThis variable is used to determine whether a process is still hot. If the running time of a process is shorter than the value of this variable, the kernel considers that the code of the process is still in the cache. Therefore, the process is still hot and is not considered during migration.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1000005000000100000yes
3
kernel.sched_cfs_bandwidth_slice_usFixed size of the time slice applied for from the global time poolsysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1000500001000yes
4
kernel.sched_wakeup_granularity_nsThis variable indicates the base of the minimum time that a process should run after it is woken up. The smaller the base, the higher the probability of preemption.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10000001000000001000000yes
5
kernel.sched_latency_nsMaximum running time of a running process.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10000001000000001000000yes
6
kernel.sched_nr_migrateHow Many Processes Can Be Moved to Another CPU at a Time When Load Balancing Is Performed in the Case of Multiple CPUs?sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint11281yes
7
kernel.sched_min_granularity_nsMinimum running time of a process on the CPU. During this time, the kernel does not proactively select other processes for scheduling (in nanoseconds).sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10000001000000001000000yes
8
kernel.sched_tunable_scalingUpdate method used when the kernel attempts to adjust the values of sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 indicates that the value is not adjusted, and the value 1 indicates that the value is adjusted based on the number of CPUs, 2: The linear proportion is adjusted based on the number of CPUs.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1; 2stringyes
9
Network adapter parameterstransparent_hugepage.defragEnabling or Disabling Transparent Hugepagescat /sys/kernel/mm/transparent_hugepage/defrag | sed -n 's/.*\[\(.*\)\].*/\1/p'echo $value > /sys/kernel/mm/transparent_hugepage/defragFALSEdiscretealways;defer;defer+madvise;madvise;neverstringyes
10
transparent_hugepage.enabledEnabling or Disabling Transparent Hugepagescat /sys/kernel/mm/transparent_hugepage/enabled | sed -n 's/.*\[\(.*\)\].*/\1/p'echo $value > /sys/kernel/mm/transparent_hugepage/enabledFALSEdiscretealways; madvise; neverstringyes
11
net.netfilter.nf_conntrack_maxMaximum number of tracing connections When a container is used, the nf_conntrack module cannot be disabled. Therefore, kernel parameters related to nf_conntrack need to be added to the /etc/sysctl.conf file to prevent packet loss caused by full table records.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint0671088641yes
12
net.mtuIndicates the maximum transmission unit of the network,ifconfig @netdev | grep mtu | awk '{print $4}'ifconfig @netdev mtu $valueFALSEdiscreteint5009000500yes
13
net.tx-framesConfiguring NIC Interrupt Combinationethtool -c @netdev | grep tx-frames: | awk '{print $2}'ethtool -C @netdev tx-frames $valueFALSEdiscreteint0642yes
14
net.rx-framesConfiguring NIC Interrupt Combinationethtool -c @netdev | grep rx-frames: | awk '{print $2}'ethtool -C @netdev rx-frames $valueFALSEdiscreteint0642yes
15
net.tx-usecsConfiguring NIC Interrupt Combinationethtool -c @netdev | grep tx-usecs: | awk '{print $2}'ethtool -C @netdev tx-usecs $valueFALSEdiscreteint2642yes
16
net.rx-usecsConfiguring NIC Interrupt Combinationethtool -c @netdev | grep rx-usecs: | awk '{print $2}'ethtool -C @netdev rx-usecs $valueFALSEdiscreteint2642yes
17
net.combinedSet the length and number of NIC queues.ethtool -l @netdev | grep Combined | awk '{print $2}' | tail -n 1ethtool -L @netdev combined $valueFALSEdiscreteint1321yes
18
net.adaptive-rxSets whether to enable interrupt combination auto-sensing for a NIC.ethtool -c @netdev | grep Adaptive | awk '{print $3}'ethtool -C @netdev adaptive-rx $valueFALSEdiscreteon; offstringyes
19
net.adaptive-txSets whether to enable interrupt combination auto-sensing for a NIC.ethtool -c @netdev | grep Adaptive | awk '{print $5}'ethtool -C @netdev adaptive-tx $valueFALSEdiscreteon; offstringyes
20
net.tx-ring buffer sizeIndicates the ring buffer size of the NIC.ethtool -g @netdev | tail -n 2 | head -n 1 | awk '{print $2}'ethtool -G @netdev tx $valueFALSEdiscreteint25616384256yes
21
net.rx-ring buffer sizeIndicates the ring buffer size of the NIC.ethtool -g @netdev | tail -n 5 | head -n 1 | awk '{print $2}'ethtool -G @netdev rx $valueFALSEdiscreteint25616384256yes
22
net.generic-receive-offloadWhether reassembling small packets into larger onesethtool -k @netdev | grep "generic-receive-offload" | awk '{print $2}'ethtool -K @netdev gro $valueFALSEdiscreteon;offstringyes
23
net.generic-segmentation-offloadWhether reassembling small packets into larger onesethtool -k @netdev | grep "generic-segmentation-offload" | awk '{print $2}'ethtool -K @netdev gso $valueFALSEdiscreteon;offstringyes
24
net.tcp-segmentation-offloadWheth allow a device to segment a single frame into multiple frames with a data payload size specified in skb_shinfo()->gso_size.ethtool -k @netdev | grep "tcp-segmentation-offload" | awk '{print $2}'ethtool -K @netdev tso $valueFALSEdiscreteon;offstringyes
25
sunrpc.tcp_slot_table_entriesThe Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint42564no
26
sunrpc.udp_slot_table_entriesThe Linux NFS client controls the number of concurrent NFS requests. If this parameter is set to a small value, the I/O performance is poor. By default, the maximum value of this parameter for the compiled kernel is 256. You can increase the value of this parameter to achieve better performance.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint42564no
27
Kernel resource parameterskernel.pid_maxMaximum process ID.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint104857641943041048576yes
28
kernel.shmmniMaximum number of shared memory segments in the system.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1024163841024yes
29
kernel.shmmaxThe maximum size, in bytes, of the shared memory segment allowed by the system.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint171798691846871947673617179869184yes
30
kernel.shmallThe total amount of shared memory available on the system in bytessysctl -n @namesysctl -w @name=$valueFALSEdiscreteint107374182485899345921073741824yes
31
kernel.core_uses_pidWhether to add the application pid to the core file name as an extension. 0: no 1: addsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
32
kernel.msgmniSystem Message Queue Lengthsysctl -n @namesysctl -w @name=$valueFALSEdiscreteint80001280008000yes
33
kernel.msgmaxMaximum number of bytes of a single message in a message queue.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint409610485764096yes
34
kernel.msgmnbMaximum length of bytes in a single message queuesysctl -n @namesysctl -w @name=$valueFALSEdiscreteint409610485764096yes
35
kernel.semThe file contains four values: 1. Maximum number of signals of the same type (semmsl) 2. Maximum number of signals in the system, =semmni*semmsl (semmns) 3. Maximum number of operations (maximum number of semaphores that can be invoked) contained in each system invoking (semopm) 4. Maximum number of signal types in the system. A signal identifier represents a type (semmni).sysctl -n @namesysctl -w @name=$valueFALSEdiscrete16000 512000000 256 16000;32000 1024000000 500 32000;64000 2048000000 1000 64000stringyes
36
kernel.hung_task_timeout_secsTimeout interval of a hung_task (in seconds). When a process is in the TASK_UNINTERRUPTIBLE state for a period longer than the timeout interval, a hung_task occurs.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint30120030yes
37
kernel.nmi_watchdogEnabling nmi_watchdog 0: disabled 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
38
kernel.sched_rt_runtime_usThis parameter, together with sched_rt_period, determines the period of the real-time process.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint950000100000010000yes
39
kernel.timer_migrationDisable Clock Migrationsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
40
kernel.threads-maxMaximum number of processes (including threads) in the systemsysctl -n @namesysctl -w @name=$valueFALSEdiscreteint65536065536000655360yes
41
kernel.sysrqThe file specifies a non-zero value, which activates the sysrq key on the keyboard.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
42
kernel.sched_autogroup_enabledWhen enabled, the kernel creates task groups to optimize desktop program scheduling. 0: disabled 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
43
kernel.numa_balancingSpecifies whether to enable NUMA automatic balancing.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
44
kernel.randomize_va_spaceSetting Memory Address Randomizationsysctl -n @namesysctl -w @name=$valueFALSEdiscreteint021yes
45
kernel.dmesg_restrictWhich users are restricted from viewing syslogs? 0: no restriction 1: Only privileged users can view the information.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0;1stringyes
46
Virtual memory and buffer/cache parametersvm.swappinessA larger value indicates that the swap partition is used more actively. A smaller value indicates that the memory is used more actively.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint01001yes
47
vm.vfs_cache_pressureIndicates the tendency of the kernel to reclaim the memory used for directory and inode cache.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint050050yes
48
vm.dirty_background_ratioWhen the percentage of dirty pages reaches dirty_background_ratio, the write function wakes up the flusher thread of the kernel to write back dirty page data until the percentage is less than the value of dirty_background_ratio.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint01001yes
49
vm.dirty_ratioThe percentage of dirty data in the memory cannot exceed this value.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint01001yes
50
vm.stat_intervalVM information update frequency (in seconds)sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint11001yes
51
vm.dirty_expire_centisecsExpiration time of dirty data. When the flusher thread of the kernel is woken up after the expiration time, dirty data is written back to the disk. The unit is 1% second.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1001000100yes
52
vm.dirty_writeback_centisecsSets the interval for waking up the flusher kernel thread. This thread is used to write dirty pages back to the disk. The unit is 1% second.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1001000100yes
53
vm.overcommit_ratioWhen overcommit_memory is set to 2, the percentage of physical RAM that is considered is set.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint010010yes
54
vm.overcommit_memoryIndicates whether to allow excessive memory allocation. The process can allocate more memory than it actually uses.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
55
vm.min_free_kbytesSize of memory reserved in each memory area, in KB.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10240102400010240yes
56
vm.page-clusterNumber of pages written to the swap partition each time.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint081yes
57
vm.max_map_countDefines the maximum memory area that a process can have.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10000010000000100000yes
58
vm.zone_reclaim_modeThis parameter is valid only when CONFIG_NUMA is enabled. zone_reclaim_mode is used to control how to reclaim memory when the memory domain OOM is enabled.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1; 2; 4stringyes
59
vm.watermark_scale_factorControls the radical degree of the kswapd process, that is, how much memory needs to be released for the system (NUMA node) from wakeup to hibernation.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10100010yes
60
vm.numa_statThis command is used to set the data statistics during NUMA running. When the memory is insufficient, this command can be set to 0 to reduce the statistics precision.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
61
vm.drop_cachesReleases the cache. The cache is released each time the parameter is modified.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete1; 2; 3stringyes
62
File system parametersfs.inotify.max_user_watchesSets the number of processes for each user to run the inotifywait or inotifywatch command.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint40968192004096yes
63
fs.nr_openMaximum number of file handles that can be concurrently opened by a processsysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10240102400010240yes
64
fs.file-maxNumber of file handles that can be opened by all processes in the system at the same timesysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10240010240000102400yes
65
fs.aio-max-nrMaximum number of AIO requestssysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10240010240000102400yes
66
fs.inotify.max_user_instancesMaximum number of inotify instances that can be started by each usersysctl -n @namesysctl -w @name=$valueFALSEdiscreteint646553564yes
67
fs.suid_dumpableThis value can be used to query and set the core dump mode for setuid or otherwise protected/tainted binaries. 0: default 1: debug 2: suidsafesysctl -n @namesysctl -w @name=$valueFALSEdiscreteint021yes
68
Block storage device parametersblockdevDisk prefetch settings/sbin/blockdev --getra /dev/@block/sbin/blockdev --setra $value /dev/@blockFALSEdiscreteint021474836488yes
69
block.low_latencyEnables (1) or disables (0) the low latency modecat /sys/block/@block/queue/iosched/low_latencyecho $value > /sys/block/@block/queue/iosched/low_latencyFALSEdiscrete0;1stringno
70
block.fifo_batchThis parameter is valid only for the Deadline scheduling policy. The number of read or write operations issued in a single batch. The default value is 16. The higher the value, the higher the throughput, but also increases the latency.cat /sys/block/@block/queue/iosched/fifo_batchecho $value > /sys/block/@block/queue/iosched/fifo_batchFALSEdiscreteint11281yes
71
block.front_mergesThis parameter is valid only for the Deadline scheduling policy. When a new request enters the queue, it can be merged if the requested sector is close to the current sector. The merge can be backward or forward. In some scenarios, forward merging is unnecessary. In this case, you can set this parameter to disable forward merging. By default, the deadline supports forward merging. If this parameter is set to 0, forward merging is disabled.cat /sys/block/@block/queue/iosched/front_mergesecho $value > /sys/block/@block/queue/iosched/front_mergesFALSEdiscrete0;1stringyes
72
block.read_expireThis parameter is valid only for the Deadline scheduling policy. This parameter specifies the expiration time of a read request, in milliseconds.cat /sys/block/@block/queue/iosched/read_expireecho $value > /sys/block/@block/queue/iosched/read_expireFALSEdiscreteint1001000100yes
73
block.write_expireThis parameter is valid only for the Deadline scheduling policy. This parameter specifies the expiration time of a write request, in milliseconds.cat /sys/block/@block/queue/iosched/write_expireecho $value > /sys/block/@block/queue/iosched/write_expireFALSEdiscreteint1000500010000no
74
block.writes_starvedThis parameter is valid only for the Deadline scheduling policy. This parameter specifies the number of read requests that can be sent after the read and write queues are not empty. A larger value indicates a higher priority for read batch processing.cat /sys/block/@block/queue/iosched/writes_starvedecho $value > /sys/block/@block/queue/iosched/writes_starvedFALSEdiscreteint1101yes
75
block.back_seek_maxThis parameter is valid only for the CFQ/BFQ scheduling policy. Maximum range of backward addressing for the headcat /sys/block/@block/queue/iosched/back_seek_maxecho $value > /sys/block/@block/queue/iosched/back_seek_maxFALSEdiscreteint409610485764096no
76
block.back_seek_penaltyThis parameter is valid only for the CFQ/BFQ scheduling policy. Penalty coefficient for backward addressing. This value is compared with forward addressing. The preceding two parameters are set to prevent slow addressing caused by head seek jitter.cat /sys/block/@block/queue/iosched/back_seek_penaltyecho $value > /sys/block/@block/queue/iosched/back_seek_penaltyFALSEdiscreteint1161no
77
block.fifo_expire_asyncThis parameter is valid only for the CFQ/BFQ scheduling policy. Sets the timeout period of an asynchronous request. Synchronous requests and asynchronous requests are processed in different queues. During scheduling, the cfq process processes synchronous requests first and then asynchronous requests unless the asynchronous requests meet the preceding conditions.cat /sys/block/@block/queue/iosched/fifo_expire_asyncecho $value > /sys/block/@block/queue/iosched/fifo_expire_asyncFALSEdiscreteint50100050no
78
block.fifo_expire_syncThis parameter is valid only for the CFQ/BFQ scheduling policy. Set the timeout period of the synchronization request.cat /sys/block/@block/queue/iosched/fifo_expire_syncecho $value > /sys/block/@block/queue/iosched/fifo_expire_syncFALSEdiscreteint2550025no
79
block.timeout_syncThis parameter is valid only for the CFQ/BFQ scheduling policy. The maximum time allocated to a device. When the addressing time of a device is long, increasing the time can improve the throughput.cat /sys/block/@block/queue/iosched/timeout_syncecho $value > /sys/block/@block/queue/iosched/timeout_syncFALSEdiscreteint16102416no
80
block.max_budgetThis parameter is valid only for the CFQ/BFQ scheduling policy. Maximum number of queue services that can be allocated to a queuecat /sys/block/@block/queue/iosched/max_budgetecho $value > /sys/block/@block/queue/iosched/max_budgetFALSEdiscreteint000no
81
block.slice_idleThis parameter is valid only for the CFQ/BFQ scheduling policy. A wait time is set. This allows the cfq to wait for a period of time before switching the cfq_queue or service tree to improve the throughput of the HDD.cat /sys/block/@block/queue/iosched/slice_idleecho $value > /sys/block/@block/queue/iosched/slice_idleFALSEdiscreteint0162no
82
block.slice_idle_usThis parameter is valid only for the CFQ/BFQ scheduling policy. Waiting time, in microseconds.cat /sys/block/@block/queue/iosched/slice_idle_usecho $value > /sys/block/@block/queue/iosched/slice_idle_usFALSEdiscreteint1000160001000no
83
block.strict_guaranteesThis parameter is valid only for the CFQ/BFQ scheduling policy. When the request queue is empty, the request queue remains idle.cat /sys/block/@block/queue/iosched/strict_guaranteesecho $value > /sys/block/@block/queue/iosched/strict_guaranteesFALSEdiscrete0;1stringno
84
block.read_lat_nsecThis parameter is valid only for the Kyber scheduling policy. Target delay of the read request, in ns.cat /sys/block/@block/queue/iosched/read_lat_nsceecho $value > /sys/block/@block/queue/iosched/read_lat_nsecFALSEdiscreteint10000001000000001000000no
85
block.write_lat_nsecThis parameter is valid only for the Kyber scheduling policy. Target delay of a synchronous write request, in ns.cat /sys/block/@block/queue/iosched/write_lat_nsececho $value > /sys/block/@block/queue/iosched/write_lat_nsecFALSEdiscreteint20000001000000002000000no
86
block.io_poll_delayIf polling is enabled, this parameter controls which type of polling is performed. The default value is -1, indicating traditional polling. In this mode, the CPU will not give up any time to repeatedly ask for completion. If set to 0, the mixed polling mode is used, and the kernel attempts to guess when the I/O is complete based on the training. Based on this guess, the kernel puts the process that made the IO request to sleep for a period of time before entering a traditional polling cycle. This mode may be slower than the purely traditional polling mode, but it may be more efficient. If this value is set to a value greater than 0, the kernel sets the process that issued the IO request to sleep for so many microseconds before entering a traditional poll.cat /sys/block/@block/queue/io_poll_delayecho $value > /sys/block/@block/queue/io_poll_delayFALSEdiscrete0;-1stringno
87
block.io_pollWhether to use polling or interrupt processing for block devices. The polling policy is preferred for NVMe SSD devices.cat /sys/block/@block/queue/io_pollecho $value > /sys/block/@block/queue/io_pollFALSEdiscrete0; 1stringno
88
block.max_sectors_kbSpecifies the maximum size (in kilobytes) of the I/O request. The default value is 512 KB.cat /sys/block/@block/queue/max_sectors_kbecho $value > /sys/block/@block/queue/max_sectors_kbFALSEdiscreteint64102464yes
89
block.queue_depthBlock device queue depthcat /sys/block/@block/device/queue_depthecho $value > /sys/block/@block/device/queue_depthFALSEdiscreteint64102464yes
90
block.nr_requestsLimits the maximum number of read and write requests queued at the same time.cat /sys/block/@block/queue/nr_requestsecho $value > /sys/block/@block/queue/nr_requestsFALSEdiscreteint128204864yes
91
block.read_ahead_kbDefines the number of kilobytes that the operating system will prefetch during the sequential read operation phase to store information that may be needed immediately in the page cache.cat /sys/block/@block/queue/read_ahead_kbecho $value > /sys/block/@block/queue/read_ahead_kbFALSEdiscreteint0655361024yes
92
block.rq_affinityWhether I/O can be performed on different processors is not limited to the processor that sends the I/O request.cat /sys/block/@block/queue/rq_affinityecho $value > /sys/block/@block/queue/rq_affinityFALSEdiscrete0; 1; 2stringyes
93
block.add_randomSome I/O events affect the entropy pool of /dev/random.cat /sys/block/@block/queue/add_randomecho $value > /sys/block/@block/queue/add_randomFALSEdiscrete0; 1stringyes
94
block.rotationalWhether the storage device is a mechanical hard disk. If the storage device is a solid state disk, set this parameter to 0.cat /sys/block/@block/queue/rotationalecho $value > /sys/block/@block/queue/rotationalFALSEdiscrete0; 1stringyes
95
block.schedulerConfigure I/O scheduling. Deadline or noop is more suitable for MySQL database scenarios.cat /sys/block/@block/queue/scheduler | sed -n 's/.*\[\(.*\)\].*/\1/p'echo $value > /sys/block/@block/queue/schedulerFALSEdiscretemq-deadline; kyber; bfq; nonestringyes
96
block.write_cacheWhether to use the write back or write through cache policycat /sys/block/@block/queue/write_cacheecho $value > /sys/block/@block/queue/write_cacheFALSEdiscretewrite back; write throughstringyes
97
block.nomergesMost workloads benefit from request merges. However, disabling merges helps for debugging purposes. You can set this parameter to 0 to disable combination. Enabled by default (set to 1).cat /sys/block/@block/queue/nomergesecho $value > /sys/block/@block/queue/nomergesFALSEdiscrete0; 1; 2stringyes
98
Parameters related to the network software stacknet.core.netdev_budgetNumber of network packets processed in each software interruptsysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1001000100yes
99
net.core.optmem_maxMaximum size of the buffer allowed by each socket(in bytes). sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint2048020480020480yes
100
net.core.wmem_maxThe maximum size of the system socket write buffer is increased to prevent buffer overflow caused by a large number of new connections. As a result, connections cannot be established. The default value is 229376. You are advised to change the value to 16777216. sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1048576671088641048576yes
101
net.core.wmem_defaultDefault TCP send window size (bytes) sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint819210485768192yes
102
net.core.rmem_defaultSets the default buffer size (bytes) of the receive socket. sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint819210485768192yes
103
net.core.rmem_maxMaximum system socket read buffer The default value is 229376. You are advised to change the value to 16777216.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1048576671088641048576yes
104
net.core.netdev_max_backlogMaximum number of packets that can be sent to the queue when each network interface receives packets faster than the kernel processes them sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10001000001000yes
105
net.ipv4.tcp_thin_linear_timeoutsCheck whether the TCP stream is thin after the retransmission times out. sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0;1stringyes
106
net.unix.max_dgram_qlenMaximum number of datagrams in a UDP queue sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1281048576128yes
107
net.core.somaxconnDefines the maximum length of the listening queue of each port in the system. This is a global parameter. The default value is 128. You are advised to change the value to 1024. sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint12865536128yes
108
net.core.busy_pollTimeout interval for performing the poll and select operations on network devices (us) by default. The value is determined by the number of sockets. sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint020010yes
109
net.core.busy_readTimeout interval for reading data frames in the device frame queue (us) by default. The recommended value is 50. sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint020010yes
110
net.core.dev_weightMaximum number of network packets that can be processed by each CPU in an NAPI interrupt sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint16102416yes
111
net.ipv4.tcp_keepalive_intvlIndicates the frequency of sending TCP probe packets. The value multiplied by tcp_keepalive_probes indicates the duration when no TCP connection is available.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint3030015yes
112
net.ipv4.tcp_keepalive_probesThis file indicates the maximum number of times that TCP keepalive detection is performed before a TCP connection is discarded. Keep-alive connections are sent only when the SO_KEEPALIVE socket option is turned on. sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint31443yes
113
net.ipv4.tcp_keepalive_timeInterval for sending keepalive detection messages(in seconds). This parameter is used to check whether the TCP connection is valid. sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint60036000600yes
114
net.ipv4.tcp_tw_reuseThe value 1 indicates that TIME-WAIT sockets can be used for new TCP connections, and the value 0 indicates that TIME-WAIT sockets are disabled. sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0;1;2stringyes
115
net.ipv4.tcp_window_scalingThe window scaling defined in RFC 1323 is enabled. To support a TCP window larger than 64 KB, this parameter must be set to 1. The maximum size of a TCP window is 1 GB. This parameter takes effect only when both parties of a TCP connection are enabled. sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0;1stringyes
116
net.ipv4.tcp_fin_timeoutMaximum duration for a socket to remain in the FIN_WAIT_2 state.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint11201yes
117
net.ipv4.udp_memThe file saves three values: low: When the number of memory pages used by UDP is less than the value of this parameter, UDP does not release memory. assure: When the number of memory pages used by UDP exceeds the value of this parameter, UDP attempts to stabilize the memory usage and enters the pressure mode. When the memory usage is less than the value of low, UDP exits the pressure mode. high: indicates the number of pages that can be used by all UDP sockets to queue and buffer datagrams.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete12582912 16777216 25165824;25165824 33554432 50331648;50331648 100663296stringyes
118
net.ipv4.tcp_memTCP overall cache setting, which controls all TCP memory usage (in pages). The parameter indicates the no-pressure value of the TCP overall memory, the threshold for enabling the pressure mode, and the maximum usage value in sequence. This parameter is used to control whether the new cache is successfully allocated.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete6168306 8224411 12336612;12336612 16448822 24673224stringyes
119
net.ipv4.tcp_rmemSize of the read buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 87380 6291456. You are advised to change the value to 4096 87380 16777216.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete4096 16384 4194304;4096 32768 8388608;4096 65536 16777216stringyes
120
net.ipv4.tcp_wmemSize of the write buffer. The first value is the minimum value of the read buffer, the third value is the maximum value, and the middle value is the default value. The default value is 4096 16384 4194304. You are advised to change the value to 4096 65536 16777216.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete4096 16384 4194304;4096 32768 8388608;4096 65536 16777216stringyes
121
net.ipv4.tcp_fastopenWhether to enable the TCP quick open mode is to avoid the three-way handshake of hot requests. This greatly improves the performance in the scenario where small objects are moved.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete1; 2; 4stringyes
122
net.ipv4.tcp_synack_retriesFor the remote connection request SYN, the kernel sends a SYN + ACK packet to acknowledge the receipt of the previous SYN connection request packet. It's called a three-way handshake. This parameter determines the number of SYN+ACK packets sent by the kernel before the kernel discards the connection.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint3641yes
123
net.ipv4.tcp_syn_retriesNumber of times that the local device retransmits TCP SYN packets due to timeout. The value cannot be greater than 255. This parameter is valid only for outgoing connections. For incoming connections, this parameter is controlled by tcp_retries1.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint3641yes
124
net.ipv4.tcp_moderate_rcvbufWhether to adjust the receive buffer when receiving data 0: no adjustment 1: yessysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
125
net.ipv4.tcp_timestampsIndicates whether to enable the calculation of the RTT in a more accurate way than timeout retransmission (see RFC 1323). This option should be enabled for better performance. 0: no 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
126
net.ipv4.tcp_dsackIndicates whether to allow TCP to send two identical SACKs. 0: disabled 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
127
net.ipv4.tcp_fackEnables the forwarding acknowledgment. The selective acknowledgment (SACK) can be performed to reduce the occurrence of congestion. This option should also be enabled.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
128
net.ipv4.tcp_sackIndicates whether to enable the selective acknowledgment function. This function improves the performance by selectively responding to out-of-order received packets. In this way, the sender can send only lost packet segments. This function should be enabled for WAN communication, however, this increases the CPU usage. 0: no 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
129
net.ipv4.tcp_low_latencyAllows the TCP/IP stack to adapt to low latency in high throughput scenarios. This option is generally disabled. (But when building a Beowulf cluster, it helps to open it.) 0: disabled 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
130
net.ipv4.tcp_adv_win_scaleCalculating the Buffer Overheadsysctl -n @namesysctl -w @name=$valueFALSEdiscreteint041yes
131
net.ipv4.route.max_sizeMaximum number of entries in the routing cache. If the number of entries in the routing cache exceeds the maximum, the old entries are cleared.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint67108864208037478467108864yes
132
net.ipv4.tcp_max_tw_bucketsReduce the number of TIME_WAIT connections to prevent excessive TIME_WAIT connections from occupying network resources and increasing the latency. The default value is 2048. You are advised to change the value to 360000.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint32768104857632768yes
133
net.ipv4.tcp_max_syn_backlogIndicates the length of the SYN queue. A larger queue length can accommodate more network connections waiting for connections. The default value is 2048. You are advised to change the value to 8192.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint10242621441024yes
134
net.ipv4.tcp_max_orphansNumber of sockets that can be processed by the system and do not belong to any process. When a large number of connections need to be quickly established, pay attention to this parameter.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint655361677721665536yes
135
net.ipv4.tcp_ecnIndicates whether to enable the direct TCP congestion notification function. 0: disabled; 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1; 2stringyes
136
net.ipv4.ip_forwardIndicates whether to enable IPv4 IP forwarding. 0: disabled 1: enabledsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
137
net.ipv4.conf.default.rp_filterThe kernel sets the policy for responding to ARP queries.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
138
net.ipv4.ip_local_port_rangeThe range of available ports has been increased to prevent performance deterioration caused by continuous search of available ports for new connections when a large number of connections occupy ports.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete32768 60999; 1024 65535; 8192 65535stringyes
139
net.ipv4.tcp_no_metrics_saveAfter a TCP connection is closed, the saved parameters can be used to initialize the connection when the same connection is created next time as long as dst_entry is valid.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
140
net.ipv4.ip_default_ttlSpecifies the lifetime of IP packets sent from the local device. The value is an integer ranging from 0 to 128. The default value is 64.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint81288yes
141
net.ipv4.ip_no_pmtu_discSetting the MTU for Automatic Socket Detectionsysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
142
net.ipv4.tcp_retries2The number of retries required before discarding an active (established traffic condition) TCP connection. The default value is 15.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint3301yes
143
net.ipv4.tcp_orphan_retriesNumber of retries before the local end discards the TCP connection. The default value is 7.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint0151yes
144
net.ipv4.tcp_syncookiesIndicates whether to enable the TCP synchronization label (syncookie).sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
145
net.ipv4.tcp_reorderingMaximum number of reordered data packets in TCP flowssysctl -n @namesysctl -w @name=$valueFALSEdiscreteint2101yes
146
net.ipv4.tcp_retrans_collapseProvides compatibility for bugs on some printers. (Generally, this support is not required. You can disable it.)sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
147
net.ipv4.tcp_congestion_controlTCP congestion scheduling algorithmsysctl -n @namesysctl -w @name=$valueFALSEdiscretecubic; reno; bbrstringyes
148
net.ipv4.conf.default.promote_secondaries0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted. 1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
149
net.ipv4.conf.all.promote_secondaries0: When the primary IP address of an interface is removed, all secondary IP addresses are deleted. 1: When the primary IP address of an interface is removed, the secondary IP address becomes the primary IP address.sysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
150
net.ipv4.conf.all.accept_redirectsReceives and sends ICMP redirection messages. The default value is True for hosts and False for routers. 0: disabled 1: yessysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
151
net.ipv4.conf.default.accept_redirectsReceives and sends ICMP redirection messages. The default value is True for hosts and False for routers. 0: disabled 1: yessysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
152
net.ipv4.conf.all.secure_redirectsReceives only ICMP redirect messages sent to gateways in the default gateway list. 0: disabled 1: yessysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
153
net.ipv4.conf.default.secure_redirectsReceives only ICMP redirect messages sent to gateways in the default gateway list. 0: disabled 1: yessysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
154
net.ipv4.icmp_echo_ignore_broadcastsIgnore all received ICMP Echo request broadcasts. 0: not ignore 1: ignoresysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
155
net.nf_conntrack_maxMaximum number of ip_conntrack structures in the memorysysctl -n @namesysctl -w @name=$valueFALSEdiscreteint65536104857665536yes
156
net.netfilter.nf_conntrack_tcp_timeout_establishedTimeout interval for TCP in the established state (s)sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1080001728000108000yes
157
net.netfilter.nf_conntrack_tcp_timeout_close_waitTimeout interval for TCP in close wait state (s)sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint1524015yes
158
net.netfilter.nf_conntrack_tcp_timeout_fin_waitTimeout interval for TCP in the fin wait state (s)sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint3048030yes
159
net.netfilter.nf_conntrack_tcp_timeout_time_waitTimeout interval for TCP in time wait state (s)sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint3048030yes
160
net.ipv4.conf.default.forwardingEnable the forwarding function on the interface. 0: disabled 1: yessysctl -n @namesysctl -w @name=$valueFALSEdiscrete0; 1stringyes
161
net.core.rps_sock_flow_entriesRFS (Receiver Flow Control) extends the performance of RPS to increase the CPU cache hit ratio and reduce network latency.sysctl -n @namesysctl -w @name=$valueFALSEdiscreteint01310721024yes
162
net.ipv4.tcp_min_tso_segsMinimal number of segments per TSO frame.sysctl -n @namesysctl -w @name=$valueFALSEcontinuousint1161yes
163
otherslogin.UserTasksMaxLimit the maximum number of operating system tasks that can be run concurrently by each usercat /etc/systemd/logind.conf | grep -w "^UserTasksMax" | awk -F "=" '{print$2}'sed -i "s/UserTasksMax=.*/UserTasksMax=$value/" /etc/systemd/logind.confFALSEcontinuousint10241048576yes
164
ulimit.nofileMaximum number of files that can be used by a user.ulimit -nulimit -n $valueFALSEdiscreteint1024102401yes