Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-6764

H2MinWorkers and H2MaxWorkerIdleSeconds do not work

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-8.0.0
    • mod_http2
    • None
    • Moderate
    • rhel-sst-cs-stacks
    • ssg_core_services
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

          1. Description of problem:

      It seems that H2MinWorkers and H2MaxWorkerIdleSeconds do not work.
      And it looks to me that the following commit changed the behavior:

      trunk: https://github.com/apache/httpd/commit/e78889fcb6599e2c353f4bcfeb44aa9c598794a7
      2.4.x: https://github.com/apache/httpd/commit/2f8392ad9d821109e941773712bcf8e54ba0a3ce

      CHANGES log says "There are H2MaxWorkers threads created at start and the number is kept constant for now".
      So, the number of threads is always fixed (created at start-up and never reclaimed). It looks the behavior is changed intentionally for better performance.

      ~~~
      *) mod_http2: h2 workers with improved scalability for better scheduling
      performance. There are H2MaxWorkers threads created at start and the
      number is kept constant for now. [Stefan Eissing]
      ~~~

          1. Version-Release number of selected component (if applicable):

      httpd-2.4.37-11.module+el8.0.0+2969+90015743.x86_64

          1. How reproducible:

      anytime

          1. Steps to Reproduce:
            1: yum install httpd-2.4.37-11.module+el8.0.0+2969+90015743.x86_64

      2: vim /etc/httpd/conf/httpd.conf (Please see attachement for details)

      #cat httpd.conf
      Protocols h2 h2c http/1.1

      StartServers 1
      MinSpareThreads 1
      MaxSpareThreads 1
      ThreadLimit 1
      ThreadsPerChild 1
      MaxRequestWorkers 1
      MaxConnectionsPerChild 0

      H2MaxWorkerIdleSeconds 10

      H2MaxWorkers 10
      H2MinWorkers 2
      ....snip....

      3:systemctl start httpd

          1. Actual results:
            Even if 10 seconds(=H2MaxWorkerIdleSeconds) or more passes, it does not become H2MinWorkers value.
      1. ps auxww -L | grep -e mysqld -e httpd -e NLWP | grep -v grep
        USER PID LWP %CPU NLWP %MEM VSZ RSS TTY STAT START TIME COMMAND
        root 5936 5936 0.8 1 0.3 96192 6656 ? Ss 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5938 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5939 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5940 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5941 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5942 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5943 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5945 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
        apache 5938 5946 0.0 8 0.2 305560 4912 ? Sl 10:35 0:00 /usr/sbin/httpd -DFOREGROUND
      1. pstack 5938
        Thread 8 (Thread 0x7fd285381700 (LWP 5946)):
        #0 0x00007fd28dd73d97 in epoll_wait () from target:/lib64/libc.so.6
        #1 0x00007fd28e48672a in impl_pollset_poll () from target:/lib64/libapr-1.so.0
        #2 0x00007fd28c199592 in listener_thread () from target:/etc/httpd/modules/mod_mpm_event.so
        #3 0x00007fd28e2472de in start_thread () from target:/lib64/libpthread.so.0
        #4 0x00007fd28dd73a63 in clone () from target:/lib64/libc.so.6
        Thread 7 (Thread 0x7fd285b82700 (LWP 5945)):
        #0 0x00007fd28e24d48c in pthread_cond_wait@@GLIBC_2.3.2 () from target:/lib64/libpthread.so.0
        #1 0x00005576b1e544bd in ap_queue_pop_something ()
        #2 0x00007fd28c19900a in worker_thread () from target:/etc/httpd/modules/mod_mpm_event.so
        #3 0x00007fd28e2472de in start_thread () from target:/lib64/libpthread.so.0
        #4 0x00007fd28dd73a63 in clone () from target:/lib64/libc.so.6
        Thread 6 (Thread 0x7fd286b84700 (LWP 5943)):
        #0 0x00007fd28e24d48c in pthread_cond_wait@@GLIBC_2.3.2 () from target:/lib64/libpthread.so.0
        #1 0x00007fd28b96fb52 in slot_run () from target:/etc/httpd/modules/mod_http2.so
        #2 0x00007fd28e2472de in start_thread () from target:/lib64/libpthread.so.0
        #3 0x00007fd28dd73a63 in clone () from target:/lib64/libc.so.6
        Thread 5 (Thread 0x7fd287385700 (LWP 5942)):
        #0 0x00007fd28e24d48c in pthread_cond_wait@@GLIBC_2.3.2 () from target:/lib64/libpthread.so.0
        #1 0x00007fd28b96fb52 in slot_run () from target:/etc/httpd/modules/mod_http2.so
        #2 0x00007fd28e2472de in start_thread () from target:/lib64/libpthread.so.0
        #3 0x00007fd28dd73a63 in clone () from target:/lib64/libc.so.6
        Thread 4 (Thread 0x7fd287b86700 (LWP 5941)):
        #0 0x00007fd28e24d48c in pthread_cond_wait@@GLIBC_2.3.2 () from target:/lib64/libpthread.so.0
        #1 0x00007fd28b96fb52 in slot_run () from target:/etc/httpd/modules/mod_http2.so
        #2 0x00007fd28e2472de in start_thread () from target:/lib64/libpthread.so.0
        #3 0x00007fd28dd73a63 in clone () from target:/lib64/libc.so.6
        Thread 3 (Thread 0x7fd288387700 (LWP 5940)):
        #0 0x00007fd28e24d48c in pthread_cond_wait@@GLIBC_2.3.2 () from target:/lib64/libpthread.so.0
        #1 0x00007fd28b96fb52 in slot_run () from target:/etc/httpd/modules/mod_http2.so
        #2 0x00007fd28e2472de in start_thread () from target:/lib64/libpthread.so.0
        #3 0x00007fd28dd73a63 in clone () from target:/lib64/libc.so.6
        Thread 2 (Thread 0x7fd288b88700 (LWP 5939)):
        #0 0x00007fd28e24d48c in pthread_cond_wait@@GLIBC_2.3.2 () from target:/lib64/libpthread.so.0
        #1 0x00007fd28b96fb52 in slot_run () from target:/etc/httpd/modules/mod_http2.so
        #2 0x00007fd28e2472de in start_thread () from target:/lib64/libpthread.so.0
        #3 0x00007fd28dd73a63 in clone () from target:/lib64/libc.so.6
        Thread 1 (Thread 0x7fd28f66d900 (LWP 5938)):
        #0 0x00007fd28e250b44 in read () from target:/lib64/libpthread.so.0
        #1 0x00005576b1e5364b in ap_mpm_podx_check ()
        #2 0x00007fd28c1968f7 in child_main () from target:/etc/httpd/modules/mod_mpm_event.so
        #3 0x00007fd28c196c2a in make_child () from target:/etc/httpd/modules/mod_mpm_event.so
        #4 0x00007fd28c196cbb in startup_children () from target:/etc/httpd/modules/mod_mpm_event.so
        #5 0x00007fd28c1979af in event_run () from target:/etc/httpd/modules/mod_mpm_event.so
        #6 0x00005576b1e27c8e in ap_run_mpm ()
        #7 0x00005576b1e20383 in main ()
          1. Expected results:
            If this change is permanent (= design change = document bug), please correct the content of the document.

      or

      If this change is temporal (= H2MaxWorkerIdleSeconds and H2MinWorkers will be reimplemented in the future release), please change to be functional

              luhliari@redhat.com Lubos Uhliarik
              rhn-support-kkawana Kazuhiro Kawana
              Lubos Uhliarik Lubos Uhliarik
              rhel-cs-infra-services-qe rhel-cs-infra-services-qe rhel-cs-infra-services-qe rhel-cs-infra-services-qe
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated: