Hi team, Druid Mysql memory consumption is exponen...
# general
s
Hi team, Druid Mysql memory consumption is exponentially increasing till 15.5 GB. Do you think, having the long connections cause this high memory utilization ? I checked the data present in the tables is reasonable. please let me know, if you have any thoughts around this. ?? below is the mysql innodb server status output. FYI (mysql server version 5.7)
Copy code
| InnoDB |   |
=====================================
2023-09-25 21:18:48 0x7fefb841a700 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 47 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 884619 srv_active, 0 srv_shutdown, 1265957 srv_idle
srv_master_thread log flush and writes: 2150576
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 12446264
OS WAIT ARRAY INFO: signal count 2454269095
RW-shared spins 0, rounds 6352264963, OS waits 5767194
RW-excl spins 0, rounds 9992243159, OS waits 1113429
RW-sx spins 2301179, rounds 46764445, OS waits 925992
Spin rounds per wait: 6352264963.00 RW-shared, 9992243159.00 RW-excl, 20.32 RW-sx
------------
TRANSACTIONS
------------
Trx id counter 256757259
Purge done for trx's n:o < 256757197 undo n:o < 0 state: running but idle
History list length 34
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 422143035000760, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034994320, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034992480, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143035002600, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143035001680, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034999840, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034998920, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034998000, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034997080, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034996160, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034995240, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143034993400, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143035012720, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
---TRANSACTION 422143035003520, not started
0 lock struct(s), heap size 1136, 0 row lock(s)
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: [0, 0, 0, 0] , aio writes: [0, 0, 0, 0] ,
 ibuf aio reads:, log i/o's:, sync i/o's:
Pending flushes (fsync) log: 0; buffer pool: 0
14584357778 OS file reads, 96650379 OS file writes, 51158363 OS fsyncs
420.03 reads/s, 16384 avg bytes/read, 35.32 writes/s, 11.47 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 3081, seg size 3083, 3737900 merges
merged operations:
 insert 3704943, delete mark 14680573, delete 2058094
discarded operations:
 insert 0, delete mark 0, delete 0
Hash table size 34679, node heap has 1 buffer(s)
Hash table size 34679, node heap has 1 buffer(s)
Hash table size 34679, node heap has 8 buffer(s)
Hash table size 34679, node heap has 24 buffer(s)
Hash table size 34679, node heap has 1 buffer(s)
Hash table size 34679, node heap has 1 buffer(s)
Hash table size 34679, node heap has 1 buffer(s)
Hash table size 34679, node heap has 77 buffer(s)
73798.43 hash searches/s, 6245.65 non-hash searches/s
---
LOG
---
Log sequence number 165936593358
Log flushed up to 165936593358
Pages flushed up to 165936593358
Last checkpoint at 165936593276
0 pending log flushes, 0 pending chkp writes
40468122 log i/o's done, 7.02 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total large memory allocated 137428992
Dictionary memory allocated 174706
Buffer pool size 8192
Free buffers   1024
Database pages  7054
Old database pages 2583
Modified db pages 0
Pending reads   0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 362342558, not young 338084131227
0.00 youngs/s, 0.00 non-youngs/s
Pages read 14584425674, created 1721357, written 50609351
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 999 / 1000, young-making rate 4 / 1000 not 44 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 7054, unzip_LRU len: 0
I/O sum[24842]:cur[0], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Process ID=1, Main thread ID=140667619632896, state: sleeping
Number of rows inserted 7072371, updated 32119670, deleted 9777865, read 147954378907
8.11 inserts/s, 0.06 updates/s, 0.00 deletes/s, 79936.09 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================
Copy code
mysql> select count(*) from druid_tasks;
+----------+
| count(*) |
+----------+
|    15048 |
+----------+
1 row in set (0.01 sec)

mysql> select count(*) from druid_tasklogs;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.01 sec)

mysql> select count(*) from druid_tasklocks;
+----------+
| count(*) |
+----------+
|     6463 |
+----------+
1 row in set (0.00 sec)
Copy code
mysql> select count(*) from druid_supervisors;
+----------+
| count(*) |
+----------+
|      163 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from druid_segments;
+----------+
| count(*) |
+----------+
|  1689807 |
+----------+
1 row in set (0.35 sec)

mysql> select count(*) from druid_pendingSegments;
+----------+
| count(*) |
+----------+
|   135225 |
+----------+
1 row in set (0.04 sec)