LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-03-2008, 08:58 PM   #1
SirTristan
Member
 
Registered: Feb 2006
Distribution: GNU/Linux
Posts: 54

Rep: Reputation: 15
Is 'nice' inherited to child processes? e.g. bash script/php script that calls MySQL


Is the priority set by the 'nice' command inherited by processes that are called by the script being run?

For instance, say you do 'nice bash mysql.sh' or 'nice php mysql.php', and those scripts call a MySQL command like optimizing tables.

Would that MySQL command have a lower, 'nice' priority? And if not, is it possible to have a 'nice' type behavior that is inherited by child processes?
 
Old 12-04-2008, 12:57 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Basically, yes ... with MySQL (or other client/server processes)
the problem is that your .sh will only kick of a query. This will
*NOT* impact on the priority of the server process, and the only
thing that will be less CPU intense will be the post-processing
of the result set (if you do any).


Cheers,
Tink
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running commands from array in a child bash script bengoavs Programming 2 10-26-2007 02:16 PM
Renice without affecting inherited child processes? garr0n Linux - Software 1 10-09-2007 01:03 PM
killing child processes of a bash script results in strange random kills omnio Programming 6 03-12-2007 07:35 AM
LXer: Title: PHP/MySQL Classifieds Script AddAsset1.php Script Insertion LXer Syndicated Linux News 0 07-02-2006 06:21 PM
Priority of processes (using nice) started from within a script podollb Linux - Software 1 01-08-2006 11:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration