LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-15-2023, 09:37 AM   #1
Jason.nix
Member
 
Registered: Feb 2023
Posts: 569

Rep: Reputation: 10
Post The innodb_buffer_pool_size value in a MySQL server


Hello,
How can I choose the right value for innodb_buffer_pool_size in a MySQL server?
My server has the following amount of memory:
Code:
# free
      total   used    free    shared buff/cache available
Mem:  5924976 1726272 2069744 353176 2128960 
3547828
Swap: 2097148 0 2097148
My MySQL's configuration is as follows:
Code:
[mysqld]
performance_schema = 0
show_compatibility_56 = 1
datadir = /var/lib/mysql
socket = /var/lib/mysql/mysql.sock
slow-query_log_file = /var/log/mysql-slow.log
log-error = /var/log/mysqld.log
max_allowed_packet=268435456
default_storage_engine = InnoDB
max_connections = 151
max_user_connections = 50
thread_cache_size = 151
query_cache_type = 1
query_cache_size = 64M
sort_buffer_size = 2M
tmp_table_size = 32M
read_buffer_size = 128k
read_rnd_buffer_size = 256k
join_buffer_size = 128k
table_definition_cache = 400
table_open_cache = 400
slow_query_log_file = slow.log
slow_query_log = 0
log_queries_not_using_indexes = 1
long_query_time = 0.5
min_examined_row_limit = 100
max_heap_table_size = 64M
innodb_buffer_pool_size = 10M
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit = 2
innodb_log_buffer_size = 8M
innodb_log_file_size = 100M
log_bin
expire_logs_days = 7
In some examples, I saw that the amount of innodb_buffer_pool_size was as big as gigabytes.
How do I determine this value?

Thank you.
 
Old 09-15-2023, 09:51 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,123

Rep: Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373Reputation: 7373
https://scalegrid.io/blog/calculatin...-mysql-server/
 
1 members found this post helpful.
Old 09-15-2023, 12:07 PM   #3
Jason.nix
Member
 
Registered: Feb 2023
Posts: 569

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by pan64 View Post
Hello,
Thank you so much for your reply.
Great article.
My server has 5GB of RAM, So the amount of InnoDB buffer pool size should be 3.35GB.

Last edited by Jason.nix; 09-16-2023 at 12:26 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
strange value assignments variable = value, value?? ostrow30 Programming 2 07-24-2011 07:59 AM
difference between value *value and value * value PoleStar Linux - Newbie 1 11-26-2010 03:37 PM
set mysql default value to value of other field kpachopoulos Programming 1 10-11-2007 09:04 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. SpellChainz Linux - Newbie 1 06-23-2007 03:35 PM
mysql error Can't connect to local MySQL server through socket '/var/lib/mysql/mysql. Dannux Linux - Software 3 03-24-2006 08:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration