pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/39720: MySQL is using thread priority values that are way too low



>Number:         39720
>Category:       pkg
>Synopsis:       MySQL sets its thread priorities too low
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 08 16:25:01 +0000 2008
>Originator:     Sverre Froyen
>Release:        NetBSD 4.99.72
>Organization:
        Viewmark
>Environment:
System: NetBSD abbor.fesk.com 4.99.72 NetBSD 4.99.72 (GENERIC) #8: Thu Oct 2 
11:32:04 MDT 2008 
toor%abbor.viewmark.com@localhost:/usr/src/objdir/sys/arch/i386/compile.i386/GENERIC
 i386
Architecture: i386
Machine: i386
>Description:
MySQL database inserts slow to a crawl when the server is busy.
>How-To-Repeat:
Start compiling one or two pkgsrc packages and then attempt insert a
few hundred records into a MySQL database table.  Notice the slowness.
>Fix:
Change the thread priorities in mysql5-client and mysql5-server to more
sensible values.  For NetBSD, I've used the ones in the attached patch
with good results.  It looks like Linux and FreeBSD are using a different
ranges than NetBSD so the values should probably depend on the OS.

Alternately, add the build option --skip-thread-priority to disable the
setting of thread priorities in MySQL.

Patch:

--- sql/mysql_priv.h.orig       2008-10-07 14:03:26.000000000 -0600
+++ sql/mysql_priv.h    2008-10-07 14:04:19.000000000 -0600
@@ -282,10 +282,10 @@
 #define WAIT_PRIOR     0
 #define QUERY_PRIOR    2
 #else
-#define INTERRUPT_PRIOR 10
-#define CONNECT_PRIOR  9
-#define WAIT_PRIOR     8
-#define QUERY_PRIOR    6
+#define INTERRUPT_PRIOR 53
+#define CONNECT_PRIOR  52
+#define WAIT_PRIOR     51
+#define QUERY_PRIOR    49
 #endif /* __WIN92__ */
 
        /* Bits from testflag */
        



Home | Main Index | Thread Index | Old Index