Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-11111

Replace interrogating /proc/cpuinfo by invoking nproc in evergreen tasks

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2
    • StorEng - Defined Pipeline

      Currently the number of cores is determined by greping //proc/cpuinfo:

      evergreen.yml:            CMAKE_BIN=$CMAKE ./configure_combinations.sh -g="${cmake_generator|Ninja}" -j=$(grep -c ^processor /proc/cpuinfo) 2>&1
      evergreen.yml:    smp_command: -j $(echo "`grep -c ^processor /proc/cpuinfo` * 2" | bc)
      evergreen.yml:    smp_command: -j $(grep -c ^processor /proc/cpuinfo)
      
      evergreen.yml:    smp_command: -j $(echo $(grep -c ^processor /proc/cpuinfo) / 4 | bc)
      evergreen.yml:    smp_command: -j $(echo $(grep -c ^processor /proc/cpuinfo) / 2 | bc)
      evergreen.yml:    smp_command: -j $(echo "`grep -c ^processor /proc/cpuinfo` * 2" | bc)
      evergreen_develop.yml:    smp_command: -j $(echo "`grep -c ^processor /proc/cpuinfo` * 2" | bc)
      

      This could be simplified by replacing the above with nproc.

      Also greping /proc/cpuinfo will return the number of processors reported by the system. Which is *not* necessarily the number of processors available to the process, which could be restricted with a mechanism such as cgroups. While this scenario seems unlikely, it should be considered/validated.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            marc.butler@mongodb.com Marc Butler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: