Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-73168

diminish the ServiceExecutor benchmark under ASAN

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • ALL
    • v6.2
    • Service Arch 2023-01-23, Service Arch 2023-02-06, Service Arch 2023-02-20
    • 21

      Since the service_executor_bm benchmark was introduced in SERVER-69570, it has been having trouble running under ASAN, and so the associated BF-26477 has become a nuisance on v6.2 and on master branches.

      This comment on that BF explains the situation.

      Under ASAN, the benchmark has trouble allocating threads quickly.
      Unfortunately it needs lots of threads to test the cost of creating them.

      [benchmark_test:service_executor_bm] ==127545==ERROR: AddressSanitizer failed to allocate 0xe000 (57344) bytes of Create (error code: 12)
      [benchmark_test:service_executor_bm] ERROR: Failed to mmap
      

      ASAN builds are extremely slow, and they don't generate useful benchmark results. We would run a benchmark under ASAN to find correctness issues in the benchmark, but the benchmark's generated numbers aren't representative of production and not really useful.

      I think it would be prudent to have the benchmark's code detect ASAN with a preprocessor ifdef. If it's an ASAN build, it would run the benchmark loop once instead of the full amount that the benchmark library specifies. This should fix the ASAN mapping problem as we won't be generating an inordinate number of threads anymore.

      This small tweak to the benchmark should be backported to v6.2 as well.

            Assignee:
            billy.donahue@mongodb.com Billy Donahue
            Reporter:
            billy.donahue@mongodb.com Billy Donahue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: