[user@machine ~]$ ulimit -a
real-time non-blocking time  (microseconds, -R) unlimited
core file size              (blocks, -c) unlimited
data seg size               (kbytes, -d) unlimited
scheduling priority                 (-e) 0
file size                   (blocks, -f) unlimited
pending signals                     (-i) 127205
max locked memory           (kbytes, -l) 8192
max memory size             (kbytes, -m) unlimited
open files                          (-n) 1024
pipe size                (512 bytes, -p) 8
POSIX message queues         (bytes, -q) 819200
real-time priority                  (-r) 0
stack size                  (kbytes, -s) 8192
cpu time                   (seconds, -t) unlimited
max user processes                  (-u) unlimited
virtual memory              (kbytes, -v) unlimited
file locks                          (-x) unlimited

# ulimit default nofile(-n) 
user       soft nofile 262143
user       hard nofile 262143


# nporc. 
# change ulimit -u to unlimited or increase it.

-bash: fork: retry: Resource temporarily unavailable
-bash: fork: retry: No child processes
-bash: fork: retry: No child processes
-bash: fork: retry: No child processes

[user@machine ~]$ ulimit -u
unlimited
[user@machine limits.d]$ cat /etc/security/limits.d/user1.conf 
# Default limit for number of user's processes to prevent
# accidental fork bombs.
# See rhbz #432903 for reasoning.

user1    soft    nproc unlimited
user1    hard    nproc unlimited



# tcp buffer

[user@machine ~]$ vim /etc/sysctl.d/100-custom.conf 
net.core.wmem_max = 67108864 
net.ipv4.tcp_wmem = 4096 2097152 67108864

[user@machine ~]$ sysctl -p /etc/sysctl.d/100-custom.conf


# allow TCP with buffers up to 64MB (64*1024*1024=67108864) 

net.core.rmem_max = 67108864 
net.core.wmem_max = 67108864 

# increase Linux autotuning TCP buffer limit to 32MB

net.ipv4.tcp_rmem = 4096 87380 33554432
net.ipv4.tcp_wmem = 4096 65536 33554432

# recommended for hosts with jumbo frames enabled

net.ipv4.tcp_mtu_probing=1

# recommended to use a 'fair queueing' qdisc (either fq or fq_codel)

net.core.default_qdisc = fq



For a host with a 10G NIC optimized for network paths up to 200ms RTT, and for friendliness to single and parallel stream tools, or a 40G NIC up on paths up to 50ms RTT:

# allow TCP with buffers up to 128MB

net.core.rmem_max = 134217728 
net.core.wmem_max = 134217728 


For a host with a 100G NIC optimized for network paths up to 200ms RTT, use this config:

# allow TCP with buffers up to 2GB (Max allowed in Linux is 2GB-1)
net.core.rmem_max=2147483647
net.core.wmem_max=2147483647

# https://fasterdata.es.net/host-tuning/linux/
# https://fasterdata.es.net/host-tuning/linux/test-measurement-host-tuning/ # max size 


vm.nr_hugepages = 16384 # hugepages on /etc/sysctl.d/


  • No labels
Write a comment…