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

  • SEARCH
  • Home
  • 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 65721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:59:27+00:00 2026-05-10T18:59:27+00:00

I am wondering how to get a process run at the command line to

  • 0

I am wondering how to get a process run at the command line to use less processing power. The problem I’m having is the the process is basically taking over the CPU and taking MySQL and the rest of the server with it. Everything is becoming very slow.

I have used nice before but haven’t had much luck with it. If it is the answer, how would you use it?

I have also thought of putting in sleep commands, but it’ll still be using up memory so it’s not the best option.

Is there another solution?

It doesn’t matter to me how long it runs for, within reason.

If it makes a difference, the script is a PHP script, but I’m running it at the command line as it already takes 30+ minutes to run.

Edit: the process is a migration script, so I really don’t want to spend too much time optimizing it as it only needs to be run for testing purposes and once to go live. Just for testing, it keeps bring the server to pretty much a halt…and it’s a shared server.

  • 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. 2026-05-10T18:59:28+00:00Added an answer on May 10, 2026 at 6:59 pm

    You should use nice with 19 ‘niceness’ this makes the process very unlikely to run if there are other processes waiting for the cpu.

     nice -n 19 <command> 

    Be sure that the program does not have busy waits and also check the I/O wait time.

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

Sidebar

Related Questions

I was wondering if it is possible to get the number of the line
I was wondering if in Java I would get any odd behaviour if I
I was wondering if anyone can help me get started with creating a room
Just wondering if there is any way (in C) to get the contents of
I'm wondering if it's possible to get a handle on running instances of a
I was wondering if there was somewhere I could get some starter kit /
I was wondering if there was a way to get at the raw HTTP
I'm wondering if there are any simple ways to get a list of all
I was wondering if there is a JOptionPane where you can get multiple inputs
I was wondering if there was a way to some how get the HTML

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.