Ubuntu is making a significant shift in how its desktop edition handles low-memory situations, moving towards a more proactive strategy that accepts increased background disk activity to keep the user's active application responsive. The changes, detailed by Phoronix for the upcoming Ubuntu 26.10 release, mark a departure from previous default behaviors that favored minimizing swap usage at the potential cost of system freezes.
At the heart of the adjustment is a revised configuration for the system's Out-of-Memory (OOM) daemon. The new defaults implement a tiered approach using oom_score_adj values. This system is designed to intelligently triage processes when physical RAM is exhausted. Foreground applications and services deemed critical to the user experience are granted protective scores, making them much harder targets for the OOM killer. Conversely, background services and less urgent processes are assigned higher scores, marking them as primary candidates for termination.
This approach directly confronts a common frustration for desktop users: unresponsiveness or "hanging" when the system is under memory pressure. By aggressively targeting background tasks for termination, the system aims to preserve resources for the application the user is actively interacting with, such as a web browser, office suite, or creative software.
A key trade-off accompanying this change is Ubuntu's more accepting stance toward swap usage. The new configuration is calibrated to initiate swapping earlier and more readily. While swapping data to and from disk is inherently slower than using RAM, the strategy posits that this predictable, background I/O is preferable to the jarring interruption of a frozen desktop. Essentially, the system will now tolerate slower disk operations to avoid the much more disruptive experience of a stalled user interface.
This represents a clear evolution in philosophy. Ubuntu's historical defaults often operated with a strong preference for keeping processes resident in physical RAM. The new direction appears to acknowledge that for modern desktop computing, perceived responsiveness and smooth interaction are paramount, even if it means the kernel is more actively managing memory through a combination of targeted process termination and increased swapping.
It is important to note that these adjustments apply specifically to the Ubuntu Desktop images. Server and cloud editions, where background services are often critical and predictable performance is key, are not expected to adopt these same defaults.
For system administrators and power users managing Ubuntu desktop deployments, the change is actionable. While the new out-of-the-box settings are designed to improve the general user experience, any organization with custom memory management policies or optimized OOM configurations will need to review their settings before upgrading. Existing custom oom_score_adj tweaks or system-level tuning may interact differently with the new defaults. Testing on non-production systems is advisable to ensure that customized environments continue to behave as expected under memory load.
Ultimately, Ubuntu 26.10's OOM adjustments signal a prioritization of the end-user's perception of a smooth, usable desktop environment, framing memory management not just as a technical constraint but as a core component of the overall user experience.
Ubuntu 正在對其桌面版處理低記憶體狀況的方式進行重大轉變,從以往偏向最小化置換空間使用量的策略,轉向一種更積極主動的方法:接受增加背景磁碟活動,以確保使用者正在操作的應用程式保持流暢反應。據 Phoronix 報導,這些即將應用於 Ubuntu 26.10 版本的變更,標誌著與以往預設行為的決裂——過去的預設值可能為了減少置換使用而犧牲系統穩定性。
此次調整的核心在於系統「記憶體不足」(OOM) 守護程式的設定經過修訂。新的預設值實施了一套使用 oom_score_adj 數值的分級策略。此系統旨在實體 RAM 耗盡時,智能地對程序進行分類處理。對使用者體驗至關重要的前台應用程式與服務會獲得保護性評分,使它們極難成為 OOM 終結器的目標。相反地,背景服務與較不緊急的程序則被賦予更高的評分,將它們標記為主要的終止候選對象。
此方法直接針對桌面使用者常見的痛點:當系統面臨記憶體壓力時,出現無回應或「掛起」現象。透過積極地瞄準背景任務進行終止,系統旨在保留資源給使用者正在互動的應用程式,例如網頁瀏覽器、辦公室套件或創作軟體。
與此變更相伴的一個關鍵權衡是,Ubuntu 對於置換空間使用量採取了更為接受的態度。新的設定經過校準,會更早、更頻繁地啟動置換。雖然將資料寫入和讀出磁碟本質上比使用 RAM 慢,但此策略假設,這種可預測的背景輸入輸出比桌面突然凍結的驚人中斷更為可取。基本上,系統現在將容忍較慢的磁碟操作,以避免使用者介面停滯這種更具破壞性的體驗。
這代表著哲學上的明確演進。Ubuntu 歷來的預設值往往強烈傾向於將程序保留在實體 RAM 中運行。新的方向似乎承認,對於現代桌面運算而言,感知的反應速度和平順的交互至關重要,即使這意味著核心需要透過更有針對性的程序終止與增加置換的組合方式,來更積極地管理記憶體。
需要強調的是,這些調整專門適用於 Ubuntu 桌面版映像。伺服器和雲端版本(其中背景服務通常至關重要,且可預測的效能是關鍵)預計不會採用這些相同的預設設定。
對於管理 Ubuntu 桌面部署的系統管理員和進階使用者而言,此變更具有可操作性。雖然新的開箱即用設定旨在改善一般使用者體驗,但任何擁有自訂記憶體管理政策或已優化 OOM 設定的機構,都可能需要在升級前重新審視其設定。現有的自訂 oom_score_adj 微調或系統級別的優化,可能會與新的預設值產生不同的交互作用。建議在非生產系統上進行測試,以確保客製化環境在記憶體負載下仍能如預期般運作。
總括而言,Ubuntu 26.10 的 OOM 調整標誌著將終端使用者對流暢、可用桌面環境的感知置於優先地位,將記憶體管理不僅視為一種技術限制,更是整體使用者體驗的核心組成部分。
