Skip to content
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

Increase JetBrains IDE process priority #19860

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Increase JetBrains IDE process priority #19860

merged 1 commit into from
Jun 11, 2024

Conversation

iQQBot
Copy link
Contributor

@iQQBot iQQBot commented Jun 7, 2024

Description

This PR increases JetBrains IDE process priority (niceness -10)

Related Issue(s)

Fixes ENT-158

How to test

  1. start a workspace with any JetBrains IDE
  2. using ps -eo pid,nice,args --sort=nice | awk '$2 != 0' you will see Jetbrains IDE process is -10 (This may take some time)
image

Documentation

Preview status

Gitpod was successfully deployed to your preview environment.

Build Options

Build
  • /werft with-werft
    Run the build with werft instead of GHA
  • leeway-no-cache
  • /werft no-test
    Run Leeway with --dont-test
Publish
  • /werft publish-to-npm
  • /werft publish-to-jb-marketplace
Installer
  • analytics=segment
  • with-dedicated-emulation
  • workspace-feature-flags
    Add desired feature flags to the end of the line above, space separated
Preview Environment / Integration Tests
  • /werft with-local-preview
    If enabled this will build install/preview
  • /werft with-preview
  • /werft with-large-vm
  • /werft with-gce-vm
    If enabled this will create the environment on GCE infra
  • /werft preemptible
    Saves cost. Untick this only if you're really sure you need a non-preemtible machine.
  • with-integration-tests=all
    Valid options are all, workspace, webapp, ide, jetbrains, vscode, ssh. If enabled, with-preview and with-large-vm will be enabled.
  • with-monitoring

/hold

@meysholdt
Copy link
Member

This is great, thank you for this PR.

nit: When testing, let's please make sure that processes started via the IDE's Terminal do not get niceness -10.
For example, when running gradle from the terminal, it should not get -10, because that might render the workspace unresponsive.

@iQQBot
Copy link
Contributor Author

iQQBot commented Jun 7, 2024

nit: When testing, let's please make sure that processes started via the IDE's Terminal do not get niceness -10. For example, when running gradle from the terminal, it should not get -10, because that might render the workspace unresponsive.

In terms of implementation, it is impossible to avoid this. They will always first get -10, but they will be adjusted to 0 at a later time. @meysholdt

@iQQBot
Copy link
Contributor Author

iQQBot commented Jun 7, 2024

The child process always gets the same niceness as the parent process, which cannot be changed and can only be modified after the process starts.

@meysholdt
Copy link
Member

In terms of implementation, it is impossible to avoid this. They will always first get -10, but they will be adjusted to 0 at a later time.

I think if the "adjustment" happens fast enough (withing seconds), this should be all we need. let's try.

@iQQBot
Copy link
Contributor Author

iQQBot commented Jun 11, 2024

/unhold

@roboquat roboquat merged commit 7cdfbe6 into main Jun 11, 2024
45 checks passed
@roboquat roboquat deleted the pd/jb-niceness branch June 11, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants