percona-discussion team mailing list archive
-
percona-discussion team
-
Mailing list archive
-
Message #00328
[Bug 334667] [NEW] Possible scalability improvement
Public bug reported:
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 ?
** Affects: percona-patches
Importance: Undecided
Status: New
--
Possible scalability improvement
https://bugs.launchpad.net/bugs/334667
You received this bug notification because you are a member of Percona
developers, which is the registrant for Percona patches.
Status in Patches for MySQL by Percona: New
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 ?
Follow ups
References