mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 21:33:02 +02:00
container: use 'nice' for podman load and create
When loading big OCI images at boot the `podman load` process completely monopolizes all cores of an Arm Cortex-A72. It blocks on I/O, sure, but with 'nice' we can get some attention at least to more critical services at boot. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -211,7 +211,7 @@ load_archive()
|
||||
fi
|
||||
|
||||
[ -n "$quiet" ] || log "Loading OCI image $dir ..."
|
||||
output=$(podman load -qi "$dir")
|
||||
output=$(nice podman load -qi "$dir")
|
||||
|
||||
# Extract image ID from podman load output:
|
||||
# "Loaded image: sha256:cd9d0aaf81be..."
|
||||
@@ -342,7 +342,7 @@ create()
|
||||
|
||||
# shellcheck disable=SC2048
|
||||
log "podman create --name $name --conmon-pidfile=$pidfile $args $image $*"
|
||||
if podman create --name "$name" --conmon-pidfile="$pidfile" $args "$image" $*; then
|
||||
if nice podman create --name "$name" --conmon-pidfile="$pidfile" $args "$image" $*; then
|
||||
[ -n "$quiet" ] || log "Successfully created container $name from $image"
|
||||
[ -n "$manual" ] || start "$name"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user