Possible scalability improvement

Bug #334667 reported by Percona
2
Affects Status Importance Assigned to Milestone
Percona patches
Invalid
Undecided
Unassigned

Bug Description

In some workloads I see
OS WAIT ARRAY INFO: reservation count 8610679, signal count 6629259
--Thread 1281251648 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1279654208 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1290836288 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1285511488 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1271134528 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1285245248 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1289505088 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1276193088 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1291102528 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1272465728 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1276725568 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1278056768 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1286842688 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1288706368 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1280985408 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1284446528 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1287641408 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
--Thread 1282582848 has waited at btr0cur.c line 366 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x2aaab9220f20 created in file dict0dict.c line 3706
a writer (thread id 1276991808) has reserved it in mode exclusive
number of readers 0, s_waiters flag 1, x_waiters flag 0
Last time read locked in file btr0cur.c line 366
Last time write locked in file btr0cur.c line 359
Mutex spin waits 0, rounds 987864487, OS waits 3785934
RW-shared spins 6245018, OS waits 1592849; RW-excl spins 31917356, OS waits 1849597

which corresponds
to
        } else if (latch_mode == BTR_CONT_MODIFY_TREE) {
                /* Do nothing */
                ut_ad(mtr_memo_contains(mtr, dict_tree_get_lock(tree),
                                                        MTR_MEMO_X_LOCK));
        } else {
                mtr_s_lock(dict_tree_get_lock(tree), mtr);
        }

Can we improve this ?

Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

This may be same to
https://bugs.launchpad.net/percona-patches/+bug/329005
I have registered it also to percona-patches.

Revision history for this message
Yasufumi Kinoshita (yasufumi-kinoshita) wrote :

This is same to (or part of) https://bugs.launchpad.net/percona-xtradb/+bug/329005 .
I have changed the priolity 329005 to High. And this report as duplicated.

Changed in percona-patches:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.