HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Does innodb_buffer_pool_size accept "*GB" values?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
valuesacceptinnodb_buffer_pool_sizedoes

Problem

I thinks innodb_buffer_pool_size is specified in bytes, would typing in values with unit (i.e 1024MB or 1GB) work? Has anyone already tried this?

Specs:

  • MySQL 5.6

Solution

Using GB or MB wont work. However, any variable that you needs to be defined as a numeric value can use the shorthand byte suffixes K, M or G.

From the docs:


For variables that take a numeric value, the value can be given with a
suffix of K, M, or G (either uppercase or lowercase) to indicate a
multiplier of 1024, 1024^2 or 1024^3. (For example, when used to set
max_allowed_packet, the suffixes indicate units of kilobytes,
megabytes, or gigabytes.)

http://dev.mysql.com/doc/refman/5.6/en/program-variables.html

So, if you wanted 1024MB then you would use 1024M or 1G

Context

StackExchange Database Administrators Q#128544, answer score: 3

Revisions (0)

No revisions yet.