Skip to content

Commit ae9fc7c

Browse files
committed
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, 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. This PR was also rebased onto newest main branch, which now shows blit stats on actions creating a new fstx. Signed-off-by: Rune Morling <[email protected]>
1 parent 767cd8a commit ae9fc7c

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

m/moss/manifest.x86_64.bin

13 Bytes
Binary file not shown.

m/moss/manifest.x86_64.jsonc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
"/usr/lib/kernel/cmdline.d/00-quiet.cmdline",
2020
"/usr/lib/kernel/cmdline.d/10-amdgpu.cmdline",
2121
"/usr/lib/moss/moss-fstx.sh",
22+
"/usr/lib/systemd/system/moss-benchmark-time-to-prime-asset-store-vfs-cache.service",
2223
"/usr/lib/systemd/system/moss-fstx.service",
24+
"/usr/lib/systemd/system/moss-prime-asset-store-vfs-cache.service",
2325
"/usr/share/bash-completion/completions/moss",
2426
"/usr/share/defaults/etc/profile.d/80-command-not-found.sh",
2527
"/usr/share/fish/completions/moss.fish",
@@ -63,6 +65,6 @@
6365
}
6466
},
6567
"source-name": "moss",
66-
"source-release": "76",
67-
"source-version": "0.25.1"
68+
"source-release": "77",
69+
"source-version": "0.25.1+git.0432b0a"
6870
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Unit]
2+
Description=Time to prime moss asset store in vfs cache in the background
3+
RequiresMountsFor=/
4+
5+
[Service]
6+
Type=oneshot
7+
ExecStart=/usr/bin/bash -c "sync && echo 3 > /proc/sys/vm/drop_caches"
8+
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"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=Prime moss asset store in vfs cache in the background
3+
RequiresMountsFor=/
4+
5+
[Service]
6+
Type=simple
7+
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"
8+
9+
[Install]
10+
WantedBy=basic.target

m/moss/stone.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
# SPDX-License-Identifier: MPL-2.0
55
#
66
name : moss
7-
version : 0.25.1
8-
release : 76
7+
version : '0.25.1+git.0432b0a'
8+
release : 77
99
summary : Serpent OS package manager
1010
license : MPL-2.0
1111
homepage : https://github.com/serpent-os/tools
1212
upstreams :
13-
- https://github.com/serpent-os/tools/archive/refs/tags/v0.25.1.tar.gz : d0a57de992f6ac7048328b70054c3d7e453778760a43ff322152afbbaee2a66b
13+
- git|https://github.com/serpent-os/tools.git : 0432b0a02ecae03ac3100c7c4401933817ddc35f
1414
description : |
1515
The new package manager with an old school feel. Traditional interaction
1616
and management whilst using brand new technologies, including efficient
@@ -61,3 +61,7 @@ install : |
6161
%install_file boot/module/module-setup.sh %(installroot)%(libdir)/dracut/modules.d/90moss/module-setup.sh
6262
%install_file boot/moss-fstx.service %(installroot)%(libdir)/systemd/system/moss-fstx.service
6363
%install_exe boot/moss-fstx.sh %(installroot)%(libdir)/moss/moss-fstx.sh
64+
65+
# Ensure that blits happen against hot vfs cache (quicker first blits)
66+
%install_file %(pkgdir)/moss-prime-asset-store-vfs-cache.service %(installroot)%(libdir)/systemd/system/moss-prime-asset-store-vfs-cache.service
67+
%install_file %(pkgdir)/moss-benchmark-time-to-prime-asset-store-vfs-cache.service %(installroot)%(libdir)/systemd/system/moss-benchmark-time-to-prime-asset-store-vfs-cache.service

0 commit comments

Comments
 (0)