Ubuntu 22.04 LTS frequently kills apps and developers are dealing with this issue
2 min readUbuntu 22.04 LTS frequently kills apps and developers are dealing with this issue
- Huawei Mate 60 Pro Makes Satellite Calls: Only US$0.18/minute
- Huawei Mate60 Pro: First Smart Phone Supports Satellite Calls
- 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?