-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moss: Prime vfs cache on boot via systemd service
This should serve to make the first blit after boot run against a hot vfs cache, which should improve the performance of the first blit for Serpent OS systems installed to ext4 or f2fs roots in particular. Neither ext4 nor f2fs blits will be as fast as xfs blits (though, surprisingly enough, ext4 blits come very close w/ hot blits), so xfs currently remains the recommended root filesystem for Serpent OS. Additionally, include a oneshot .service for testing the time to prime w/ a cold vfs cache. Per the request of @ikeycode this service is gated behind a `ConditionKernelCommandLine=moss.debug` flag, ensuring that it will never be started by accident. Users who need this sort of functionality can add a drop-in `/etc/kernel/cmdline.d/moss.debug.cmdline` snippet to access it. This PR was also rebased onto the main branch, which now shows blit stats on actions creating a new fstx. Signed-off-by: Rune Morling <[email protected]>
- Loading branch information
Showing
5 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
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
10 changes: 10 additions & 0 deletions
10
m/moss/pkg/moss-benchmark-time-to-prime-asset-store-vfs-cache.service
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,10 @@ | ||
[Unit] | ||
Description=Time to prime moss asset store in vfs cache in the background | ||
RequiresMountsFor=/ | ||
# Avoid the present service being started by accident and slowing down boot | ||
ConditionKernelCommandLine=moss.debug | ||
|
||
[Service] | ||
Type=oneshot | ||
ExecStart=/usr/bin/bash -c "sync && echo 3 > /proc/sys/vm/drop_caches" | ||
ExecStart=/usr/bin/bash -c "time nice -n20 ionice -c Idle find /.moss/assets |xargs --max-lines=1000 --max-procs=$(nproc) stat -t >/dev/null" |
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,10 @@ | ||
[Unit] | ||
Description=Prime moss asset store in vfs cache in the background | ||
RequiresMountsFor=/ | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/usr/bin/bash -c "time nice -n20 ionice -c Idle find /.moss/assets |xargs --max-lines=1000 --max-procs=$(nproc) stat -t >/dev/null" | ||
|
||
[Install] | ||
WantedBy=basic.target |
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