Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7172033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:32:00+00:00 2026-05-28T15:32:00+00:00

I need to start a CPU-intensive system process under low priority so that it

  • 0

I need to start a CPU-intensive system process under low priority so that it doesn’t slow down my server. How can I do this on Linux?

This is similar to this question: Start a Java process at low priority using Runtime.exec / ProcessBuilder.start? except on Linux instead of Windows. It’s OK if the process’s priority is changed after the process is started (as long as there isn’t much delay).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:32:01+00:00Added an answer on May 28, 2026 at 3:32 pm

    Run the command using /usr/bin/nice. For instance:

    $ /usr/bin/nice -n 10 somecommand arg1 arg2
    

    will run somecommand arg1 arg2 at a niceness of +10. (In Unix / Linux, a larger niceness value results in a lower scheduler priority. The range of nice is typically from -19 to +19.)

    Note that this solution is platform specific. It will only work on Linux and Unix systems …


    FOLLOW UP

    The ProcessBuilder should be instantiated as you would any normal command; i.e.

        new ProcessBuilder("nice", "-n", "10", "somecommand", "arg1", "arg2");
    

    There’s no black magic about when / how to split commands / arguments. The command (e.g. nice) syntax determines what it arguments should be, and that determines both how they should quoted on the shell command line, and how they should be provided when using ProcessBuilder (or the native exec* syscalls of that matter).

    I don’t think that there should be problems with waitFor() etc, because (AFAIK) the /usr/bin/nice command uses exec (not fork / exec) to run the supplied command. Try it out …

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some part of my project I need a process-local scheduling system that will
I need to implement a method that can measure Time and CPU cycles of
I need to start and stop SQL Server from the command line. I am
I need to start a Unix process by calling a PHP-page through the web.
I need start off with code because I am not sure what terminology to
Normally to attach a debuger to a running jvm you would need start the
I need to start messing with a vb.net(vs2008) project file and I'd like a
I need to start developing in FORTRAN, any recommendations on learning\developing FORTRAN coming from
I need Week-Start-Date and Week-End-Date for particular Week number in a year (vb.net or
I need to start a Visual Basic script file by using WMI in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.