Author Topic: virtual memory size  (Read 1050 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
virtual memory size
« on: February 07, 2023, 08:18:16 PM »
Hello, Why am I getting this warning? Is there a solution?

Code: [Select]
Account:      mysql
Resource:     Virtual Memory Size
Exceeded:     3020 > 512 (MB)
Executable:   /usr/sbin/mariadbd
Command Line: /usr/sbin/mariadbd
PID:          14921 (Parent PID:14921)
Killed:       No

Offline
****
Re: virtual memory size
« Reply #1 on: February 10, 2023, 08:07:37 AM »
Check the available RAM on your server:
Code: [Select]
free -g
cat /proc/meminfo
Check what applications are using large amounts of RAM: top or htop (see the resident vs virtual memory)
Check mysql configuration: /etc/my.cnf or in the configuration directory: /etc/my.cnf.d.
Run
Code: [Select]
vmstat 5 5 to see if the system is reading/writing via virtual memory and if it is swapping...
Do you have a lot of caching in your my.cnf file?

Offline
*
Re: virtual memory size
« Reply #2 on: February 10, 2023, 08:39:54 PM »
@overseer first of all thank you for answering





I didn't make any changes to mysql configuration

I've been getting messages like this every day for about a week

Code: [Select]
Time:         Fri Feb 10 04:00:21 2023 +0300
Account:      mysql
Resource:     Process Time
Exceeded:     190371 > 1800 (seconds)


Executable:   /usr/sbin/mariadbd
Command Line: /usr/sbin/mariadbd
PID:          14921 (Parent PID:14921)
Killed:       No


Offline
****
Re: virtual memory size
« Reply #3 on: February 11, 2023, 12:23:28 AM »
Definitely consider doing some MySQL performance tuning. There are scripts you can download that check your environment and offer suggestions for changes in you my.cnf file.

MySQL allocates memory in tons of places. Especially look at table cache
Performance_schema
Run this:
Code: [Select]
show engine performance_schema status
and look at the last line. That may be the cause for the systems with small amount of RAM, i.e. 1G or less

InnoDB
Run this:
Code: [Select]
show engine innodb status
check the buffer pool section, memory allocated for buffer_pool and related caches)

Temporary tables in RAM
Find all in-memory tables by running
Code: [Select]
select * from information_schema.tables where engine='MEMORY'
Prepared statements, when it is not deallocated (check the number of prepared commands via deallocate command by running
Code: [Select]
show global status like Com_prepare_sql';show global status like 'Com_dealloc_sql'
Welcome to the deep end ;)

Offline
*
Re: virtual memory size
« Reply #4 on: February 11, 2023, 08:26:24 PM »
performance_schema.memory : status : 0

Com_dealloc_sql value : 0