MySQL память продолжает расти после перезапускаMySql

Форум по Mysql
Ответить
Anonymous
 MySQL память продолжает расти после перезапуска

Сообщение Anonymous »

Вот диаграмма памяти PMM, показывающая, что используемая память продолжает расти. Я проверил все диаграммы / метрики, но не могу объяснить, куда идет память. Может, вы можете дать мне советы, что я могу проверить? Вот моя конфигурация < /p>

Код: Выделить всё

# Percona Toolkit MySQL Summary Report #######################
System time | 2025-03-14 14:37:17 UTC (local TZ:  +03 +0300)
# Instances ##################################################
Port  Data Directory             Nice OOM Socket
===== ========================== ==== === ======
0    0
# MySQL Executable ###########################################
Path to executable | /usr/sbin/mysqld
Has symbols | No
# Slave Hosts ################################################
No slaves found
# Report On Port 3306 ########################################
User | pmm@127.0.0.1
Time | 2025-03-14 17:37:17 (+03)
Hostname | hostname
Version | 5.7.44-48 Percona Server (GPL), Release 48, Revision 497f936a373
Built On | Linux x86_64
Started | 2025-03-13 09:14 (up 1+08:23:13)
Databases | 7
Datadir | /var/lib/mysql/
Processes | 40 connected, 3 running
Replication | Is not a slave,  has 0 slaves connected
Pidfile | /var/run/mysqld/mysqld.pid (exists)
# Processlist ################################################

Command                        COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
Query                                 3       3         1         1
Sleep                                35       0     70000     17500

User                           COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
bitrix0                              10       2         1         1
pmm                                   5       1         0         0
userdb1                          25       0         0         0

Host                           COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
127.0.0.1                             5       1         0         0
localhost                            35       2         1         1

db                             COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
NULL                                  5       1         0         0
userdb1-b24                            25       0         0         0
mydb                          10       2         1         1

State                          COUNT(*) Working SUM(Time) MAX(Time)
------------------------------ -------- ------- --------- ---------
35       0         0         0
Sending data                          2       2         1         1
starting                              1       1         0         0

