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

test for performance regressions with JSON detection




      Related to one of the changes in 3.0, we need to test what has been implemented to see if a performance regression or unexpected resource utilization has been introduced.

      In 2.x, all JSON detection was handled at the time of persistence. Since persistence was done in batch and in background, with the then current document, it would limit the resource utilization of any JSON detection.

      Starting in 3.x, with the datatype/HELLO changes introduced (and currently disabled), the JSON detection has moved to both memcached and ep-engine, depending on the type of mutation.

      Just to paint the reason this is a concern, here's a possible scenario.

      Imagine a cluster node that is happily accepting 100,000 sets/s for a given small JSON document, and it accounts for about 20mbit of the network (small enough to not notice). That node has a fast SSD at about 8k IOPS. That means that we'd only be doing JSON detection some 5000 times per second with Couchbase Server 2.x

      With the changes already integrated, that JSON detection may be tried over 100k times/s. That's a 20x increase. The detection needs to occur somewhere other than on the persistence path, as the contract between DCP and view engine is such that the JSON detection needs to occur before DCP transfer.

      This request is to test/assess if there is a performance change and/or any unexpected resource utilization when having fast mutating JSON documents.

      I'll leave it to the team to decide what the right test is, but here's what I might suggest.

      With a view defined create a test that has a small to moderate load at steady state and one fast-changing item. Test it with a set of sizes and different complexity. For instance, permutations that might be something like this:
      non-JSON of 1k, 8k, 32k, 128k
      simple JSON of 1k, 8k, 32k, 128k
      complex JSON of 1k, 8k, 32k, 128k
      metrics to gather:
      throughput, CPU utilization by process, RSS by process, memory allocation requests by process (or minor faults or something)

      Hopefully we won't see anything to be concerned with, but it is possible.

      There are options to move JSON detection to somewhere later in processing (i.e., before DCP transfer) or other optimization thoughts if there is an issue.


        Issue Links

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



              wayne Wayne Siu
              ingenthr Matt Ingenthron
              0 Vote for this issue
              5 Start watching this issue



                Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0h
                  Time Spent - 120h

                  Gerrit Reviews

                    There are no open Gerrit changes