forked from publiclab/plots2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Database tweaks for performance (publiclab#5575)
* Database tweaks for performance * Reduce innodb buffer pool size because of low memory * Reduce RAM burden * Reduce memory consumption following mysqltuner advice. * Even more conservative limits for RAM
- Loading branch information
1 parent
4c96232
commit 0a35e60
Showing
1 changed file
with
39 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,39 @@ | ||
[mysqld] | ||
skip-host-cache | ||
skip-name-resolve | ||
datadir = /var/lib/mysql | ||
|
||
# Plots specific | ||
# To avoid single large file | ||
innodb_file_per_table = 1 | ||
# Replication | ||
#server-id=2 | ||
#log_bin = /var/lib/mysql/log/mysql-bin.log | ||
#binlog_do_db = publiclab_production | ||
# Persist socket | ||
socket = /var/lib/mysql/mysqld.sock | ||
pid-file = /var/lib/mysql/mysqld | ||
|
||
# master-host=172.17.0.1 | ||
#replicate-do-db=publiclab_production | ||
#relay-log=publiclab-relay-bin | ||
#relay-log-index=publiclab-relay-bin.index | ||
|
||
# | ||
# * Fine Tuning | ||
# | ||
key_buffer = 16M | ||
max_allowed_packet = 16M | ||
thread_stack = 192K | ||
thread_cache_size = 8 | ||
max_connections = 50 | ||
wait_timeout = 60 | ||
# | ||
# * Query Cache Configuration | ||
# | ||
query_cache_limit = 1M | ||
query_cache_size = 16M | ||
|
||
# Here you can see queries with especially long duration | ||
slow-query-log = 1 | ||
slow-query-log-file = /var/lib/mysql/log/mysql-slow.log | ||
long_query_time = 5 | ||
|
||
!includedir /etc/mysql/conf.d/ | ||
[mysqld] | ||
skip-host-cache | ||
skip-name-resolve | ||
datadir = /var/lib/mysql | ||
|
||
# To avoid single large file | ||
innodb_file_per_table = 1 | ||
|
||
socket = /var/lib/mysql/mysqld.sock | ||
pid-file = /var/lib/mysql/mysqld | ||
|
||
# | ||
# * Fine Tuning | ||
# | ||
key_buffer = 16M | ||
max_allowed_packet = 16M | ||
thread_stack = 192K | ||
thread_cache_size = 8 | ||
max_connections = 20 | ||
wait_timeout = 60 | ||
innodb_buffer_pool_size = 600M | ||
innodb_log_file_size = 150M | ||
join_buffer_size = 2M | ||
|
||
# | ||
# * Query Cache Configuration | ||
# | ||
#query_cache_limit = 1M | ||
#query_cache_size = 80M | ||
query_cache_limit = 0 | ||
query_cache_size = 0 | ||
# Disabled to reduce RAM overhead - we have rails cache | ||
|
||
# Here you can see queries with especially long duration | ||
slow-query-log = 1 | ||
slow-query-log-file = /var/lib/mysql/log/mysql-slow.log | ||
long_query_time = 5 | ||
|
||
!includedir /etc/mysql/conf.d/ |