Skip to content

Conversation

@kajusnau
Copy link
Collaborator

@kajusnau kajusnau commented Nov 25, 2025

Follow-up to #1542, addressing some issues


Description of Changes

  1. Added a patch to fix scheduler settings not being applied at runtime

    • Upstream PR created as well
      Our patch should be removed when a new release of s76-scheduler is available in nixpkgs
    • With this patch, processes should have their niceness and priority values adjusted at runtime properly
  2. Scheduler assignment and priority fixes

    • Added fixes to resolve scheduler assignment conflicts
    • Reduced scheduler priority and I/O aggressiveness to reduce instances where single processes may hog system memory and disk.
  3. Dell 7330 memory assignment changes

    • Reduced flatpak-vm and gui-vm memory assignments.
  4. Removed tuned-gui entry from desktop shortcuts

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

Scheduler tests:

  1. Boot into Ghaf and verify tuned-gui desktop entry does not appear in the app library
  2. In gui-vm:
    1. Launch an app, e.g. cosmic-term Terminal
    2. Remotely or in the terminal itself, run watch -n 1 "top -p $(pidof cosmic-term)"
    3. Observe the NI (niceness) column value - it should adjust from 9 to -2 within 30s or less
  3. In host:
    1. Run htop and observe NI column for sysvms and appvms
    2. Verify sysvms have a niceness value of -5, appvms 0
    3. Verify other system services have a niceness value of 5 or 0

@kajusnau kajusnau marked this pull request as ready for review November 25, 2025 11:57
@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Nov 25, 2025
@milva-unikie
Copy link

Tested on Lenovo X1 and Darter Pro (nixos-rebuild switch)

  • As expected, the tuned-gui icon has disappeared from the app menu. Thanks!
  • Launched apps get a niceness value of -2.
  • Niceness values on the host match what is described in the PR.
  • App launch times are not affected.
  • Lenovo X1 performance test results are not showing the ~10 % decrease that was observed on Darter Pro after performance module #1542

Dell 7330

  • Dell 7330 is slow, it is hitting almost every timeout in the automated tests. SSH connection times, VM boot times and app launch times are all longer. For example it takes over 3 minutes after login for the flatpak-vm to be ready for an SSH connection.
  • I don't have access to the device today, but I can check the user experience tomorrow. I am assuming it is not good.
  • Question: Is there a way to exclude Dell 7330 from these changes? If not, I will need to prepare a test automation patch.

Dell 7230

  • Not building in Jenkins. This is a known issue unrelated to this PR. Adding a "bug" tag for that.

- fix scheduler assignments conflicts
- reduce scheduler priority and IO aggressiveness

Signed-off-by: Kajus Naujokaitis <[email protected]>
@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Nov 28, 2025
@kajusnau kajusnau marked this pull request as ready for review November 28, 2025 11:38
@kajusnau kajusnau requested a review from mbssrc November 28, 2025 11:41
@kajusnau kajusnau changed the title scheduler: fix scheduler not working, prioritize foreground performance: fix scheduler, remove temp limits, fix dell perf Nov 28, 2025
@kajusnau
Copy link
Collaborator Author

PR scope expanded slightly, testing instructions updated accordingly ⚠️

@Bitumiju
Copy link

Bitumiju commented Dec 1, 2025

@milva-unikie
Copy link

milva-unikie commented Dec 1, 2025

Tested on Lenovo X1 (nixos-rebuild switch)

  • My Lenovo X1 gen11 crashes after ~5 minutes when running the stress test. Kajus has the details.

@milva-unikie milva-unikie added bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR and removed bug Something isn't working Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Needs Testing CI Team to pre-verify bug on rugged laptop Tested on System76 labels Dec 1, 2025
@kajusnau kajusnau changed the title performance: fix scheduler, remove temp limits, fix dell perf performance: fix scheduler, fix dell performance Dec 2, 2025
@kajusnau
Copy link
Collaborator Author

kajusnau commented Dec 2, 2025

Reduced scope of PR - removed thermal limit changes, will be added as a separate PR.

@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Dec 2, 2025
@milva-unikie
Copy link

Tested on Darter Pro and Lenovo X1
(nixos-rebuild switch, rebased to the latest main)

Everything looks good now. tuned-gui is no longer in the app menu and the niceness values update as described in the PR.

@milva-unikie milva-unikie added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76 and removed Needs Testing CI Team to pre-verify bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR labels Dec 2, 2025
@brianmcgillion brianmcgillion merged commit 139c3a1 into tiiuae:main Dec 2, 2025
30 checks passed
@kajusnau kajusnau deleted the scheduler branch December 2, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on System76

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants