Skip to content

Commit 91357a0

Browse files
committed
perf: increase global systemd NOFILE and MEMLOCK process limits
1 parent 96f070f commit 91357a0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

run_once_setup_fedora.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,17 @@ DNSSEC=yes
713713
EOF"
714714
$SUI_SUDO systemctl restart systemd-resolved
715715

716+
# Configure systemd session limits (DefaultLimitNOFILE and DefaultLimitMEMLOCK)
717+
echo "Optimizing systemd user and system session limits..."
718+
$SUI_SUDO mkdir -p /etc/systemd/system.conf.d/ /etc/systemd/user.conf.d/
719+
$SUI_SUDO bash -c "cat <<'EOF' > /etc/systemd/system.conf.d/limits.conf
720+
[Manager]
721+
DefaultLimitNOFILE=1048576
722+
DefaultLimitMEMLOCK=infinity
723+
EOF"
724+
$SUI_SUDO cp /etc/systemd/system.conf.d/limits.conf /etc/systemd/user.conf.d/limits.conf
725+
$SUI_SUDO systemctl daemon-reexec 2>/dev/null || true
726+
716727
# Btrfs Snapshot Rollbacks
717728
echo "Configuring Snapper and GRUB-Btrfs..."
718729
$SUI_SUDO dnf install -y snapper btrfs-assistant python3-dnf-plugin-snapper inotify-tools git make

0 commit comments

Comments
 (0)