Bug #28194 os scheduling and mysql sql interface
Submitted: 2 May 2007 6:44 Modified: 21 Mar 2011 4:09
Reporter: Roberto Spadim (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S4 (Feature request)
Version:any OS:Any (any)
Assigned to: CPU Architecture:Any
Tags: performace, qc

[2 May 2007 6:44] Roberto Spadim
Description:
hello i have a big system running in a small machine
my big problem:
os scheduling

many times i need to open "htop" and renice some process to allow mysql run "faster" and return data to my apache+php server

the today implementation:
look at htop
renice
see what happen

How to repeat:
big system busy with other process and mysql waiting a lot to return to http

Suggested fix:
maybe an os integration with os scheduling could allow us to get better performaces, for example (on linux)
query cached could have -20 nice value, very big queries without sql_high_priority could allow 0, with -10, maybe a table with all situations and load of server, for example 
for slow network (internet 256kbits) a big table +- 1Mb wait net sending state for about 5 minutes, if we could allow an band otimization (QoS) or something diferent (today we have sql_buffer_result),
myisam recover could be faster with reniced values..
well, the server is running very well, but some os interface could allow it to be faster, yes it's a "enterprise" tunning, but look at new profiler idea, with that i can get better tunes of my mysql server memory usage, if i could have better os integration for big tunes... :) 
thanks guys
[13 Jun 2007 16:20] Roberto Spadim
any idea?
i was using my laptop and seeing the battery profiler, we could implement somethink like that for os integration for example, create some os nice level and set some type of queries to execute at that level
[13 Jun 2007 16:55] Roberto Spadim
hello guys, i was testing some lock tables and get a big problem,
i can't check what mysql thread is consuming my cpu, see the two images attached
if show processlist could return PID of OS i could understand what could be happening

could we implement some mysql and OS integration for developer debugging their applications?

thankx
[19 Jun 2007 10:34] Sveta Smirnova
Thank you for the report.

If I understood correctly first picture shows different mysql* processes. But second picture shows different threads of one mysqld process. If I usderstood your request correctly you ask about possibility to smart renice threads? If this is wrong, please, correct me.
[19 Jun 2007 10:34] Sveta Smirnova
Also Severity has been changed, as this is surely not a bug.
[19 Jun 2007 16:54] Roberto Spadim
yes this could be used to renice, and understand what process is running a very high cpu usage
[20 Jun 2007 7:03] Sveta Smirnova
Thank you for the reasonable feature request.
[21 Mar 2011 4:09] Roberto Spadim
this will be done with bug: http://bugs.mysql.com/bug.php?id=24626