mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Reducing memory when using information schema
The background is that one user had a lot of views and using some complex queries on information schema temporary memory of more than 2G was used. - Added new element 'total_alloc' to MEM_ROOT for easier debugging. - Added MAX_MEMORY_USED to information_schema.processlist. - Added new status variable "Memory_used_initial" that shows how much MariaDB uses at startup. This gives the base value for "Memory_used". - Reuse memory continuously for information schema queries instead of only freeing memory at query end. Other things - Removed some not needed set_notnull() calls for not null columns.
This commit is contained in:
@ -175,6 +175,11 @@
|
||||
#define TABLE_ALLOC_BLOCK_SIZE 1024
|
||||
#define WARN_ALLOC_BLOCK_SIZE 2048
|
||||
#define WARN_ALLOC_PREALLOC_SIZE 1024
|
||||
/*
|
||||
Note that if we are using 32K or less, then TCmalloc will use a local
|
||||
heap without locks!
|
||||
*/
|
||||
#define SHOW_ALLOC_BLOCK_SIZE (32768-MALLOC_OVERHEAD)
|
||||
|
||||
/*
|
||||
The following parameters is to decide when to use an extra cache to
|
||||
|
Reference in New Issue
Block a user