-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
systemd: add patch to increase mount rate limit
Bottlerocket includes a lot of mount units, and the 5 mounts/s rate limit leads to several throttles during the boot process. The higher rate limit eliminates this, speeding up the boot by up to one second. Setting `SYSTEMD_DEFAULT_MOUNT_RATE_LIMIT_BURST` in the environment can also change the rate limit, but this must be done on the kernel command line. If we set it there by default, then it can't be tuned by system administrators using `settings.boot.kernel-parameters`. Signed-off-by: Ben Cressey <[email protected]>
- Loading branch information
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
packages/systemd/9012-core-mount-increase-mount-rate-limit-burst-to-25.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
From 1f8d86a74c09738eb000aacec6bbd74360177796 Mon Sep 17 00:00:00 2001 | ||
From: Ben Cressey <[email protected]> | ||
Date: Thu, 31 Aug 2023 19:14:13 +0000 | ||
Subject: [PATCH] core/mount: increase mount rate limit burst to 25 | ||
|
||
On systems where many mounts are set up on boot, the default rate | ||
limit is too low and leads to several stalls. | ||
|
||
Signed-off-by: Ben Cressey <[email protected]> | ||
--- | ||
src/core/mount.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/core/mount.c b/src/core/mount.c | ||
index d82092a..7ba009b 100644 | ||
--- a/src/core/mount.c | ||
+++ b/src/core/mount.c | ||
@@ -1928,7 +1928,7 @@ static void mount_enumerate(Manager *m) { | ||
mnt_init_debug(0); | ||
|
||
if (!m->mount_monitor) { | ||
- unsigned mount_rate_limit_burst = 5; | ||
+ unsigned mount_rate_limit_burst = 25; | ||
int fd; | ||
|
||
m->mount_monitor = mnt_new_monitor(); | ||
-- | ||
2.40.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters