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

Ask A Question

Stats

  • Questions 78k
  • Answers 78k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I whole heartily join the recommendation not to manually change… May 11, 2026 at 3:54 pm
  • added an answer I'm assuming that you have a form of some sort,… May 11, 2026 at 3:54 pm
  • added an answer I have no previous experience with jQuery but to achieve… May 11, 2026 at 3:54 pm

Related Questions

I'm working on improving our group's development process, and I'm considering how best to
Is there a way to call method inside a running .NET assembly. The problem
I'm starting to create a proof of concept for an idea I have, and
Alright so I have this C++ image capturing class. I was wondering if I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.