151e5fed3a
Change-Id: I93da15ee64d3309acc4f6855eb2d3cc252ed4cd3
72 lines
2.5 KiB
YAML
72 lines
2.5 KiB
YAML
---
|
|
#
|
|
# Performance checks specific to controller hosts
|
|
#
|
|
|
|
- name: Check max_connections on the database
|
|
shell: mysql -e "show variables like 'max_connections';" | grep max_connections | awk '{print $2}'
|
|
register: bz1266253
|
|
changed_when: no
|
|
failed_when: bz1266253.stdout|int < mariadb_max_connections
|
|
ignore_errors: yes
|
|
|
|
- name: Suggested buffer_pool_size
|
|
shell: mysql -Bse "SELECT CEILING(Total_InnoDB_Bytes*1.6/POWER(1024,2)) RIBPS FROM (SELECT SUM(data_length+index_length) Total_InnoDB_Bytes FROM information_schema.tables WHERE engine='InnoDB') A;"
|
|
register: suggested_buffer_pool_size
|
|
changed_when: no
|
|
ignore_errors: yes
|
|
|
|
- name : Current buffer_pool_size
|
|
shell: echo $(mysql -Bse " select @@innodb_buffer_pool_size")/1024/1024 | bc
|
|
register: buffer_pool_size
|
|
failed_when: buffer_pool_size.stdout|int < suggested_buffer_pool_size.stdout|int
|
|
changed_when: no
|
|
ignore_errors: yes
|
|
|
|
- name : File descriptors for the mysql process
|
|
shell: cat /proc/$(pgrep mysqld_safe)/limits | grep "open files" | awk '{print $4}'
|
|
register: mysqld_safe_soft_fd
|
|
failed_when: mysqld_safe_soft_fd.stdout|int < mysqld_soft_fd
|
|
changed_when: no
|
|
ignore_errors: yes
|
|
|
|
- name : Check rabbitmq file descriptors
|
|
shell: rabbitmqctl status | grep file_descriptors | awk -F',' '{print $3}' | sed 's/.$//'
|
|
register: bz1282491
|
|
changed_when: no
|
|
failed_when: bz1282491.stdout|int < rabbitmq_fd
|
|
ignore_errors: yes
|
|
|
|
- name : Check HAProxy Default maxconn
|
|
shell : cat /etc/haproxy/haproxy.cfg | grep -iPzo '(?s)defaults.*?\n(\n|$)' | grep maxconn | awk '{print $2}'
|
|
register: bz1281584
|
|
failed_when: bz1281584.stdout|int < mariadb_max_connections
|
|
changed_when: no
|
|
ignore_errors: yes
|
|
|
|
- name : Check netns tuning
|
|
shell : sysctl net.core.netdev_max_backlog | awk '{print $3}'
|
|
register: bz1095811
|
|
failed_when: bz1095811.stdout|int < netdev_max_backlog
|
|
changed_when: no
|
|
ignore_errors: yes
|
|
|
|
- name : Check udev performance issue
|
|
shell : grep -q 'SUBSYSTEM=="net", ACTION=="add", TAG+="systemd", ENV{SYSTEMD_WANTS}+="dhcp-interface@$name.service"' /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
|
register : bz1293712
|
|
changed_when: no
|
|
ignore_errors: yes
|
|
failed_when: bz1293712.rc == 0
|
|
|
|
- name : Check rabbitmq for partitions
|
|
shell: rabbitmqctl cluster_status | grep partitions -A 1 | grep -v alarm | grep -q controller
|
|
register: rabbit_partitioned
|
|
changed_when: no
|
|
failed_when: rabbit_partitioned.rc == 0
|
|
ignore_errors: yes
|
|
|
|
- name: Run MySQL Tuner script
|
|
script: mysqltuner.pl --nocolor
|
|
register: mysql_out
|
|
ignore_errors: yes
|