subagent and bash daemons: the runs' memory ceiling sits on their cgroup node, not on the unit
This commit is contained in:
parent
648076419f
commit
897f8af77d
1 changed files with 109 additions and 33 deletions
|
|
@ -31,7 +31,7 @@ if ! printf '%s\n' "$EXTRA_INIT" | grep -qxF '. /etc/hyperhive/memory-cap.sh'; t
|
|||
fail "/etc/set-environment does not source the snippet"
|
||||
fi
|
||||
|
||||
# check <description> <expected BUN_JSC_forceRAMSize or ""> <expected MemoryHigh or "">
|
||||
# check <description> <expected BUN_JSC_forceRAMSize or ""> <expected HIVE_RUNS_MEMORY_HIGH or "">
|
||||
# <why the boot check warns, or "">
|
||||
check() {
|
||||
case=$1
|
||||
|
|
@ -53,8 +53,8 @@ check() {
|
|||
# The subagent daemon and the bash daemon each get one, and nothing else is written.
|
||||
local unit
|
||||
for unit in hive-subagent-daemon hive-bash-daemon; do
|
||||
got=$(cat "$out/normal/$unit.service.d/50-memory-high.conf" 2>&1)
|
||||
if [ "$got" != "[Service]"$'\n'"MemoryHigh=$want_high" ]; then
|
||||
got=$(cat "$out/normal/$unit.service.d/50-runs-memory-high.conf" 2>&1)
|
||||
if [ "$got" != "[Service]"$'\n'"Environment=HIVE_RUNS_MEMORY_HIGH=$want_high" ]; then
|
||||
fail "unit generator's drop-in for $unit:"$'\n'"$got"
|
||||
fi
|
||||
done
|
||||
|
|
@ -67,7 +67,7 @@ check() {
|
|||
got=$(env -i "$dir/check" 2>&1)
|
||||
local want_warn=
|
||||
if [ -n "$want_why" ]; then
|
||||
want_warn="<4>$cap $want_why: no BUN_JSC_forceRAMSize heap ceiling and no MemoryHigh= on hive-subagent-daemon or hive-bash-daemon; the host's MemoryMax= on the container still applies."
|
||||
want_warn="<4>$cap $want_why: no BUN_JSC_forceRAMSize heap ceiling and no memory ceiling on the subagent and bash daemons' runs; the host's MemoryMax= on the container still applies."
|
||||
fi
|
||||
if [ "$got" != "$want_warn" ]; then
|
||||
fail "boot check printed:"$'\n'"$got"$'\n'"wanted:"$'\n'"$want_warn"
|
||||
|
|
|
|||
Loading…
Reference in a new issue