Ubuntu 22.04 LTS frequently kills apps and developers are dealing with this issue
- An American company made 0.7nm chips: EUV lithography machines can’t do it
- CVE-2007-4559 Python vulnerability ignored for 15 years puts 350,000 projects at risk of code execution
- RISC-V only takes 12 years to achieve the milestone of 10 billion cores
- 14000 cores + 450W: RTX 4080 graphics card perfectly replaces the RTX 3080
- Big upgrade: The difference between Bluetooth 5.0 and 5.2
- Geeks Disappointed that RTX 4080/4090 doesn’t come with PCIe 5.0
- What are advantages and disadvantages of different load balancing?
Ubuntu 22.04 LTS frequently kills apps and developers are dealing with this issue.
Ubuntu 22.04 LTS version brings a new feature: systemd-oomd is enabled by default as a daemon when memory is low, which can kill some processes in the case of high memory pressure.
However, the OOMD feature seems to kill apps crazily , sometimes even if the user does not feel any memory pressure, it will inexplicably terminate the running program, such as Firefox, Chrome or Visual Studio Code, users with very poor experience in the Ubuntu community mail Lots of comments on the list.
One frustrated user wrote :
There should be a warning before killing the app to have a chance to save app data. There should at least be an apology and explanation after killing the app. The current behavior gives the impression that Ubuntu 22.04 is unreliable and unsafe to use , which is a big problem for LTS releases.
Subsequently, Canonical engineer Nick Rosbrook explained in an email the conditions under which OOMD kills the process:
- Condition 1: When both the total system memory usage and swap usage exceed the SwapUsedLimit (90% by default on Ubuntu), more than 5% of the swaps in cgoups will become OOM finalizers.
- Condition 2: When a unit’s cgroup memory pressure exceeds MemoryPressureLimit, monitoring descendant cgroups will execute termination from the process with the most recycling rate.
In practice, most apps are killed because of condition 1, largely because Ubuntu only provides 1GB of swap space, and SwapUsedLimit is too easy to reach 90%.
Based on the termination conditions of the process, Nick proposed some ideas for changes, such as changing the way systemd-oomd calculates/triggering memory values, or increasing the value of SwapUsedLimit, because 1 GB is too little.
The community has now started an Ubuntu development thread on the issue to solicit feedback from the wider Ubuntu community, which should be resolved in the 22.04.1 update.
- DIY a PBX (Phone System) on Raspberry Pi
- How to host multiple websites on Raspberry Pi 3/4?
- A Free Intercom/Paging system with Raspberry pi and old Android phones
- DIY project: How to use Raspberry Pi to build DNS server?
- Raspberry Pi project : How to use Raspberry Pi to build git server?