Home > Database > Mysql Tutorial > Formula for calculating MySQL's peak memory

Formula for calculating MySQL's peak memory

黄舟
Release: 2017-02-18 11:09:45
Original
1140 people have browsed it


-- Formula for calculating MySQL’s peak memory, when all connections are full:

select

(@@key_buffer_size + @@query_cache_size + @@tmp_table_size
    + @@innodb_buffer_pool_size + @@innodb_additional_mem_pool_size
    + @@innodb_log_buffer_size
    + @@max_connections * (
        @@read_buffer_size + @@read_rnd_buffer_size
        + @@sort_buffer_size+ @@join_buffer_size
        + @@binlog_cache_size + @@thread_stack
    )
)/1024/1024/1024;
Copy after login

-- Memory single connection value calculation 1

select @@read_buffer_size , @@read_rnd_buffer_size
        , @@sort_buffer_size, @@join_buffer_size
        , @@binlog_cache_size, @@thread_stack;
Copy after login


-- Memory single Connection value calculation 2

select @@key_buffer_size , @@query_cache_size , @@tmp_table_size
    , @@innodb_buffer_pool_size , @@innodb_additional_mem_pool_size
    , @@innodb_log_buffer_size;
Copy after login

The above is the content of the formula for calculating MySQL’s peak memory. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template