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

Speed up connection speed by moving creation of THD to new thread

    Details

    • Type: Task
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: 10.1
    • Component/s: None
    • Labels:
    • Sprint:
      10.1.6-2

      Description

      One major bottleneck for creating a new connection is that THD is created in the thread that is handing all connections.

      The fix for this is to move THD creation from the connection thread to the new thread that will handle queries.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            axel Axel Schwenke added a comment - - edited

            <montywi> XL: I update the bb-fast-connect tree in git; This is after serg's review
            <montywi> so I only need you to verify that things are same or better than normal 10.1 for connect tests and I can push
            <XL> montywi: I see
            <montywi> on my machine, having all threads in the thread cache gives a 5% speed increase; Having no thread cache was about the same
            <montywi> this was when running 32 perl processes on the same machine to connect, do a query and disconnect
            <montywi> doing this with a threaded benchmark should hopefully show a bigger speed increase

            Show
            axel Axel Schwenke added a comment - - edited <montywi> XL: I update the bb-fast-connect tree in git; This is after serg's review <montywi> so I only need you to verify that things are same or better than normal 10.1 for connect tests and I can push <XL> montywi: I see <montywi> on my machine, having all threads in the thread cache gives a 5% speed increase; Having no thread cache was about the same <montywi> this was when running 32 perl processes on the same machine to connect, do a query and disconnect <montywi> doing this with a threaded benchmark should hopefully show a bigger speed increase
            Hide
            monty Michael Widenius added a comment -

            Pushed to bb-fast-connect tree for testing.

            Show
            monty Michael Widenius added a comment - Pushed to bb-fast-connect tree for testing.
            Hide
            axel Axel Schwenke added a comment -

            Results from a short benchmark. I tested 3 scenarios

            1. standard sysbench OLTP readonly (1 connection per client thread that is reused)
            2. sysbench OLTP readonly, reconnection for each transaction
            3. simple workload: connect; select 1 from dual; disconnect

            The last scenario shows advantages for the bb_fast_connect tree. The other however give better results with vanilla 10.1.

            Benchmark was run on lizard2 (Intel, 32 cores, 64 threads). Huge thread pool was configured.

            Show
            axel Axel Schwenke added a comment - Results from a short benchmark. I tested 3 scenarios standard sysbench OLTP readonly (1 connection per client thread that is reused) sysbench OLTP readonly, reconnection for each transaction simple workload: connect; select 1 from dual; disconnect The last scenario shows advantages for the bb_fast_connect tree. The other however give better results with vanilla 10.1. Benchmark was run on lizard2 (Intel, 32 cores, 64 threads). Huge thread pool was configured.

              People

              • Assignee:
                monty Michael Widenius
                Reporter:
                monty Michael Widenius
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Time Spent - 2 hours Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - 2 hours Remaining Estimate - 6 hours
                  2h

                    Agile