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

JSON operations slow down worker threads when auditing

    XMLWordPrintable

Details

    • 1

    Description

      We take a large op/s hit when auditing is enabled for high-frequency events like document read/modify. Profiling indicates that as much as 21% of CPU time on each worker thread is spent doing JSON operations when constructing audit events to be passed to auditd. 

      https://share.firefox.dev/3AH3DlK

      *Possible solutions

      a) We might be able to use a C++ native data structure during event creation and only generate the JSON string when needed to be passed to auditd. We might even be able to use fmt to generate the JSON string. Memcached events have 5 hard-coded properties and about 5 more optional ones. 

      b) We could swap out nlohmann which is known to be slow with something like simd_json. 

      Attachments

        Issue Links

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

          Activity

            People

              vesko.karaganev Vesko Karaganev
              vesko.karaganev Vesko Karaganev
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty