Rodrigo Farcas
Active member
Can anyone point out which is the best configuration for mysqld running big XF boards?
It's totally dependent on the size of your board, and the hardware you are running. What works for me, probably won't work for you unfortunately.Can anyone point out which is the best configuration for mysqld running big XF boards?
# INNODB #
innodb-flush-method = O_DIRECT
innodb-flush-log-at-trx-commit = 2
innodb-file-per-table = 1
innodb-buffer-pool-size = 8G
As a general rule of thumb, if your tables are innodb (which they should be).
Code:# INNODB # innodb-flush-method = O_DIRECT innodb-flush-log-at-trx-commit = 2 innodb-file-per-table = 1 innodb-buffer-pool-size = 8G
These 4 lines are pretty much standard. Obviously alter the buffer pool to whatever you want to give it.
Not really. I use this formula to determine the proper pool size in GB:innodb_buffer_pool_size = 8G
Obviously alter the buffer pool to whatever you want to give it.
mysql> SELECT CEILING(data * 1.5 / POWER(1024, 3)) AS pool_size
FROM (
SELECT SUM(data_length + index_length) AS data
FROM information_schema.tables WHERE engine = 'InnoDB'
) AS result;
+-----------+
| pool_size |
+-----------+
| 4 |
+-----------+
1 row in set (0.02 sec)
innodb_buffer_pool_size = 4G
mysql> SELECT (data * size) / POWER(1024, 3) AS pool_size
FROM (
SELECT variable_value AS data
FROM information_schema.global_status
WHERE variable_name = 'Innodb_buffer_pool_pages_data'
) AS pages_data,
(
SELECT variable_value AS size
FROM information_schema.global_status
WHERE variable_name = 'Innodb_page_size'
) AS page_size;
+--------------------+
| pool_size |
+--------------------+
| 1.5499334716796875 |
+--------------------+
1 row in set (0.03 sec)
Not really. I use this formula to determine the proper pool size in GB:
It's an informed opinion... InnoDB buffer pool < InnoDB data size != GoodIs this "proper" calcuation documented anywhere as being "proper" or just your opinion/reccomendation?
Not really. I use this formula to determine the proper pool size in GB:
/snip/
Edit: The formula calculates the actual size and increases the result by 50%. Obviously you should run this formula at regular intervals, as your lengths increase constantly. You can verify the actual data stored, with this query:
Welcome to the crazy world of MySQL optimizations.
MySQL is pretty much like Nginx, there is no exact science that you set a value and let it die like that for decades. Tuning and maintaining MySQL is a constant ongoing and dynamic process, which explains why sites with large databases often require expensive consulting or a DBA position.Is this "proper" calculation documented anywhere as being "proper" or just your opinion/recommendation?
MySQL is pretty much like Nginx, there is no exact science that you set a value and let it die like that for decades. Tuning and maintaining MySQL is a constant ongoing and dynamic process, which explains why sites with large databases often require expensive consulting or a DBA position.
It depends, it is not recommended to have a large buffer. In fact, Peter Zaitsev recommends to have the buffer 10% higher than actual data and monitor it constantly. Obviously, Percona people know what they are doing... but since I'm lazy, I set it to 50%.
I just stick it at 8gb on my box Why, just cos.
Too high over the needed buffer can effect performance though too.. I run that weekly too, though I use 20% higher rather then the 50% Floren does.
As a general rule of thumb, if your tables are innodb (which they should be).
Code:# INNODB # innodb-flush-method = O_DIRECT innodb-flush-log-at-trx-commit = 2 innodb-file-per-table = 1 innodb-buffer-pool-size = 8G
These 4 lines are pretty much standard. Obviously alter the buffer pool to whatever you want to give it.
We use essential cookies to make this site work, and optional cookies to enhance your experience.