Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-03-2008, 09:58 PM   #1
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' 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, 01:57 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
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).



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 03:16 PM
Renice without affecting inherited child processes? garr0n Linux - Software 1 10-09-2007 02:03 PM
killing child processes of a bash script results in strange random kills omnio Programming 6 03-12-2007 08:35 AM
LXer: Title: PHP/MySQL Classifieds Script AddAsset1.php Script Insertion LXer Syndicated Linux News 0 07-02-2006 07:21 PM
Priority of processes (using nice) started from within a script podollb Linux - Software 1 01-08-2006 12:44 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:15 PM.

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