Skip to content

Commit

Permalink
feat: some more matomo tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 25, 2024
1 parent 78bef99 commit 32c01fe
Show file tree
Hide file tree
Showing 7 changed files with 3,900 additions and 12 deletions.
2 changes: 1 addition & 1 deletion confs/common/systemd/system/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Description=%i failure email notification
Type=oneshot
# replace __ by @ in instance name to be able to call status on a specific instance
# then use mailx to email status (apt install bsd-mailx if needed)
ExecStart=/bin/bash -c 'INSTANCE_NAME=%i; SERVICE_NAME=$${INSTANCE_NAME//__/@}; /bin/systemctl status $$SERVICE_NAME | /usr/bin/mailx -s "[$$SERVICE_NAME] failure notification" root'
ExecStart=/bin/bash -c 'HOST_NAME=%H;INSTANCE_NAME=%i; SERVICE_NAME=$${INSTANCE_NAME//__/@}; /bin/systemctl status $$SERVICE_NAME | /usr/bin/mailx -s "[$$HOST_NAME][$$SERVICE_NAME] failure notification" root'

23 changes: 16 additions & 7 deletions confs/matomo/mysql/mariadb.conf.d/90-off-configs.cnf
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
[mysqld]
# following https://matomo.org/faq/troubleshooting/faq_183/
wait_timeout=28800
innodb_log_file_size=1024M
max_allowed_packet=512M
net_read_timeout=28800
net_write_timeout=28800
innodb_log_file_size=2048M
max_allowed_packet=2048M

# following https://matomo.org/faq/on-premise/how-to-configure-matomo-for-speed/
# see also https://mariadb.com/resources/blog/10-database-tuning-tips-for-peak-workloads/
innodb_flush_log_at_trx_commit=2
# use tmpfs
tmpdir=/run/mysqld

# specific to use memory
# 8G out of 16G (should be 80% of RAM, but DB is not alone)
innodb_buffer_pool_size=8G
# table size 64M / Go = 64*6
max_heap_table_size=384M
tmp_table_size=384M
# 20G out of 32G (should be 80% of RAM, but DB is not alone)
innodb_buffer_pool_size=20G
innodb_log_buffer_size=2048M
# table size 64M / Go = 64*20
max_heap_table_size=1280M
tmp_table_size=1280M
2 changes: 1 addition & 1 deletion confs/matomo/nginx/sites-enabled/default
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ server {
# # With php-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
# increasing timeout so that API calls to export data do not timeout
fastcgi_read_timeout 600;
fastcgi_read_timeout 1200;
}


Expand Down
Loading

0 comments on commit 32c01fe

Please sign in to comment.