Sync FD limit and max maps to 500k
This commit is contained in:
committed by
mergify[bot]
parent
e2d66cf796
commit
11951eb009
@ -76,7 +76,7 @@ RestartForceExitStatus=SIGPIPE
|
|||||||
TimeoutStartSec=10
|
TimeoutStartSec=10
|
||||||
TimeoutStopSec=0
|
TimeoutStopSec=0
|
||||||
KillMode=process
|
KillMode=process
|
||||||
LimitNOFILE=65536
|
LimitNOFILE=500000
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -8,5 +8,5 @@ source "$HERE"/utils.sh
|
|||||||
ensure_env || exit 1
|
ensure_env || exit 1
|
||||||
|
|
||||||
# Allow more files to be opened by a user
|
# Allow more files to be opened by a user
|
||||||
sed -i 's/^\(# End of file\)/* soft nofile 65535\n\n\1/' /etc/security/limits.conf
|
echo "* - nofile 500000" > /etc/security/limits.d/90-solana-nofiles.conf
|
||||||
|
|
||||||
|
@ -3257,7 +3257,7 @@ fn adjust_ulimit_nofile() -> Result<()> {
|
|||||||
fn adjust_ulimit_nofile() -> Result<()> {
|
fn adjust_ulimit_nofile() -> Result<()> {
|
||||||
// Rocks DB likes to have many open files. The default open file descriptor limit is
|
// Rocks DB likes to have many open files. The default open file descriptor limit is
|
||||||
// usually not enough
|
// usually not enough
|
||||||
let desired_nofile = 65000;
|
let desired_nofile = 500000;
|
||||||
|
|
||||||
fn get_nofile() -> libc::rlimit {
|
fn get_nofile() -> libc::rlimit {
|
||||||
let mut nofile = libc::rlimit {
|
let mut nofile = libc::rlimit {
|
||||||
|
@ -93,7 +93,7 @@ fn tune_kernel_udp_buffers_and_vmmap() {
|
|||||||
sysctl_write("net.core.wmem_default", "134217728");
|
sysctl_write("net.core.wmem_default", "134217728");
|
||||||
|
|
||||||
// increase mmap counts for many append_vecs
|
// increase mmap counts for many append_vecs
|
||||||
sysctl_write("vm.max_map_count", "1000000");
|
sysctl_write("vm.max_map_count", "500000");
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
|
Reference in New Issue
Block a user