mirror of
https://github.com/frappe/bench.git
synced 2025-02-04 11:58:25 +00:00
Set innodb buffer in production setup (#331)
This commit is contained in:
parent
a8312f6cee
commit
6ad8d9b3f8
@ -78,6 +78,28 @@
|
|||||||
become: yes
|
become: yes
|
||||||
become_user: root
|
become_user: root
|
||||||
|
|
||||||
|
######################################################
|
||||||
|
# Set InnoDB Buffer Pool size to half of total RAM
|
||||||
|
- name: Set InnoDB buffer pool
|
||||||
|
lineinfile: >
|
||||||
|
dest=/etc/my.cnf.d/frappe.cnf
|
||||||
|
regexp="^\[mysqld\]$"
|
||||||
|
line="[mysqld]\ninnodb_buffer_pool_size={{ (ansible_memtotal_mb/2)|round|int }}M"
|
||||||
|
state=present
|
||||||
|
when: ansible_distribution == 'CentOS'
|
||||||
|
become: yes
|
||||||
|
become_user: root
|
||||||
|
|
||||||
|
- name: Set InnoDB buffer pool
|
||||||
|
lineinfile: >
|
||||||
|
dest=/etc/mysql/conf.d/frappe.cnf
|
||||||
|
regexp="^\[mysqld\]$"
|
||||||
|
line="[mysqld]\ninnodb_buffer_pool_size={{ (ansible_memtotal_mb/2)|round|int }}M"
|
||||||
|
state=present
|
||||||
|
when: ansible_distribution == 'Ubuntu' or ansible_distribution == 'Debian'
|
||||||
|
become: yes
|
||||||
|
become_user: root
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
# Enable nginx, mysql, redis and supevisord services
|
# Enable nginx, mysql, redis and supevisord services
|
||||||
- name: Enable nginx, mysql, and redis
|
- name: Enable nginx, mysql, and redis
|
||||||
|
Loading…
x
Reference in New Issue
Block a user