top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

MongoDB inserts takes considerable time?

0 votes
186 views

I am running 4 concurrent Requests. Each request is inserting 100000 documents and each document is 5KB size. The database name and collection name are different for each request so that write lock is per Request.

I am running this on MongoDB 3.4 on centos 6.5. I disabled Journal option . The java client that loads data is running bulkwrites with a batch of 1000 documents.

I tried both single server and with 3 shards . With standalone single server, each request completes in around 20-25 secs. With 3 shards configuration, Each request takes around 50 to 60 secs. I wonder why it takes considerable time to insert documents.

posted Dec 5, 2017 by Rameshwar

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+1 vote

We Have a 3 node mongodb setup with a primary,secondary and an arbiter. If a Primary node goes down the election process to choose a new primary is taking around 30 seconds. During this period all the Create and Update operations fail. So is there anyway to reduce this failover time so that the client application can resume normal operations in less time.

What is the ideal way to handle Create and Update failures during the failover time? Should it be queued and retried? if the number of operations are high the queue size will not be enough. So please suggest a solution for this problem.If the failover time can be reduced it would solve this problem.

We tried reducing the heartbeat interval in the replica configuration. It did not help either

0 votes

A couple of months ago I launched a web application for a customer using mongodb for the first time. One of the collections can have documents that store a single .pdf file in binary format. The size of the .pdf file that gets stored in the document is always around 7mb.
To my surprise, the documents that do contain the .pdf files seem to be taking up double the space. As it stands the collection size is at 70gb with only 3900 documents containing the 7mb .pdf file. How can that be, please help?

+2 votes

Could someone who has done this certification in the recent past please tell me in how many days I could expect the result of this certification?

...