-
Notifications
You must be signed in to change notification settings - Fork 106
fix: enhance system daemon resource management #996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add OOMScoreAdjust and Nice settings to improve system daemon stability 1. Set OOMScoreAdjust=-500 to reduce likelihood of OOM killer termination 2. Set Nice=-5 to give the process higher CPU scheduling priority 3. These changes help ensure critical system services remain available 4. Prevents system instability due to resource contention Log: Improved system daemon stability with better resource prioritization Influence: 1. Test system behavior under high memory pressure 2. Verify daemon remains running during system stress 3. Check CPU scheduling priority with nice command 4. Monitor OOM score adjustments during low memory conditions 5. Test overall system stability with multiple resource-intensive applications fix: 增强系统守护进程资源管理 添加 OOMScoreAdjust 和 Nice 设置以提升系统守护进程稳定性 1. 设置 OOMScoreAdjust=-500 降低被 OOM 杀手终止的概率 2. 设置 Nice=-5 给予进程更高的 CPU 调度优先级 3. 这些更改有助于确保关键系统服务保持可用 4. 防止因资源竞争导致的系统不稳定 Log: 通过更好的资源优先级设置提升系统守护进程稳定性 Influence: 1. 在高内存压力下测试系统行为 2. 验证守护进程在系统压力下保持运行 3. 使用 nice 命令检查 CPU 调度优先级 4. 监控低内存条件下的 OOM 分数调整 5. 测试多资源密集型应用下的整体系统稳定性
Reviewer's guide (collapsed on small PRs)Reviewer's GuideConfigures the dde-system-daemon systemd unit with explicit OOMScoreAdjust and CPU scheduling (Nice) settings to improve its survivability under memory pressure and CPU contention. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey - I've left some high level feedback:
- Consider whether the chosen OOMScoreAdjust=-500 and Nice=-5 values should be configurable rather than hardcoded, so deployments with different performance/latency requirements can tune daemon priority appropriately.
- Please double-check that the new OOMScoreAdjust and Nice settings are consistent with other critical systemd units on the system to avoid unexpected priority inversions between this daemon and related services.
- If this unit can also run in non-desktop or resource-constrained environments, you may want to guard these settings with appropriate Condition= or environment-specific overrides to prevent starving other important workloads.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider whether the chosen OOMScoreAdjust=-500 and Nice=-5 values should be configurable rather than hardcoded, so deployments with different performance/latency requirements can tune daemon priority appropriately.
- Please double-check that the new OOMScoreAdjust and Nice settings are consistent with other critical systemd units on the system to avoid unexpected priority inversions between this daemon and related services.
- If this unit can also run in non-desktop or resource-constrained environments, you may want to guard these settings with appropriate Condition= or environment-specific overrides to prevent starving other important workloads.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
deepin pr auto review这段代码修改是在 systemd 服务单元文件( 以下是对该修改的详细审查意见,包括语法逻辑、代码质量、性能和安全性方面: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
5. 改进建议
总结该修改在语法和逻辑上是正确的,旨在提高系统守护进程的稳定性和响应速度。主要风险在于如果该服务本身存在性能问题或 Bug,可能会对系统整体造成较大影响。建议添加注释说明意图,并在实际测试中观察其对系统流畅度的影响。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: fly602, robertkill The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Add OOMScoreAdjust and Nice settings to improve system daemon stability
Log: Improved system daemon stability with better resource prioritization
Influence:
fix: 增强系统守护进程资源管理
添加 OOMScoreAdjust 和 Nice 设置以提升系统守护进程稳定性
Log: 通过更好的资源优先级设置提升系统守护进程稳定性
Influence:
Summary by Sourcery
Tune dde-system-daemon systemd service resource settings to improve stability under memory and CPU pressure.
Enhancements: