title: pymongo single insert is too slow, despite WriteConcern(w=0)
body: <p>I am using pymongo to write to my mongodb.
  I want as fast as possible performance, so I set the write concern to w=0. I tried three ways:</p>
  
  <p>1.</p>
  
  <pre><code>client = MongoClient(host=HOST, port=PORT, w=0)
  collection = client[DB][COLLECTION]
  collection.insert_one(data)
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>client = MongoClient(host=HOST, port=PORT)
  collection = collection.with_options(write_concern=WriteConcern(w=0))
  collection = client[DB][COLLECTION]
  collection.insert_one(data)
  </code></pre>
  
  <p>3.</p>
  
  <pre><code>client = MongoClient(host=HOST, port=PORT)
  collection = client[DB][COLLECTION]
  collection.insert_one(data, bypass_document_validation=True)
  </code></pre>
  
  <p>In all above attempts, the time it took for collection.insert_one() was ~0.5 seconds (!)</p>
  
  <p>Why is insertion still taking so long? </p>
  
  <p>I understand that it should be about a fifth of that time at least. More so, 'data' is not a lot of data, only a few items. I am using mongodb 3.4 and pymongo 3.0</p>