Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tech:linux:apt_update_resource_overload [2020/01/26 06:27]
tech:linux:apt_update_resource_overload [2020/01/26 06:27] (current)
Line 1: Line 1:
 +====== Disable updates (Bionic) ======
 +<code bash>
 +systemctl disable apt-daily.timer
 +systemctl disable apt-daily-upgrade.timer
 +</​code>​
  
 +====== APT update resource overload ======
 +apt has a daily and weekly update on Ubuntu servers. ​ On servers with limited CPU and Memory this could pose an issue. ​ If the servers are inside the firewall and do not require any updates, security or otherwise, it helps to disable this.
 +
 +The apt configurations as at ''/​etc/​apt/​apt.conf.d''​ directory
 +
 +Of particular interest is the file ''​10periodic''​
 +
 +The key parameters to set to 0 are below
 +
 +<​code>​
 +APT::​Periodic::​Update-Package-Lists "​0";​
 +APT::​Periodic::​Download-Upgradeable-Packages "​0";​
 +APT::​Periodic::​AutocleanInterval "​0";​
 +</​code>​
 +
 +===== Release upgrade check =====
 +Alongside apt updates are the Ubuntu release checks that run periodically and take up values resources. ​ To disable edit ''/​etc/​update-manager/​release-upgrades''​ and update ''​Prompt=lts''​ to ''​Prompt=never''​
 +
 +===== cron jobs =====
 +The cron jobs that cause the issue are
 +  * /​etc/​cron.weekly/​apt-xapian-index
 +  * /​etc/​cron.weekly/​update-notifier-common
 +  * /​etc/​cron.daily/​update-notifier-common
 +  * /​etc/​cron.daily/​apt
 +  * /​etc/​cron.daily/​apt-compat
 +
 +The other option may be to disable execute on these files. ​ Actually only this may work as the settings don't seem to limit it!
 +
 +<code bash>
 +chmod -x /​etc/​cron.weekly/​apt-xapian-index
 +chmod -x /​etc/​cron.weekly/​update-notifier-common
 +chmod -x /​etc/​cron.daily/​update-notifier-common
 +chmod -x /​etc/​cron.daily/​apt
 +chmod -x /​usr/​lib/​ubuntu-release-upgrader/​release-upgrade-motd
 +chmod -x /​etc/​cron.daily/​apt-compat
 +</​code>​
 +
 +===== Related =====
 +[[apt_upgrades|Automatic apt upgrades]]

QR Code
QR Code tech:linux:apt_update_resource_overload (generated for current page)