From 2d9e8fe1e1307d5decb2242a842e8069a0f4bc00 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 4 Oct 2024 12:28:55 +0200 Subject: [PATCH 1/3] adsbx stats lower priority --- rootfs/usr/local/bin/adsbexchange-json-status | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootfs/usr/local/bin/adsbexchange-json-status b/rootfs/usr/local/bin/adsbexchange-json-status index e07dac4..698c574 100755 --- a/rootfs/usr/local/bin/adsbexchange-json-status +++ b/rootfs/usr/local/bin/adsbexchange-json-status @@ -7,6 +7,9 @@ REMOTE_URL="https://adsbexchange.com/api/receive/" REMOTE_HOST=$( echo $REMOTE_URL | awk -F'/' '{print $3}' ) +# run with lowest priority +renice 20 $$ || true + # Set this to '0' if you don't want this script to ever try to self-cache DNS. # Default is on, but script will automatically not cache if resolver is localhost, or if curl version is too old. DNS_CACHE=1 From 70ceb365bf428cb403bd57d3c4209be4013ef310 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 4 Oct 2024 13:07:05 +0200 Subject: [PATCH 2/3] lower priority for mlat-client for mlat sync only the decoder talking to the SDR is important --- rootfs/etc/s6-overlay/scripts/mlat-client | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rootfs/etc/s6-overlay/scripts/mlat-client b/rootfs/etc/s6-overlay/scripts/mlat-client index 4a1ddfa..47a05a0 100755 --- a/rootfs/etc/s6-overlay/scripts/mlat-client +++ b/rootfs/etc/s6-overlay/scripts/mlat-client @@ -24,6 +24,9 @@ source /scripts/interpret_ultrafeeder_config s6wrap=(s6wrap --quiet --timestamps --prepend="$SCRIPT_NAME") +# run with slightly lower priority +renice 5 $$ || true + "${s6wrap[@]}" --args echo "Started as an s6 service" MLAT_CMD="/usr/bin/mlat-client" From 33472380bf65684bab2c568215787718b45c847e Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 4 Oct 2024 13:41:28 +0200 Subject: [PATCH 3/3] dockerfile: one less apt call --- Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 603b24a..735c3fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,8 +45,7 @@ RUN \ { [[ "${VERSION_BRANCH:0:1}" == "#" ]] && VERSION_BRANCH="main" || true; } && \ echo "$(TZ=UTC date +%Y%m%d-%H%M%S)_$(curl -ssL "https://api.github.com/repos/$VERSION_REPO/commits/$VERSION_BRANCH" | awk '{if ($1=="\"sha\":") {print substr($2,2,7); exit}}')_$VERSION_BRANCH" > /.CONTAINER_VERSION && \ # Clean up: - apt-get remove -q -y "${TEMP_PACKAGES[@]}" && \ - apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \ + apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y "${TEMP_PACKAGES[@]}" && \ apt-get clean -q -y && \ # test mlat-client /usr/bin/mlat-client --help > /dev/null && \