I can see the gradual increase of the memory usage. To further dig down this can you please get the below details with respect to RocksDB engine.
mysql> SHOW STATUS like 'Rocksdb%';
mysql> SHOW ENGINE ROCKSDB STATUS\G;
Also, please attach the RocksDB log file “/var/lib/mysql/.rocksdb/LOG” OR you can check the location with select @@rocksdb_datadir; command.
We also like to review the OS/Database insight. You can get the same via executing below snippet.
PTDEST=/tmp/pt/collected/`hostname`/
mkdir -p $PTDEST;
cd /tmp/pt;
wget http://per.co.na/pt-summary http://per.co.na/pt-mysql-summary
chmod +x pt*;
sudo ./pt-summary > $PTDEST/pt-summary.out;
sudo ./pt-mysql-summary --save-samples=$PTDEST/samples --user=root --password=mysql-root-password > $PTDEST/pt-mysql-summary.out;
Please note that the username and password have to be changed to reflect the correct values of your instance.
Then compress the files and send them as an attachment:
tar czvf $(dirname ${PTDEST})/$(hostname).tar.gz $PTDEST;
Lastly, if enabled PS instrument then you check the global memory usage as per the events happen.
E.g,
select event_name, sum(current_number_of_bytes_used)/1024/1024 mb from performance_schema.memory_summary_global_by_event_name group by event_name order by 2 desc ;
Also sharing a few references in order to troubleshoot memory spike issues.
https://www.percona.com/blog/troubleshooting-mysql-memory-usage/
https://www.percona.com/blog/what-to-do-when-mysql-runs-out-of-memory-troubleshooting-guide/