Browse Source

Mysql performance optimizations (#3261)

* Disabled mysql monitoring
Not necessary in production and the perfromance will be better

* Disabled mysqlnd collect statistics
for better performance
Joan Miquel 7 years ago
parent
commit
692232a899

+ 6 - 0
toolset/setup/linux/databases/mysql/my.cnf

@@ -42,6 +42,12 @@ table_definition_cache  = 800
 max_heap_table_size     = 128M
 max_heap_table_size     = 128M
 tmp_table_size          = 128M
 tmp_table_size          = 128M
 
 
+#
+# monitoring off
+#
+
+performance-schema = false
+
 #
 #
 # innodb settings
 # innodb settings
 #
 #

+ 11 - 0
toolset/setup/linux/languages/php/php.ini

@@ -1871,6 +1871,17 @@ ldap.max_links = -1
 ;apc.enable_cli = 1
 ;apc.enable_cli = 1
 ;apc.shm_size = 64M
 ;apc.shm_size = 64M
 
 
+[mysqlnd]
+; Enable / Disable collection of general statistics by mysqlnd which can be
+; used to tune and monitor MySQL operations.
+; http://php.net/mysqlnd.collect_statistics
+mysqlnd.collect_statistics = Off
+
+; Enable / Disable collection of memory usage statistics by mysqlnd which can be
+; used to tune and monitor MySQL operations.
+; http://php.net/mysqlnd.collect_memory_statistics
+mysqlnd.collect_memory_statistics = Off
+
 [opcache]
 [opcache]
 opcache.validate_timestamps = 0 ; The same that apc.stat = 0
 opcache.validate_timestamps = 0 ; The same that apc.stat = 0
 opcache.max_accelerated_files = 20000
 opcache.max_accelerated_files = 20000