During a recent problem / slow down with one of our slave databases I noticed that when I ran SHOW ENGINE INNODB STATUS
. I am getting the following:
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 822986039, signal count 17045541908
--Thread 140562108442368 has waited at row0sel.c line 2930 for 0.00 seconds the semaphore:
S-lock on RW-latch at 0x7fd752e55c40 created in file buf0buf.c line 938
a writer (thread id 140562088974080) has reserved it in mode exclusive
number of readers 0, waiters flag 1, lock_word: 0
Last time read locked in file row0sel.c line 2930
Last time write locked in file /tmp/buildd/mysql-5.5-5.5.44/storage/innobase/buf/buf0buf.c line 3168
In fact, there are about 15 instances of this.
Looking at the transactions there are apx 200 transactions listed, of which there are apx half showing as waiting in InnoDB queue
, and the other half are fetching data
.
All the transactions are SELECT
queries, and none of them are showing any locks
.
Can anyone tell me what the SEMAPHORES
(above) relate to ?