LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is 'nice' inherited to child processes? e.g. bash script/php script that calls MySQL (http://www.linuxquestions.org/questions/linux-newbie-8/is-nice-inherited-to-child-processes-e-g-bash-script-php-script-that-calls-mysql-688166/)

SirTristan 12-03-2008 08:58 PM

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?

Tinkster 12-04-2008 12:57 AM

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


All times are GMT -5. The time now is 03:56 AM.