Skip to content
Snippets Groups Projects
Verified Commit 8f1056fa authored by Quentin Duchemin's avatar Quentin Duchemin
Browse files

[EtherpadDB] Try to optimize performance of index cache

parent b27cba1d
No related branches found
No related tags found
No related merge requests found
Pipeline #60605 waiting for manual action
## mysql8.picapatch2
Try to improve performance of MySQL
* Increase [key_buffer_size](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_key_buffer_size) given that the index file is way too big for the default value
* Also increase `read_buffer_size` to a [recommended value](https://dba.stackexchange.com/a/136409) of 256K
* More precise base image tag
## mysql8.picapatch1
......
FROM mysql:8
COPY config/binary_log.cnf /etc/mysql/conf.d/binary_log.cnf
COPY config/myisam_perf.cnf /etc/mysql/conf.d/myisam_perf.cnf
# By default, COPY uses permissions `-rw-rw-rw-` for the file inside
# the container. But mysql refuses to use config files that are world-
......
[mysqld]
# The default value is 8Mo.
# Given this documentation : https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_key_buffer_size,
# we see that the Key_reads/Key_read_requests ratio should normally be less than 0.01.
# At the moment (04/2020), the ratio is more than 0.05, which indicates that the index is far larger than
# the cache. The index is 300M. Right now with this setting, we will "waste" 700M of RAM,
# which we can afford, and foresee further increase.
key_buffer_size=1G
read_buffer_size=256K
......@@ -4,4 +4,4 @@ version : "2.4"
services:
etherpad-db:
image: registry.picasoft.net/pica-etherpad-db:mysql8.picapatch1
image: registry.picasoft.net/pica-etherpad-db:mysql8.picapatch2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment