• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Memory usage after backup

rilCy

New Pleskian
Hello,

I would like to request your help regarding memory usage, could not find any relevant things about what i encounter.

I recently did some performance tuning on MySQL in order to lower its memory usage

Server specifications :

OS : Debian 9.13
Plesk version : Plesk Obsidian Version 18.0.30 Update #3
RAM : 16 Go
CPU : 8
Disk : 512 Go ( HDD )
FS : XFS

Here is the list of what i tuned :

General stuff

INI:
[mysqld]
max_connections = 100
key_buffer_size = 1G
query_cache_size = 64M
table_cache = 16384
max_heap_table_size = 128M
tmp_table_size = 128M
open_files_limit = 32768

InnoDB specific

INI:
[mysqld]
innodb_io_capacity = 2000
innodb_read_io_threads = 64
innodb_write_io_threads = 64
innodb_thread_concurrency = 0
innodb_buffer_pool_size    = 4GB
innodb_log_file_size = 1GB

After i pushed these values and restarted MySQL i was really happy because i could see a huge memory usage improvement (event after a few hours MySQL has restarted)

But, i noticed that the daily backups that occurs during the night ( 2:30 in my case ) are reclaiming a lot of memory which is completely normal, unfortunately even after the backups are done i can see on the grafs that the memory is not released, it just keep at the same level as it was during the backups (i mean the memory_used metric).

Is it normal ? Shouldn't the system reclaim that memory once backups are done ? I mean it's not in the cached part as some posts suggest.
I attached a screenshot from the Real memory usage graf with details, we can see that after the last backup the memory usage keep high.

( Hopefully, those MySQL optimizations have permitted to lower the swap usage (second screenshot) but still i was expecting to gain on memory_used )

Thank you in advance for your advices / help

Cheers
 

Attachments

  • screenshot 2020-11-19 à 11.07.38.png
    screenshot 2020-11-19 à 11.07.38.png
    90.3 KB · Views: 17
  • screenshot 2020-11-19 à 11.13.06.png
    screenshot 2020-11-19 à 11.13.06.png
    105.7 KB · Views: 18
Hello
I m observing quite the same phenomena, but not exactly after searching around MySQL (mariadb) I found that the cached memory was still high... and that affects the general hosting perfomances... finally the best I found is rebooting the server after the backup, this is not clean but the best result for the performance.... is anybody having a better solution ? What process make this memory use and cache that is not necessary and at all not emptyied when necessary ?
What did you do on your server ? for now ?
 
cached memory was still high... and that affects the general hosting perfomances...
No way.

finally the best I found is rebooting the server after the backup, this is not clean but the best result for the performance.... is anybody having a better solution ?
Do nothing, just let the system decide what is best.

Cache and other RAM usage is automatically cleared if a process requests RAM that cannot be served from parts that are not yet in use. It is the normal way of Linux to manage RAM.
 
Indeed. A backup does a SQL dump, which is basically a full read of the database, so some caches will be used in MySQL. That's normal, expected, and as Peter mentioned, just let the systems manage memory unless you're getting errors or issues. High cached memory usage won't result in lower performance unless it means something else doesn't get cached.
 
Back
Top