Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-11382

AliSQL: [Feature] Issue#9: PROVIDE ADAPTIVE ALGORITHM FOR INNODB CONCURRENCY TICKETS

    XMLWordPrintable

Details

    Description

      Description:
      ------------
      To avoide too many concurrency threads,InnoDB use
      innodb_thread_concurrency to control the number of operating system
      threads concurrently inside InnoDB. When a thread is permitted to
      enter InnoDB, it is given a number of "free tickets" equal to the
      value of innodb_concurrency_tickets, and the thread can enter and
      leave InnoDB freely until it has used up its tickets.
       
      innodb_concurrency_tickets is a fixed number, and it is hard to
      choose a proper value fit for both small transactions and large
      transactons. With a small innodb_concurrency_tickets value, large
      transactons will acquire tickets many times, which extends the length
      of time required to complete their task. With a large
      innodb_concurrency_tickets value, small transactons may get starved
      by too many concurrent large transactions.
       
      This patch provides a method to adaptively adjust tickets assigned to
      readonly SELECT SQL statement. For large SELECT query, it may acquire
      tickets many times if the previous assigned tickets are exhausted.
      To avoid starving smally quries, the tickets assiged to large query are
      decreased exponentially according to the number of times it acquire
      tickets, i.e. the more times large query acquire tickets, the smaller
      tickets it will be assigned. To avoid it getting a too small value,
      innodb_rds_min_concurrency_tickets is used as the lower bound of the
      tickets number assigned.
       
      Two global InnoDB variables are added,
      1. innodb_rds_adaptive_tickets_algo: control whether adaptive algorithm
         is enabled.
      2. innodb_rds_min_concurrency_tickets: the lower bound of tickets can
         be assiged under adaptive adjusting.
      

      https://github.com/alibaba/AliSQL/commit/e6abc82cddaae0f8dc63ef976f7662a40443de8b

      Attachments

        Issue Links

          Activity

            People

              axel Axel Schwenke
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.