-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
None
-
Affects Version/s: 3.2.3
-
Component/s: WiredTiger, Write Ops
-
Environment:Azure VM D2 size
-
ALL
-
I have a simple social crawler written in C# for testing MongoDB performance and decide - use it in another projects.
It collected 750.000 documents in collection Post.
Document post have "IsApproved" property that I want to update.
Posts collection have _id index and
{ "SiteId" : 1, "IsApproved" : -1, "Date" : -1 }I make project to find one with
{Id, IsApproved}and UpdateOne with !Approved (see screenshot).
Inserting documents fine and my Azure VM (D2 (2 cores Xeon with SSD) CPU costs about 2-8 percent.
But if I press approve button in my crawler - it "think" 3-5 seconds and costs 40% CPU.
If i press Approve button multiple times without pause - it kill my server and CPU load at 99% for each update time (see screenshot).
Don't say than i need be toggle boolean property with XOR command - i approximate it to other updates and i worry.
How I will use database, that only one update costs so many CPU times ?
It's not normal behaviour. Maybe that index rebuild ?