Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-4910

readconnroute performance regression in 6.4

    XMLWordPrintable

Details

    Description

      For a workload that consists only of large queries that receive very small responses, there's about a 15% regression in terms of performance. The best example of this kind of a workload is the loading of a database dump.

      The problem can be reproduced by executing DO 'aaaaa .... aaaaa' statements that are near the 16MiB packet maximum size. As the queries do nothing on the database, the limiting factor is MaxScale.

      The cause of the slowdown is the unconditional query classification that is done in ServerEndpoint::routeQuery that is used to determine whether a packet is a read or a write. This is done to be able to determine which latency histogram to insert the query timing result into but this imposes a requirement to always classify queries even if the configuration in 2.5 would not need it.

      To fix it, the code should detect if the router requires query classification by checking for the RCAP_TYPE_QUERY_CLASSIFICATION bit in the capabilities. If it's present, accurately determining the query type comes at no cost. If the bit is not present, only existing information, i.e. the server state, should be used to come to a less accurate but still somewhat valid estimate of the query type. In practice this means that the query type is a write if it's routed to the primary node of the cluster and a read if it isn't.

      Attachments

        Activity

          People

            markus makela markus makela
            markus makela markus makela
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.