MySQL Memory Calculator

Use this form when tuning your MySQL database server to calculate the maximum MySQL memory usage based on configuration settings used in your my.cnf file for InnoDB.

MySql version:
Paste you configuration:

Default value is 8 MB. key_buffer_size is a MyISAM variable which determines the size of the index buffers held in memory, which affects the speed of index reads. Note that Aria tables by default make use of an alternative setting, aria-pagecache-buffer-size. A good rule of thumb for servers consisting particularly of MyISAM tables is for about 25% or more of the available server memory to be dedicated to the key buffer. Recommended value 16-32 MB. The max value (32 bit) is 4095.9999990463257.

Default value is 0 MB. The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0. Deprecation includes query_cache_size.The amount of memory allocated for caching query results. By default, the query cache is disabled. Recommended value 0 MB.

Default value is 128 MB. The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. A larger buffer pool requires less disk I/O to access the same table data more than once. On a dedicated database server, you might set the buffer pool size to 80% of the machine's physical memory size. Be aware of the following potential issues when configuring buffer pool size, and be prepared to scale back the size of the buffer pool if necessary.Recommended value is 70-80 % of available RAM.

Default value is 16 MB. The size in bytes of the buffer that InnoDB uses to write to the log files on disk.Recommended value 16 MB.

The default is 64MB. The maximum size of one packet or any generated/intermediate string, or any parameter sent by the mysql_stmt_send_long_data() C API function.Recommended value 64 MB.

The default is 151. The maximum permitted number of simultaneous client connections. The maximum effective value is the lesser of the effective value of open_files_limit - 810, and the value actually set for max_connections.

The default is 0.125 MB. Each thread that does a sequential scan for a MyISAM table allocates a buffer of this size (in bytes) for each table it scans. If you do many sequential scans, you might want to increase this value, which defaults to 131072. The value of this variable should be a multiple of 4KB. If it is set to a value that is not a multiple of 4KB, its value is rounded down to the nearest multiple of 4KB.

The default is 0.25 MB. This variable is used for reads from MyISAM tables, and, for any storage engine, for Multi-Range Read optimization.

The default is 0.25 MB. Each session that must perform a sort allocates a buffer of this size. sort_buffer_size is not specific to any storage engine and applies in a general manner for optimization. At minimum the sort_buffer_size value must be large enough to accommodate fifteen tuples in the sort buffer. Also, increasing the value of max_sort_length may require increasing the value of sort_buffer_size. The max value (Windows , Other 32 bit) is 4095.9999990463257. The max value (Other 64 bit) is 17592186044416.

The default is 0.25 MB. The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. One join buffer is allocated for each full join between two tables. For a complex join between several tables for which indexes are not used, multiple join buffers might be necessary. The max value (Windows , Other 32 bit) is 39999.99987793. The max value (Other 64 bit) is 17592186044416.

The default is 0.03125 MB. The size of the memory buffer to hold changes to the binary log during a transaction. The max value (32 bit) is 4095.9999990463257. The max value (64 bit) is 17592186044415.996.

The default is 1 MB. The stack size for each thread. The default is large enough for normal operation. If the thread stack size is too small, it limits the complexity of the SQL statements that the server can handle, the recursion depth of stored procedures, and other memory-consuming actions. The max value (32 bit) is 4095.9990234375. The max value (64 bit) is 17592186044416.

The default is 16 MB. Defines the maximum size of internal in-memory temporary tables created by the MEMORY storage engine and, as of MySQL 8.0.28, the TempTable storage engine. If an internal in-memory temporary table exceeds this size, it is automatically converted to an on-disk internal temporary table.Less than 1% of available RAM.

The default is 0.015625 MB. Each client thread is associated with a connection buffer and result buffer. Both begin with a size given by net_buffer_length but are dynamically enlarged up to max_allowed_packet bytes as needed. The result buffer shrinks to net_buffer_length after each SQL statement. This variable should not normally be changed, but if you have very little memory, you can set it to the expected length of statements sent by clients. If statements exceed this length, the connection buffer is automatically enlarged. The maximum value to which net_buffer_length can be set is 1MB.
Total:
2572 MB