summaryrefslogtreecommitdiff
path: root/meta-phosphor/recipes-support/rng-tools
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2019-05-16 11:05:58 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-05-21 05:28:23 +0300
commit1987be716cba85cdc1f210ceddc957a87b03be27 (patch)
treee252dc7e9b175ed4193da78d5cffbd0589abbe04 /meta-phosphor/recipes-support/rng-tools
parentfa8e052aa422cd74532c62567bf28fd7e1981165 (diff)
downloadopenbmc-1987be716cba85cdc1f210ceddc957a87b03be27.tar.xz
rng-tools: Lower niceness of rngd
This gives more CPU time to the daemons and requests are are more important to run in a timely matter. We can see that we reach ipmid coming up and multi-user ~20s faster on an ast2500. Before priority reduction: root@zaius:~# journalctl -u phosphor-ipmi-host -o short-monotonic -- Logs begin at Thu 2019-05-16 07:27:57 UTC, end at Thu 2019-05-16 07:31:25 UTC. -- [ 86.855857] zaius systemd[1]: Starting Phosphor Inband IPMI... [ 91.624926] zaius ipmid[1423]: JSON file not found [ 93.436815] zaius systemd[1]: Started Phosphor Inband IPMI. [ 94.615676] zaius ipmid[1423]: Loading whitelist filter [ 94.686476] zaius ipmid[1423]: Set restrictedMode = false [ 95.791197] zaius ipmid[1423]: New interface mapping root@zaius:~# journalctl -u multi-user.target -o short-monotonic -- Logs begin at Thu 2019-05-16 07:27:57 UTC, end at Thu 2019-05-16 07:31:25 UTC. -- After priority reduction: [ 106.580622] zaius systemd[1]: Reached target Multi-User System. root@zaius:~# journalctl -u phosphor-ipmi-host -o short-monotonic -- Logs begin at Thu 2019-05-16 07:38:53 UTC, end at Thu 2019-05-16 07:41:20 UTC. -- [ 70.097045] zaius systemd[1]: Starting Phosphor Inband IPMI... [ 73.578294] zaius ipmid[1423]: JSON file not found [ 75.026965] zaius systemd[1]: Started Phosphor Inband IPMI. [ 76.143958] zaius ipmid[1423]: Loading whitelist filter [ 76.301370] zaius ipmid[1423]: Set restrictedMode = false [ 76.945443] zaius ipmid[1423]: Command in process, no attention [ 77.062437] zaius ipmid[1423]: New interface mapping root@zaius:~# journalctl -u multi-user.target -o short-monotonic -- Logs begin at Thu 2019-05-16 07:38:53 UTC, end at Thu 2019-05-16 07:41:20 UTC. -- [ 83.550371] zaius systemd[1]: Reached target Multi-User System. (From meta-phosphor rev: fb85bf908cf4106e131dafdb653064cb34106992) Change-Id: Ie22e5044bb0ef2d2f893a98f657e2083a1789e26 Signed-off-by: William A. Kennington III <wak@google.com> Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-phosphor/recipes-support/rng-tools')
-rw-r--r--meta-phosphor/recipes-support/rng-tools/rng-tools/10-nice.conf6
-rw-r--r--meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend13
2 files changed, 19 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-support/rng-tools/rng-tools/10-nice.conf b/meta-phosphor/recipes-support/rng-tools/rng-tools/10-nice.conf
new file mode 100644
index 000000000..de71db451
--- /dev/null
+++ b/meta-phosphor/recipes-support/rng-tools/rng-tools/10-nice.conf
@@ -0,0 +1,6 @@
+[Service]
+# Make the priority of the random number generator seeding
+# process nearly the lowest on the system but allow
+# daemons to have lower priority if desired. This makes our
+# system much more responsive during boot.
+Nice=18
diff --git a/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend b/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend
new file mode 100644
index 000000000..16add36d8
--- /dev/null
+++ b/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend
@@ -0,0 +1,13 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+SRC_URI += "file://10-nice.conf"
+
+inherit systemd
+
+FILES_${PN} += "${systemd_unitdir}/system/rngd.service.d"
+
+do_install_append() {
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -d ${D}${systemd_unitdir}/system/rngd.service.d
+ install -m 644 ${WORKDIR}/10-nice.conf ${D}${systemd_unitdir}/system/rngd.service.d
+ fi
+}