Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-37144

KV-Engine NonIO and AuxIO threads incorrectly set to lowest priority

    XMLWordPrintable

Details

    • Triaged
    • Yes
    • KV-Engine Mad-Hatter GA

    Description

      While investigating MB-36765, I observed the NonIO and AuxIO threads are incorrect set to the lowest priority - this should only be the case for Writer threads:

      $ ps -o pid,tid,ni,pri,comm -p $(pgrep memcached|head -n1) -T|grep "reader\|writer\|aux\|non"
      14714 18837   0  19 mc:reader_0
      ...
      14714 18854   0  19 mc:reader_15
      14714 18855   0  19 mc:writer_0
      14714 18856  19   0 mc:writer_1
      14714 18857  19   0 mc:writer_2
      14714 18858  19   0 mc:writer_3
      14714 18859  19   0 mc:auxIO_0
      14714 18860  19   0 mc:auxIO_1
      14714 18861  19   0 mc:auxIO_2
      14714 18862  19   0 mc:nonIO_0
      14714 18863  19   0 mc:nonIO_1
      14714 18864  19   0 mc:nonIO_2
      14714 18865  19   0 mc:nonIO_3
      14714 18866  19   0 mc:nonIO_4
      14714 18867  19   0 mc:nonIO_5
      14714 18868  19   0 mc:nonIO_6
      

      Note priority (3rd column) of the auxIO and nonIO is the same as the writers (19) when it should be the same as the readers (0).

      See http://review.couchbase.org/#/c/117651/ for the patch which introduced the priority change.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            drigby Dave Rigby added a comment -

            Note further that the priority of the writer thread themselves is incorrect the first writer thread isn't getting it's priority set:

            14714 18855   0  19 mc:writer_0
            14714 18856  19   0 mc:writer_1
            14714 18857  19   0 mc:writer_2
            14714 18858  19   0 mc:writer_3
            

            drigby Dave Rigby added a comment - Note further that the priority of the writer thread themselves is incorrect the first writer thread isn't getting it's priority set: 14714 18855 0 19 mc:writer_0 14714 18856 19 0 mc:writer_1 14714 18857 19 0 mc:writer_2 14714 18858 19 0 mc:writer_3
            dfinlay Dave Finlay added a comment -

            Approved as a perf regression and given the fix is simple and low risk - restoring non-I/O and aux-I/O threads to their former priority levels.

            dfinlay Dave Finlay added a comment - Approved as a perf regression and given the fix is simple and low risk - restoring non-I/O and aux-I/O threads to their former priority levels.

            Build couchbase-server-6.5.0-4923 contains kv_engine commit f4a3c7c with commit message:
            MB-37144: Don't set AuxIO & NonIO thread pri to lowest

            build-team Couchbase Build Team added a comment - Build couchbase-server-6.5.0-4923 contains kv_engine commit f4a3c7c with commit message: MB-37144 : Don't set AuxIO & NonIO thread pri to lowest

            Build couchbase-server-7.0.0-1111 contains kv_engine commit f4a3c7c with commit message:
            MB-37144: Don't set AuxIO & NonIO thread pri to lowest

            build-team Couchbase Build Team added a comment - Build couchbase-server-7.0.0-1111 contains kv_engine commit f4a3c7c with commit message: MB-37144 : Don't set AuxIO & NonIO thread pri to lowest
            wayne Wayne Siu added a comment -

            Verified the performance regression in MB-36765 is fixed in build 6.5.0-4923.
            Closing this ticket as a result.

            wayne Wayne Siu added a comment - Verified the performance regression in MB-36765 is fixed in build 6.5.0-4923. Closing this ticket as a result.

            People

              ashwin.govindarajulu Ashwin Govindarajulu
              drigby Dave Rigby
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty