-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Additionally, include a oneshot .service for testing the time to prime w/ a cold vfs cache. Signed-off-by: Rune Morling <[email protected]>
- Loading branch information
Showing
5 changed files
with
25 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
8 changes: 8 additions & 0 deletions
8
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,8 @@ | ||
[Unit] | ||
Description=Time to prime moss asset store in vfs cache in the background | ||
RequiresMount=/ | ||
|
||
[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