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

PHP tests for write concern

    • Type: Icon: Question Question
    • Resolution: Cannot Reproduce
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.2.2
    • Component/s: Replication
    • None
    • Environment:
      uname -a
      Linux idm-mdb2-s01c 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

      I created a PHP script that times how long an insert cursor takes to insert data per each write concern.

      See results below: (write concerns are based off of the PHP driver doc)

      =======================================
      Write concern: 0 : Fire and forget
      Cursor return: 0.0001230240

      Write concern: 1 : Write acknowledged by the primary only
      Cursor return: 0.0548999310 <-- SLOWEST????

      Write concern: 2 : Write confirmed in 2 secondaries
      Cursor return: 0.0135748386

      Write concern: 3 : Write confirmed in 3 secondaries
      Cursor return: 0.0042228699

      Write concern: majority : Write confirmed in the majority of secondaries
      Cursor return: 0.0204229355

      Write concern: j : write acknowledged by primary and the journal flushed to disk
      Cursor return: 0.0119099617
      =======================================

      Do you know why I would see a much higher time in microseconds with write concern 1 (acknowledgement from the primary) compared to all others?

            Assignee:
            andrew.ryder@mongodb.com Andrew Ryder (Inactive)
            Reporter:
            alberta@ecollege.com Albert Aguirre
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: