
By definition, the load is calculated using the following formula: L = 100 * ((T - t) / T) where T is a time period and t the time of that period that the worker spends in epoll_wait(). So, if there is so much work that epoll_wait() always returns immediately, then the load is 100 and if the thread spends the entire period in epoll_wait(), then the load is 0. The basic idea is that the timeout given to epoll_wait() is adjusted so that epoll_wait() will always return roughly at 10 seconds interval. By making a note of when we are about to enter epoll_wait() and when we return from it, we have all the information we need for calculating the load. Due to the nature of things, we will not be able to calculate the load at exact 10-second boundaries, but it will be pretty close. And the load is always calculated using the true length of the period. We will then calculate 1 minute load by averaging the load value for 6 consecutive 10-second periods and the 1 hour load by averaging the load value of 60 consecutive 1 minute loads. So, while the 10-second load represents the load of the most recently measured 10-second period (and not the load of the most recent 10 seconds), the 1 minute load and the 1 hour load represents the load of the most recent minute and hour respectively.
MaxScale by MariaDB Corporation
The MariaDB Corporation MaxScale is an intelligent proxy that allows forwarding of database statements to one or more database servers using complex rules, a semantic understanding of the database statements and the roles of the various servers within the backend cluster of databases.
MaxScale is designed to provide load balancing and high availability functionality transparently to the applications. In addition it provides a highly scalable and flexible architecture, with plugin components to support different protocols and routing decisions.
MaxScale is implemented in C and makes extensive use of the asynchronous I/O capabilities of the Linux operating system. The epoll system is used to provide the event driven framework for the input and output via sockets.
The protocols are implemented as external shared object modules which can be loaded at runtime. These modules support a fixed interface, communicating the entries points via a structure consisting of a set of function pointers. This structure is called the "module object".
The code that routes the queries to the database servers is also loaded as external shared objects and are referred to as routing modules.
An Google Group exists for MaxScale that can be used to discuss ideas, issues and communicate with the MaxScale community.
We're also on the #maria and #maxscale channels on FreeNode.
Please report all feature requests, improvements and bugs in the MariaDB Jira.
Documentation
For information about installing and using MaxScale, please refer to the documentation. The official documentation can be found on the MariaDB Knowledge Base.
- MariaDB MaxScale 2.1 Documentation
- MariaDB MaxScale 2.0 Documentation
- MariaDB MaxScale 1.4 Documentation
The module and configuration documentation can be found in the Documentation directory of the source tree.
Contributing Code
Read the Contributing page on the wiki for more information on how to do pull request and where to do them.