Event_Scheduler Huge memory leak in MySQL 8 version
Posted by: Manoj Soni
Date: June 13, 2019 04:05AM

Hi All,

My Current Scenario is want to go in MySQL version 8 but getting lots of performance issues and drastically huge memory leak.


I observed in MySQL 8 version the event schedule thread is constantly utilizing the memory.

Test Case:

-> Create a simply 10 test events and schedule it on MySQL version 5.7 and version 8.

Do not try to call any procedure through event nor any dml operations.
------------------------------------------------------------------------

DELIMITER $$

ALTER DEFINER=`root`@`%` EVENT `call_TestEvents01` ON SCHEDULE EVERY 5 SECOND STARTS '2019-06-12 07:00:00' ON COMPLETION PRESERVE ENABLE DO BEGIN

-- CALL TestScheduler();

END$$

DELIMITER ;
------------------------------------------------------------------------

Now my observation is that whenever I have checked the event how much does the memory consumes for event scheduler and I have found out the syntax to check the current memory allocation for that we need to ON the performance_schema and also need to update the memory instrument to get the output for it.
------------------------------------------------------------------------
UPDATE performance_schema.setup_instruments
SET ENABLED = 'YES'
WHERE NAME LIKE 'memory/%';
------------------------------------------------------------------------
The syntax for monitoring the memory allocation for all the threads.

SELECT thread_id tid, USER, current_count_used ccu, current_allocated ca, current_avg_alloc caa, current_max_alloc cma, total_allocated FROM sys.memory_by_thread_by_current_bytes;

check the rows for USER: 'sql/event_scheduler' or you can use it through where clause
------------------------------------------------------------------------
You won't see the output until and unless we enable the setup of memory instruments

Now observe with the syntax for at least 2 days and you will identify that on the filed "current_allocated ca " is increasing constantly on MySQL version 8 in GB.

But in MySQL version 5.7 it will hold up with a certain amount of memory in MB.

You will get the major differences in version 8 and version 5.7.

Can anyone give some suggestions on it why does it consume too much of memory?

I would really appreciate to help out on this scenario as soon as possible.



Thanks

Options: ReplyQuote


Subject
Written By
Posted
Event_Scheduler Huge memory leak in MySQL 8 version
June 13, 2019 04:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.