maria-discuss team mailing list archive
Mailing list archive
Re: mariadb runs at lowest priority (nice -n 19) - PBXT code causing problems
>>>>> "Paul" == Paul McCullagh <paul.mccullagh@xxxxxxxxxxxxx> writes:
Paul> The intension of this code was to set the priority of the current
Paul> running thread only, not the entire program.
Paul> If the code is not working in this manner, then there is no better
Paul> solution that to disable it.
Paul> However it would be nice in the cases where pthread_setschedparam()
Paul> does work, that it is called.
Agree, but I don't know how to test for this case :(
At least on linux, using setpriority() will not work with any modern Linux.
Paul> In the current code, pthread_setschedparam() is called when
Paul> pth_min_priority != pth_max_priority.
Current code ?
Do you mean that this has been changed recently ?
(It was not a long time ago when we merged with the latest pbxt, so I
assumed we have the latest code already).
The pbxt code in the MariaDB tree is bascily:
if (pth_min_priority == pth_max_priority)
It's the call to setpriority() that should be avoided in all cases.
Don't see how to fix this for linux except by adding an ifdef around
the call to setpriority().
Do you know of any system, except old obsolete linux systems, where one should
use setpriority() to set the priority for a thread?
PS: Sorry for the delayed answer but I have been on vacation...