# Status Counters (Wait 10 Seconds)  # # # # # # # # # # # # # # # # # # # # # # # # # # < b r   / > V a r i a b l e                                                                 P e r   d a y     P e r   s e c o n d           1 1   s e c s < b r   / > A b o r t e d _ c l i e n t s                                                           3 0 0                                                 < b r   / > A b o r t e d _ c o n n e c t s                                                             2                                                 < b r   / > B y t e s _ r e c e i v e d                                             3 0 0 0 0 0 0 0 0 0 0             3 5 0 0 0 0             3 0 0 0 0 0 < b r   / > B y t e s _ s e n t                                                     1 7 5 0 0 0 0 0 0 0 0 0           2 2 5 0 0 0 0           1 0 0 0 0 0 0 < b r   / > C o m _ a d m i n _ c o m m a n d s                                                 2 5 0 0 0                                                 < b r   / > C o m _ b e g i n                                                                   1 2 5 0 0                                                 < b r   / > C o m _ c h a n g e _ d b                                                                   8                                                 < b r   / > C o m _ c o m m i t                                                                 1 2 5 0 0                                                 < b r   / > C o m _ d e l e t e                                                             1 2 5 0 0 0 0                     1 5                     3 0 < b r   / > C o m _ d e l e t e _ m u l t i                                                     8 0 0 0 0                                               3 < b r   / > C o m _ e m p t y _ q u e r y                                                       5 0 0 0 0                                                 < b r   / > C o m _ i n s e r t                                                             1 7 5 0 0 0 0                     2 0                     2 0 < b r   / > C o m _ i n s e r t _ s e l e c t                                                 3 5 0 0 0 0                       4                       5 < b r   / > C o m _ r e p l a c e                                                                 7 0 0 0                                                 < b r   / > C o m _ r o l l b a c k                                                                   1 0                                                 < b r   / > C o m _ s e l e c t                                                           5 0 0 0 0 0 0 0                   6 0 0                   4 5 0 < b r   / > C o m _ s e t _ o p t i o n                                                     1 0 0 0 0 0 0                     1 5                     1 5 < b r   / > C o m _ s h o w _ b i n l o g s                                                           1 5                                                 < b r   / > C o m _ s h o w _ c r e a t e _ d b                                                       2 5                                                 < b r   / > C o m _ s h o w _ c r e a t e _ t a b l e                                                   5                                                 < b r   / > C o m _ s h o w _ d a t a b a s e s                                                       2 0                                                 < b r   / > C o m _ s h o w _ e n g i n e _ s t a t u s                                           9 0 0 0                                                 < b r   / > C o m _ s h o w _ f i e l d s                                                         4 0 0 0                                                 < b r   / > C o m _ s h o w _ k e y s                                                             1 0 0 0                                                 < b r   / > C o m _ s h o w _ m a s t e r _ s t a t u s                                               1 5                                                 < b r   / > C o m _ s h o w _ p l u g i n s                                                       1 5 0 0                                                 < b r   / > C o m _ s h o w _ p r o c e s s l i s t                                                   1 5                                                 < b r   / > C o m _ s h o w _ s l a v e _ h o s t s                                                   1 5                                                 < b r   / > C o m _ s h o w _ s l a v e _ s t a t u s                                             9 0 0 0                                                 < b r   / > C o m _ s h o w _ s t a t u s                                                       1 7 5 0 0                                                 < b r   / > C o m _ s h o w _ t a b l e _ s t a t u s                                                   4                                                 < b r   / > C o m _ s h o w _ t a b l e s                                                       4 5 0 0 0                                                 < b r   / > C o m _ s h o w _ v a r i a b l e s                                                   4 5 0 0                                                 < b r   / > C o m _ s h o w _ w a r n i n g s                                                           2                                                 < b r   / > C o m _ s t m t _ e x e c u t e                                                           2 5                                                 < b r   / > C o m _ s t m t _ c l o s e                                                               2 5                                                 < b r   / > C o m _ s t m t _ p r e p a r e                                                           2 5                                                 < b r   / > C o m _ t r u n c a t e                                                                     2                                                 < b r   / > C o m _ u p d a t e                                                             2 0 0 0 0 0 0                     2 0                     2 5 < b r   / > C o m _ u p d a t e _ m u l t i                                                     8 0 0 0 0                                               3 < b r   / > C o n n e c t i o n s                                                             2 2 5 0 0 0                       2                       4 < b r   / > C r e a t e d _ t m p _ d i s k _ t a b l e s                                   3 5 0 0 0 0 0                     4 0                     1 5 < b r   / > C r e a t e d _ t m p _ f i l e s                                                   1 2 5 0 0                                                 < b r   / > C r e a t e d _ t m p _ t a b l e s                                             6 0 0 0 0 0 0                     7 0                     5 0 < b r   / > H a n d l e r _ c o m m i t                                                   5 0 0 0 0 0 0 0                   6 0 0                   5 0 0 < b r   / > H a n d l e r _ d e l e t e                                                     1 2 5 0 0 0 0                     1 5                       8 < b r   / > H a n d l e r _ e x t e r n a l _ l o c k                                   2 2 5 0 0 0 0 0 0                 2 5 0 0                 2 0 0 0 < b r   / > H a n d l e r _ r e a d _ f i r s t                                             7 0 0 0 0 0 0                     8 0                     6 0 < b r   / > H a n d l e r _ r e a d _ k e y                                           6 0 0 0 0 0 0 0 0 0               7 0 0 0 0               1 7 5 0 0 < b r   / > H a n d l e r _ r e a d _ l a s t                                                   6 0 0 0 0                                                 < b r   / > H a n d l e r _ r e a d _ n e x t                                       7 0 0 0 0 0 0 0 0 0 0             8 0 0 0 0 0           1 2 5 0 0 0 0 < b r   / > H a n d l e r _ r e a d _ p r e v                                           2 2 5 0 0 0 0 0 0                 2 5 0 0                       5 < b r   / > H a n d l e r _ r e a d _ r n d                                             2 5 0 0 0 0 0 0 0                 3 0 0 0                   7 0 0 < b r   / > H a n d l e r _ r e a d _ r n d _ n e x t                                 2 5 0 0 0 0 0 0 0 0               3 0 0 0 0                 1 2 5 0 < b r   / > H a n d l e r _ r o l l b a c k                                                         3 0 0                                                 < b r   / > H a n d l e r _ u p d a t e                                                     5 0 0 0 0 0 0                     6 0                     3 5 < b r   / > H a n d l e r _ w r i t e                                                   2 5 0 0 0 0 0 0 0                 3 0 0 0                   3 0 0 < b r   / > I n n o d b _ b a c k g r o u n d _ l o g _ s y n c                                 9 0 0 0 0                                               1 < b r   / > I n n o d b _ b u f f e r _ p o o l _ b y t e s _ d a t a               1 2 5 0 0 0 0 0 0 0 0             1 5 0 0 0 0                 7 0 0 0 < b r   / > I n n o d b _ b u f f e r _ p o o l _ b y t e s _ d i r t y                 4 5 0 0 0 0 0 0 0                 5 0 0 0               6 0 0 0 0 < b r   / > I n n o d b _ b u f f e r _ p o o l _ p a g e s _ f l u s h e d                 1 2 5 0 0 0 0                     1 5                         < b r   / > I n n o d b _ b u f f e r _ p o o l _ p a g e s _ m a d e _ n o t _ y o u n g           1 5 0 0 0 0 0                     2 0                         < b r   / > I n n o d b _ b u f f e r _ p o o l _ p a g e s _ m a d e _ y o u n g             7 0 0 0 0 0                       7                         < b r   / > I n n o d b _ b u f f e r _ p o o l _ p a g e s _ o l d                           3 0 0 0 0 0                       3                         < b r   / > I n n o d b _ b u f f e r _ p o o l _ r e a d _ a h e a d                           6 0 0 0 0                                                 < b r   / > I n n o d b _ b u f f e r _ p o o l _ r e a d _ r e q u e s t s         1 0 0 0 0 0 0 0 0 0 0 0           1 2 5 0 0 0 0           1 5 0 0 0 0 0 < b r   / > I n n o d b _ b u f f e r _ p o o l _ r e a d s                                   7 0 0 0 0 0                       7                         < b r   / > I n n o d b _ b u f f e r _ p o o l _ w r i t e _ r e q u e s t s           2 5 0 0 0 0 0 0 0                 3 0 0 0                 1 2 5 0 < b r   / > I n n o d b _ c h e c k p o i n t _ a g e                                   1 7 5 0 0 0 0 0 0                 2 0 0 0               4 5 0 0 0 < b r   / > I n n o d b _ c h e c k p o i n t _ m a x _ a g e                         1 2 5 0 0 0 0 0 0 0               1 5 0 0 0                         < b r   / > I n n o d b _ d a t a _ f s y n c s                                               8 0 0 0 0 0                       8                       1 < b r   / > I n n o d b _ d a t a _ r e a d                                         1 2 5 0 0 0 0 0 0 0 0             1 5 0 0 0 0                 6 0 0 0 < b r   / > I n n o d b _ d a t a _ r e a d s                                                800000           8
Innodb_data_writes                      5000000          60          60
Innodb_data_written                 30000000000      350000      100000
Innodb_dblwr_pages_written               700000           7
Innodb_dblwr_writes                      300000           3
Innodb_ibuf_free_list                      5000
Innodb_ibuf_segment_size                   5000
Innodb_log_write_requests               6000000          70         125
Innodb_log_writes                       3500000          40          60
Innodb_lsn_current                  1250000000000    15000000       45000
Innodb_lsn_flushed                  1250000000000    15000000       40000
Innodb_lsn_last_checkpoint          1250000000000    15000000
Innodb_master_thread_active_loops         70000                       1
Innodb_master_thread_idle_loops           12500
Innodb_max_trx_id                    2500000000       30000         125
Innodb_mem_adaptive_hash             1000000000       12500
Innodb_mem_dictionary                  90000000        1000
Innodb_oldest_view_low_limit_trx_id  2500000000       30000         125
Innodb_os_log_fsyncs                      80000                       1
Innodb_os_log_written                6000000000       70000      100000
Innodb_pages_created                      22500
Innodb_pages_read                        800000           8
Innodb_pages0_read                         1500
Innodb_pages_written                    1250000          15
Innodb_purge_trx_id                  2500000000       30000         125
Innodb_row_lock_time                       1750
Innodb_row_lock_waits                        50
Innodb_rows_deleted                     1250000          15           8
Innodb_rows_inserted                  250000000        3000         450
Innodb_rows_read                    80000000000      900000     1250000
Innodb_rows_updated                     1750000          20          30
Innodb_num_open_files                      1500
Innodb_available_undo_logs                   90
Innodb_secondary_index_triggered_cluster_reads 15000000000      175000       70000
Innodb_secondary_index_triggered_cluster_reads_avoided      125000           1
Innodb_buffered_aio_submitted             60000
Key_read_requests                            30
Key_reads                                     3
Open_table_definitions                     1250
Opened_files                              17500
Opened_table_definitions                   4500
Opened_tables                           3500000          40          45
Performance_schema_digest_lost           600000           7           1
Queries                                60000000         600         600
Questions                              60000000         600         600
Select_full_join                         200000           2           1
Select_full_range_join                   450000           5
Select_range                            5000000          60          35
Select_range_check                         4500
Select_scan                             3500000          40          50
Sort_merge_passes                         70000
Sort_range                              3000000          40          40
Sort_rows                             225000000        2500         700
Sort_scan                               6000000          70          45
Ssl_accepts                                 350                       1
Ssl_finished_accepts                        350                       1
Table_locks_immediate                    125000           1           1
Table_open_cache_hits                 100000000        1250         900
Table_open_cache_misses                 3500000          40          45
Table_open_cache_overflows              3500000          40          45
Threads_created                              70
Uptime                                    90000           1           1
# Table cache ################################################
Size | 2395
Usage | 100%
# Key Percona Server features ################################
Table &  Index Stats | Disabled
Multiple I/O Threads | Enabled
Corruption Resilient | Enabled
Durable Replication | Not Supported
Import InnoDB Tables | Not Supported
Fast Server Restarts | Not Supported
Enhanced Logging | Disabled
Replica Perf Logging | Disabled
Response Time Hist.  | Enabled
Smooth Flushing | Not Supported
HandlerSocket NoSQL | Not Supported
Fast Hash UDFs | Unknown
# Percona XtraDB Cluster #####################################
# Plugins ####################################################
InnoDB compression | ACTIVE
# Query cache ################################################
query_cache_type | OFF
Size | 0.0
Usage | 0%
HitToInsertRatio | 0%
# Schema #####################################################
Specify --databases or --all-databases to dump and summarize schemas
# Noteworthy Technologies ####################################
SSL | Yes
Explicit LOCK TABLES | No
Delayed Insert | No
XA Transactions | No
NDB Cluster | No
Prepared Statements | Yes
Prepared statement count | 0
# InnoDB #####################################################
Version | 5.7.44-48
Buffer Pool Size | 24.0G
Buffer Pool Fill | 70%
Buffer Pool Dirty | 2%
File Per Table | ON
Page Size | 16k
Log File Size | 2 * 1.0G = 2.0G
Log Buffer Size | 128M
Flush Method | O_DIRECT
Flush Log At Commit | 2
XA Support | ON
Checksums | ON
Doublewrite | ON
R/W I/O Threads | 8 4
I/O Capacity | 200
Thread Concurrency | 0
Concurrency Tickets | 5000
Commit Concurrency | 0
Txn Isolation Level | READ-COMMITTED
Adaptive Flushing | ON
Adaptive Checkpoint |
Checkpoint Age | 212M
InnoDB Queue | 0 queries inside InnoDB, 0 queries in queue
Oldest Transaction | 0 Seconds
History List Len | 58
Read Views | 2
Undo Log Entries | 0 transactions, 0 total undo, 0 max undo
Pending I/O Reads | 0 buf pool reads, 0 normal AIO, 0 ibuf AIO, 0 preads
Pending I/O Writes | 0 buf pool (0 LRU, 0 flush list, 0 page); 0 AIO, 0 sync, 0 log IO (0 log, 0 chkp);  0 pwrites
Pending I/O Flushes | 0 buf pool, 0 log
Transaction States | 34xnot started
# MyISAM #####################################################
Key Cache | 16.0M
Pct Used | 20%
Unflushed | 0%
# Security ###################################################
Users | 8 users, 0 anon, 0 w/o pw,  0   o l d   p w < b r   / >                         O l d   P a s s w o r d s   |   0 < b r   / > #   E n c r y p t i o n   # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # < b r   / > N o   k e y r i n g   p l u g i n s   f o u n d < b r   / > #   B i n a r y   L o g g i n g   # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # < b r   / > #   N o t e w o r t h y   V a r i a b l e s   # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # < b r   / >           A u t o - I n c   I n c r / O f f s e t   |   1 / 1 < b r   / >       d e f a u l t _ s t o r a g e _ e n g i n e   |   I n n o D B < b r   / >                               f l u s h _ t i m e   |   0 < b r   / >                           i n i t _ c o n n e c t   |   S E T   N A M E S   u t f 8   C O L L A T E   u t f 8 _ u n i c o d e _ c i < b r   / >                                 i n i t _ f i l e   |   < b r   / >                                   s q l _ m o d e   |   < b r   / >                   j o i n _ b u f f e r _ s i z e   |   2 M < b r   / >                   s o r t _ b u f f e r _ s i z e   |   2 M < b r   / >                   r e a d _ b u f f e r _ s i z e   |   1 2 8 k < b r   / >           r e a d _ r n d _ b u f f e r _ s i z e   |   2 5 6 k < b r   / >               b u l k _ i n s e r t _ b u f f e r   |   0 . 0 0 < b r   / >          max_heap_table_size | 1G
tmp_table_size | 1G
max_allowed_packet | 16M
thread_stack | 128k
log |
log_error | /var/log/mysql/error.log
log_warnings | 2
log_slow_queries |
log_queries_not_using_indexes | OFF
log_slave_updates | OFF
# Configuration File #########################################
Config File | /etc/my.cnf

[client]
port                                = 3306
socket                              = /var/lib/mysqld/mysqld.sock
default-character-set               = utf8

[mysqld_safe]
nice                                = 0
socket                              = /var/lib/mysqld/mysqld.sock

[mysqld]
user                                = mysql
port                                = 3306
basedir                             = /usr
datadir                             = /var/lib/mysql
socket                              = /var/lib/mysqld/mysqld.sock
skip-external-locking
default-storage-engine              = innodb
pid-file                            = /var/run/mysqld/mysqld.pid
transaction-isolation               = READ-COMMITTED
max_allowed_packet                  = 16M
myisam-recover-options              = BACKUP
explicit_defaults_for_timestamp     = 1
expire_logs_days                    = 10
max_binlog_size                     = 100M
sql_mode                            = ""
query_cache_size                    = 32M
table_open_cache                    = 4096
thread_cache_size                   = 32
key_buffer_size                     = 16M
thread_stack                        = 128K
join_buffer_size                    = 2M
sort_buffer_size                    = 2M
tmpdir                              = /tmp
max_heap_table_size                 = 32M
tmp_table_size                      = 32M
innodb_file_per_table
innodb_buffer_pool_size             = 32M
innodb_flush_log_at_trx_commit      = 2
innodb_log_file_size                = 64M
innodb_flush_method                 = O_DIRECT
innodb_strict_mode                  = OFF
character-set-server                = utf8
collation-server                    = utf8_unicode_ci
init-connect                        = "SET NAMES utf8 COLLATE utf8_unicode_ci"
skip-name-resolve

[mysqldump]
quick
quote-names
max_allowed_packet                  = 16M
default-character-set               = utf8

[mysql]

[isamchk]
key_buffer                          = 16M
# /etc/mysql/conf.d/logging.cnf

[mysqld_safe]
log-error                           = /var/log/mysql/error.log

[mysqld]
log-error                           = /var/log/mysql/error.log
# /etc/mysql/conf.d/bvat.cnf

[mysqld]
query_cache_type                    = 1
query_cache_size                    = 128M
query_cache_limit                   = 16M
innodb_buffer_pool_size             = 18432M
max_connections                     = 205
table_open_cache                    = 18432
thread_cache_size                   = 512
max_heap_table_size                 = 128M
tmp_table_size                      = 128M
key_buffer_size                     = 256M
join_buffer_size                    = 32M
sort_buffer_size                    = 32M
bulk_insert_buffer_size             = 2M
myisam_sort_buffer_size             = 32M
# /etc/mysql/conf.d/z_bx_custom.cnf

[mysqld]
query_cache_limit                   = 64M
max_connections                     = 200
max_heap_table_size                 = 1024M
tmp_table_size                      = 1Gb
query_response_time_stats           = on
innodb_read_io_threads              = 8
query_cache_type                    = off
query_cache_size                    = 0
join_buffer_size                    = 2M
sort_buffer_size                    = 2M
key_buffer_size                     = 16M
table_open_cache                    = 8192
innodb_buffer_pool_instances        = 8
innodb_buffer_pool_size             = 24g
innodb_log_file_size                = 1g
innodb_log_buffer_size              = 128M
max_digest_length                   = 20480
performance_schema_max_digest_length = 20480
performance_schema_max_sql_text_length = 20480
open_files_limit                    = 10000
# Memory management library ##################################
jemalloc is not enabled in mysql config for process with id 2817


Подробнее здесь: https://stackoverflow.com/questions/795 ... er-restart
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «MySql»