From b50f037be177bd759efd55aedc01bfef3d7410f5 Mon Sep 17 00:00:00 2001 From: Jason Lowenthal Date: Tue, 20 Oct 2015 10:48:11 -0500 Subject: [PATCH 1/4] Update Hint-Syntax.md Added "s" to filters in example [Read Service] as it was confusing trying to get hint routing working correctly. --- Reference/Hint-Syntax.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Reference/Hint-Syntax.md b/Reference/Hint-Syntax.md index a037365e0..4f5d17f30 100644 --- a/Reference/Hint-Syntax.md +++ b/Reference/Hint-Syntax.md @@ -14,7 +14,7 @@ router_options=master servers=server1 user=maxuser passwd=maxpwd -filter=Hint +filters=Hint [Hint] type=filter From f3c64190320a23cdb9f8507dddbe7eee6b28d95c Mon Sep 17 00:00:00 2001 From: Will Fong Date: Thu, 29 Oct 2015 19:02:46 +0800 Subject: [PATCH 2/4] Multiple Edits Added *'s for consistency Added monitor_interval to prevent warning in error log Reworded default cnf location to make it a little easier to read Typo in log location --- .../MySQL-Replication-Connection-Routing-Tutorial.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md b/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md index 45de0a791..0140b7e00 100644 --- a/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md +++ b/Tutorials/MySQL-Replication-Connection-Routing-Tutorial.md @@ -51,11 +51,11 @@ MariaDB [(none)]> grant SELECT on mysql.user to '*username*'@'*maxscalehost*'; Additionally, GRANT SELECT on the mysql.db table and SHOW DATABASES privileges are required in order to load databases name and grants suitable for database name authorization. ``` -MariaDB [(none)]> GRANT SELECT ON mysql.db TO 'username'@'maxscalehost'; +MariaDB [(none)]> GRANT SELECT ON mysql.db TO '*username*'@'maxscalehost'; **Query OK, 0 rows affected (0.00 sec)** -MariaDB [(none)]> GRANT SHOW DATABASES ON *.* TO 'username'@'maxscalehost'; +MariaDB [(none)]> GRANT SHOW DATABASES ON *.* TO '*username*'@'maxscalehost'; **Query OK, 0 rows affected (0.00 sec)** ``` @@ -76,7 +76,7 @@ If you wish to use two different usernames for the two different roles of monito ## Creating Your MaxScale Configuration -MaxScale configuration is held in an ini file that is located in the file maxscale.cnf in the directory /etc. This is not created as part of the installation process and must be manually created. A template file does exist in the `/usr/share/maxscale` folder that can be use as a basis for your configuration. +MaxScale reads its configuration from `/etc/maxscale.cnf`. This is not created as part of the installation process and must be manually created. A template file does exist in the `/usr/share/maxscale` folder that can be use as a basis for your configuration. A global, maxscale, section is included within every MaxScale configuration file; this is used to set the values of various MaxScale wide parameters, perhaps the most important of these is the number of threads that MaxScale will use to execute the code that forwards requests and handles responses for clients. @@ -220,6 +220,7 @@ module=mysqlmon servers=dbserv1, dbserv2, dbserv3 user=maxscale passwd=96F99AA1315BDC3604B006F427DD9484 +monitor_interval=10000 ``` As with the password definition in the server either plain text or encrypted passwords may be used. @@ -255,7 +256,7 @@ or service maxscale start ``` -Check the error log in /var/log/lomaxscale/ to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. +Check the error log in /var/log/maxscale/ to see if any errors are detected in the configuration file and to confirm MaxScale has been started. Also the maxadmin command may be used to confirm that MaxScale is running and the services, listeners etc have been correctly configured. ``` % maxadmin -pmariadb list services From bc148a430182cad04c8b2049192f64bf1299e14f Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Sat, 31 Oct 2015 07:36:22 +0200 Subject: [PATCH 3/4] Fix to MXS-436: https://mariadb.atlassian.net/browse/MXS-436 Added autodetection of processor cores and used it as the default if an invalid value is used for threads. --- Getting-Started/Configuration-Guide.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Getting-Started/Configuration-Guide.md b/Getting-Started/Configuration-Guide.md index e48d44293..4eaf175e6 100644 --- a/Getting-Started/Configuration-Guide.md +++ b/Getting-Started/Configuration-Guide.md @@ -50,11 +50,13 @@ Please see the section about [Protocol Modules](#protocol-modules) for more deta ### Global Settings -The global settings, in a section named `[MaxScale]`, allow various parameters that affect MaxScale as a whole to be tuned. Currently the only setting that is supported is the number of threads to use to handle the network traffic. MaxScale will also accept the section name of `[gateway]` for global settings. This is for backward compatibility with versions prior to the naming of MaxScale. +The global settings, in a section named `[MaxScale]`, allow various parameters that affect MaxScale as a whole to be tuned. #### `threads` -To control the number of threads that poll for network traffic set the parameter threads to a number. It is recommended that you start with a single thread and add more as you find the performance is not satisfactory. MaxScale is implemented to be very thread efficient, so a small number of threads is usually adequate to support reasonably heavy workloads. Adding more threads may not improve performance and can consume resources needlessly. +This parameter controls the number of threads that poll for network traffic. MaxScale will autodetect the number of processors of the system unless number of threads is manually configured. It is recommended that you let MaxScale detect how many cores the system has and leave this parameter undefined. The number of used cores will be logged into the message logs and if you are not satisfied with the autodetected value, you can manually configure it. + +If you want to fine-tune the number of threads, start with a single thread and add more as you find the performance is not satisfactory. MaxScale is implemented to be very thread efficient, so a small number of threads is usually adequate to support reasonably heavy workloads. Adding more threads may not improve performance and can consume resources needlessly. Increasing the amount of worker threads beyond the number of processor cores is not recommended. ``` # Valid options are: From 5ff26f5a3df3e409c9067f63d6ba781263854383 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Mon, 2 Nov 2015 10:29:47 +0200 Subject: [PATCH 4/4] Updated code based on review of ac308dcb2c34e081f9814ad40c0961a217c86fc4 Removed unnecessary spinlock and added more checks. --- Getting-Started/Configuration-Guide.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Getting-Started/Configuration-Guide.md b/Getting-Started/Configuration-Guide.md index 4eaf175e6..a4af5529c 100644 --- a/Getting-Started/Configuration-Guide.md +++ b/Getting-Started/Configuration-Guide.md @@ -54,9 +54,7 @@ The global settings, in a section named `[MaxScale]`, allow various parameters t #### `threads` -This parameter controls the number of threads that poll for network traffic. MaxScale will autodetect the number of processors of the system unless number of threads is manually configured. It is recommended that you let MaxScale detect how many cores the system has and leave this parameter undefined. The number of used cores will be logged into the message logs and if you are not satisfied with the autodetected value, you can manually configure it. - -If you want to fine-tune the number of threads, start with a single thread and add more as you find the performance is not satisfactory. MaxScale is implemented to be very thread efficient, so a small number of threads is usually adequate to support reasonably heavy workloads. Adding more threads may not improve performance and can consume resources needlessly. Increasing the amount of worker threads beyond the number of processor cores is not recommended. +This parameter controls the number of worker threads that are handling the events coming from the kernel. MaxScale will auto-detect the number of processors of the system unless number of threads is manually configured. It is recommended that you let MaxScale detect how many cores the system has and leave this parameter undefined. The number of used cores will be logged into the message logs and if you are not satisfied with the auto-detected value, you can manually configure it. Increasing the amount of worker threads beyond the number of processor cores does not improve performance and can consume resources needlessly. ``` # Valid options are: