The intension of this code was to set the priority of the current running thread only, not the entire program. If the code is not working in this manner, then there is no better solution that to disable it. However it would be nice in the cases where pthread_setschedparam() does work, that it is called. In the current code, pthread_setschedparam() is called when pth_min_priority != pth_max_priority. On May 27, 2011, at 12:58 AM, Arjen Lentz wrote:
Hi Monty, Paul
This msg is to be sure the right (PBXT) Paul sees it... Monty sent to paul@kitebird which if I remember correctly is one of Paul Dubois' addresses ;-)
Cheers, Arjen.
----- Original Message -----
Hi!
"Panayot" == Panayot Belchev <panayot@panayot.com> writes:
Panayot> Hi, Panayot> I just noticed that all our MariaDB 5.2 servers show the same:
Panayot> $ ps -eo ni,comm |grep mysql
Panayot> 9 mysqld_safe Panayot> 19 mysql_isam_spac <defunct> Panayot> 19 mysqld
Panayot> While servers with Oracle MySQL are at nice -n 0
Panayot> I tried setting
Panayot> niceness=-10
Panayot> in /usr/bin/mysqld_safe but with no effect. Is there a reason to run Panayot> MariaDB at the lowest possible priority and is there a way to change Panayot> that?
The code for MariaDB when it comes to priority should be identical to MySQL.
I did a quick test of just starting 'mysqld' in MySQL and MariaDB and noticed the above too.
After some debugging I found the following in the pbxt code:
-----------
if (pth_min_priority == pth_max_priority) { /* Under Linux the priority of normal (non-runtime) * threads are set using the standard methods * for setting process priority. */
/* We could set who == 0 because it should have the same affect * as using the PID. */
/* -20 = highest, 20 = lowest */ if (setpriority(PRIO_PROCESS, getpid(), 20) == -1) return errno; return 0; } ------------
This causes the mysqld process to be set to -19, which is clearly wrong as pbxt should not affect the priority of it's caller.
For Paul: pth_min_priority and pth_max_priority are both 0 here.
I will for now ifdef away the above call to setpriority() in 5.1 and above until we have a better solution.
A workaround until that is to disable pbxt with --skip-pbxt. Please add the above to your my.cnf file and the above problems disappears!
Regards, Monty
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- Paul McCullagh PrimeBase Technologies www.primebase.org www.blobstreaming.org pbxt.blogspot.com