{"id":481,"date":"2017-08-03T13:20:25","date_gmt":"2017-08-03T20:20:25","guid":{"rendered":"http:\/\/www.kenwalger.com\/blog\/?p=481"},"modified":"2017-08-19T10:36:40","modified_gmt":"2017-08-19T17:36:40","slug":"mongodb-performance-issues","status":"publish","type":"post","link":"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/","title":{"rendered":"MongoDB Performance Issues &#8211; Fact or Fiction"},"content":{"rendered":"<p>I see posts and hear conversations quite frequently about <a href=\"https:\/\/www.mongodb.com\">MongoDB<\/a> performance issues. They are a frequent, and hot, topic on sites like Quora, Hacker News, and Reddit. Many of these &#8220;hits&#8221; against MongoDB are based on outdated data and older versions of MongoDB.<\/p>\n<p>There was a movie from the late 1980&#8217;s called <a href=\"https:\/\/www.amazon.com\/gp\/product\/B00005N5SB\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B00005N5SB&amp;linkCode=as2&amp;tag=kenwalgersite-20&amp;linkId=5916461a7aaf9df470882216c051fc99\" target=\"_blank\" rel=\"noopener\">Crocodile Dundee II<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border: none !important; margin: 0px !important;\" src=\"\/\/ir-na.amazon-adsystem.com\/e\/ir?t=kenwalgersite-20&amp;l=am2&amp;o=1&amp;a=B00005N5SB\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" \/>. There is a scene in the movie where the guy from the Australian Outback, Mick &#8220;Crocodile&#8221; Dundee, visits\u00a0a New York City hotel for the first time. Someone shows him that the room has a television. He turns it on and sees an old episode of <a href=\"https:\/\/www.amazon.com\/gp\/product\/B013FCLEIG\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B013FCLEIG&amp;linkCode=as2&amp;tag=kenwalgersite-20&amp;linkId=edf1c58d0b50bafcb2b416fb5135af32\" target=\"_blank\" rel=\"noopener\">I Love Lucy<\/a><img loading=\"lazy\" decoding=\"async\" style=\"border: none !important; margin: 0px !important;\" src=\"\/\/ir-na.amazon-adsystem.com\/e\/ir?t=kenwalgersite-20&amp;l=am2&amp;o=1&amp;a=B013FCLEIG\" alt=\"\" width=\"1\" height=\"1\" border=\"0\" \/>. Dundee shuts it off claiming he has already experienced television.<\/p>\n<p>Similarly, many complaints from older versions of MongoDB still linger around. Someone who had a bad experience with an old version will answer a thread somewhere and claim &#8220;I used it once, didn&#8217;t like it, it&#8217;s garbage.&#8221; Much like Mick Dundee, they are basing their entire opinion on outdated knowledge.<\/p>\n<p>Let&#8217;s take a look at some performance issues that are often raised and where things sit now with the latest version of MongoDB, <a href=\"https:\/\/docs.mongodb.com\/manual\/release-notes\/3.4\/\">3.4.6<\/a>. I raised some of these aspects in a <a href=\"http:\/\/www.kenwalger.com\/blog\/nosql\/new-version-new-features\/\">previous post<\/a>, but let&#8217;s take a deeper dive.<\/p>\n<h3>The Jepsen Test &amp;\u00a0Performance Issues of old<\/h3>\n<p>From a &#8220;documented issue&#8221; standpoint, many performance issues that plague MongoDB in social reviews are covered in a <a href=\"https:\/\/aphyr.com\/tags\/Jepsen\">Jepsen<\/a> test result post from <a href=\"https:\/\/aphyr.com\/posts\/322-jepsen-mongodb-stale-reads\">20 April 2015<\/a>. This was based on version 2.4.3. Or an even older article from <a href=\"https:\/\/aphyr.com\/posts\/284-call-me-maybe-mongodb\">18 May 2013<\/a>. Clearly, there were some issues with data scalability and data concurrency in those earlier versions.<\/p>\n<p>In fact, Jepsen has done extensive tests on MongoDB on lost updates and dirty and stale reads. Without getting too deep into the hows and whys of what was happening to the data, there were issues with writes when a primary went down, and read &amp; write consistency. These issues have been addressed as of version 3.4.1.<\/p>\n<h3>Product Enhancements<\/h3>\n<p>With the new data enhancements, MongoDB version 3.4.1 passed all of the Jepsen tests. Kyle Kingsbury, the creator of Jepsen, offered the following conclusions:<\/p>\n<blockquote class=\"block--ml block block--center\" data-reactid=\"333\">\n<p data-reactid=\"334\">MongoDB has devoted significant resources to improved safety in the past two years, and much of that ground-work is paying off in 3.2 and 3.4.<\/p>\n<\/blockquote>\n<blockquote class=\"block--ml block block--center padding--vertical-xs\" data-reactid=\"335\">\n<p data-reactid=\"336\">MongoDB 3.4.1 (and the current development release, 3.5.1) currently pass all MongoDB Jepsen tests\u2026.These results hold during general network partitions, and the isolated &amp; clock-skewed primary scenario.<\/p>\n<\/blockquote>\n<p data-reactid=\"336\">You can read more about his conclusions in his <a href=\"https:\/\/jepsen.io\/analyses\/mongodb-3-4-0-rc3\">published results<\/a>.<\/p>\n<p data-reactid=\"336\">Beyond data security, customers are finding huge benefits in performance in the more current releases of MongoDB. Improvements to, or the introduction of, technologies such as replication compression, the <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/wiredtiger\/\">WiredTiger<\/a> storage engine, in memory cache, and performance enhancements to sharding and replica sets have been a win for users.<\/p>\n<h3 data-reactid=\"336\">WiredTiger Case Study<\/h3>\n<p>A friend who works at\u00a0<a href=\"https:\/\/www.wanderu.com\">Wanderu.com<\/a>, a MongoDB user, was very generous and forthcoming with some information about their MongoDB experience. When choosing a database option they felt that <a href=\"http:\/\/www.kenwalger.com\/blog\/nosql\/nosql-options\/\">NoSQL<\/a>, and MongoDB specifically, fit their business and data model better than a relational model would. They process a very diverse set of data for their bus and train travel application.<\/p>\n<p>They take information from a vast assortment of bus and train vendors which arrive in XML, JSON, PDF, CSV, and other formats. Data is then ingested and transformed so that everything works with price checking and booking calls in vendor specific formats. The data model was determined to be incredibly complex and fragile for implementing in a relational database.<\/p>\n<p>In May 2017, Wanderu migrated to the WiredTiger storage engine in MongoDB 3.4. They took some screenshots of some of their performance graphs. The graphs cover a 10 day period, five before and five after, their migration on 5\/5. They were kind enough to share these images with me and approved of their use in this article.<\/p>\n<h6>Wanderu Charts<\/h6>\n<figure id=\"attachment_492\" aria-describedby=\"caption-attachment-492\" style=\"width: 938px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"492\" data-permalink=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/attachment\/active_reads-writes\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png?fit=938%2C250&amp;ssl=1\" data-orig-size=\"938,250\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"active_reads-writes\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png?fit=300%2C80&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png?fit=840%2C224&amp;ssl=1\" class=\"wp-image-492 size-full\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png?resize=840%2C224\" alt=\"MognoDB Active Reads\/Writes\" width=\"840\" height=\"224\" srcset=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png?w=938&amp;ssl=1 938w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png?resize=300%2C80&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/active_reads-writes.png?resize=768%2C205&amp;ssl=1 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-492\" class=\"wp-caption-text\">Before WiredTiger, the write load had a very limited max. After migration writes spiked as necessary.<\/figcaption><\/figure>\n<figure id=\"attachment_495\" aria-describedby=\"caption-attachment-495\" style=\"width: 925px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"495\" data-permalink=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/attachment\/queued_read-writes\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png?fit=925%2C224&amp;ssl=1\" data-orig-size=\"925,224\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"queued_read-writes\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png?fit=300%2C73&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png?fit=840%2C203&amp;ssl=1\" class=\"wp-image-495 size-full\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png?resize=840%2C203\" alt=\"Queued Reads and Writes\" width=\"840\" height=\"203\" srcset=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png?w=925&amp;ssl=1 925w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png?resize=300%2C73&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/queued_read-writes.png?resize=768%2C186&amp;ssl=1 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-495\" class=\"wp-caption-text\">Writes stayed fairly constant while queued reads fell dramatically.<\/figcaption><\/figure>\n<figure id=\"attachment_493\" aria-describedby=\"caption-attachment-493\" style=\"width: 925px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"493\" data-permalink=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/attachment\/index_memory\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png?fit=925%2C199&amp;ssl=1\" data-orig-size=\"925,199\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"index_memory\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png?fit=300%2C65&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png?fit=840%2C181&amp;ssl=1\" class=\"wp-image-493 size-full\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png?resize=840%2C181\" alt=\"MongoDB Index Size\" width=\"840\" height=\"181\" srcset=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png?w=925&amp;ssl=1 925w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png?resize=300%2C65&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/index_memory.png?resize=768%2C165&amp;ssl=1 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-493\" class=\"wp-caption-text\">Index size took a dramatic decrease in size as well.<\/figcaption><\/figure>\n<figure id=\"attachment_497\" aria-describedby=\"caption-attachment-497\" style=\"width: 921px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"497\" data-permalink=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/attachment\/memory_usage\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png?fit=921%2C215&amp;ssl=1\" data-orig-size=\"921,215\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"memory_usage\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png?fit=300%2C70&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png?fit=840%2C196&amp;ssl=1\" class=\"wp-image-497 size-full\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png?resize=840%2C196\" alt=\"MongoDB Memory Usage\" width=\"840\" height=\"196\" srcset=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png?w=921&amp;ssl=1 921w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png?resize=300%2C70&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/memory_usage.png?resize=768%2C179&amp;ssl=1 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-497\" class=\"wp-caption-text\">Not surprisingly, Memory Usage dropped too.<\/figcaption><\/figure>\n<figure id=\"attachment_494\" aria-describedby=\"caption-attachment-494\" style=\"width: 924px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"494\" data-permalink=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/attachment\/page_faults\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png?fit=924%2C212&amp;ssl=1\" data-orig-size=\"924,212\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"page_faults\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png?fit=300%2C69&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png?fit=840%2C193&amp;ssl=1\" class=\"wp-image-494 size-full\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png?resize=840%2C193\" alt=\"MongoDB Page Faults\" width=\"840\" height=\"193\" srcset=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png?w=924&amp;ssl=1 924w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png?resize=300%2C69&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/page_faults.png?resize=768%2C176&amp;ssl=1 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/a><figcaption id=\"caption-attachment-494\" class=\"wp-caption-text\">Page Fault improvements<\/figcaption><\/figure>\n<figure id=\"attachment_496\" aria-describedby=\"caption-attachment-496\" style=\"width: 922px\" class=\"wp-caption aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"496\" data-permalink=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/attachment\/replication_log\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/replication_log.png?fit=922%2C214&amp;ssl=1\" data-orig-size=\"922,214\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"replication_log\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/replication_log.png?fit=300%2C70&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/replication_log.png?fit=840%2C195&amp;ssl=1\" class=\"wp-image-496 size-full\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/replication_log.png?resize=840%2C195\" alt=\"Replication Lag\" width=\"840\" height=\"195\" srcset=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/replication_log.png?w=922&amp;ssl=1 922w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/replication_log.png?resize=300%2C70&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/replication_log.png?resize=768%2C178&amp;ssl=1 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption id=\"caption-attachment-496\" class=\"wp-caption-text\">If there wasn&#8217;t a doubt, replication lag was improved as well.<\/figcaption><\/figure>\n<p>In the four years since Wanderu launched, it has relied heavily on MongoDB. They store the station and trip information for each local, regional, and national carrier. With the new <a href=\"https:\/\/docs.mongodb.com\/manual\/reference\/operator\/aggregation\/graphLookup\/\">$graphLookup<\/a> capability in MongoDB version 3.4, they are looking at the possibility of utilizing that technology for their graphing needs as well.<\/p>\n<h3>Further Industry Thoughts<\/h3>\n<p>MongoDB is a widely used NoSQL database. It is used by companies large and small, for a variety of reasons. I reached out to a few other known MongoDB users to get some real world feedback and product experiences.<\/p>\n<h6>Carfax<\/h6>\n<p><a href=\"https:\/\/www.carfax.com\">CARFAX<\/a>, for example, has been using MongoDB in production since version 1.8. They load over a billion <a href=\"http:\/\/www.kenwalger.com\/blog\/nosql\/document-model\/\">documents<\/a> a year and generate over 20,000 reports per second. <a href=\"https:\/\/twitter.com\/JaiHirsch\">Jai Hirsch<\/a>, a Senior Systems Architect at CARFAX, wrote a nice <a href=\"https:\/\/jaihirsch.github.io\/straw-in-a-haystack\/\/mongodb\/2014\/01\/06\/mongodb-legacy-migration\/\">write up<\/a> about why they decided on MongoDB. They have achieved some tremendous performance benefits from compressed replication.<\/p>\n<h6>GHX<\/h6>\n<p><a href=\"https:\/\/www.ghx.com\/\">GHX<\/a> switched from MMAPv1 to WiredTiger with the 3.2 release of MongoDB. Jeff Sherard, their Database Engineering Manager, had another very positive experience.<\/p>\n<blockquote><p>Definitely the switch to WiredTiger in 3.2 was a huge boost. Especially on the compression side &#8211; we experience about 50% compression. Document level locking vs. Collection level locking also improved performance for us significantly.<\/p><\/blockquote>\n<p>He also experienced benefits with <a href=\"http:\/\/www.kenwalger.com\/blog\/nosql\/mongodb-horizontal-scaling-sharding\/\">sharding<\/a> and <a href=\"https:\/\/docs.mongodb.com\/manual\/replication\/\">replica sets<\/a> as well with an upgrade to 3.4.4.<\/p>\n<blockquote><p>We recently upgraded to 3.4.4 and are particularly pleased with the improvements in balancing on shards (the parallelism makes balancing really fast). And the initial sync improvements in replica sets [sic] have been really useful too.<\/p><\/blockquote>\n<h6>Tinkoff Bank<\/h6>\n<p><a href=\"https:\/\/www.tinkoff.ru\/eng\/\">Tinkoff Bank<\/a> landed on using MongoDB instead of Oracle based on their finding that the performance of <a href=\"http:\/\/docs.oracle.com\/javadb\/10.6.2.1\/ref\/rrefclob.html\">Oracle&#8217;s CLOBs<\/a>\u00a0are not as fast and are not searchable. They are able to process approximately 1,500 requests per second using their three node replica set. These queries put a load of 5-10% on the CPU of the <a href=\"https:\/\/docs.mongodb.com\/manual\/core\/replica-set-primary\/\">primary node<\/a>.<\/p>\n<h3>Wrap Up<\/h3>\n<p>I&#8217;m sure that the SQL vs. NoSQL debate will live on. Much the same as Windows vs. Mac, or cats vs. dogs. I hope, however, that based on the information and testimonies provided here we can lay to rest the notion that MongoDB isn&#8217;t &#8220;enterprise ready.&#8221; If we are going to argue the virtues of MongoDB, we should at least be talking about the most current version.\u00a0As in the scene with Mick Dundee, he comes across looking foolish for basing his entire view of a product based on something he experienced years ago.<\/p>\n<p>There are several MongoDB specific terms in this post. I created a <a href=\"https:\/\/www.echoskillstore.com\/MongoDB-Dictionary\/45103\">MongoDB Dictionary<\/a> skill for the <a href=\"https:\/\/www.amazon.com\/gp\/product\/B01DFKC2SO\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B01DFKC2SO&amp;linkCode=as2&amp;tag=kenwalgersite-20&amp;linkId=f9e513223de2525a72b95cf9561db55b\" rel=\"noopener noreferrer\">Amazon Echo<\/a>\u00a0line of products. Check it out and you can say &#8220;Alexa, ask MongoDB what is a document?&#8221; and get a helpful response.<\/p>\n<hr \/>\n<p><em>Follow me on Twitter <a href=\"https:\/\/www.twitter.com\/kenwalger\">@kenwalger<\/a> to get the latest updates on my postings.<\/em><\/p>\n<a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-facebook nolightbox\" data-provider=\"facebook\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Facebook\" href=\"https:\/\/www.facebook.com\/sharer.php?u=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F481&#038;t=MongoDB%20Performance%20Issues%20%E2%80%93%20Fact%20or%20Fiction&#038;s=100&#038;p&#091;url&#093;=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F481&#038;p&#091;images&#093;&#091;0&#093;=https%3A%2F%2Fi0.wp.com%2Fwww.kenwalger.com%2Fblog%2Fwp-content%2Fuploads%2F2017%2F08%2Ffeature-e1501791518387.png%3Ffit%3D125%252C125%26ssl%3D1&#038;p&#091;title&#093;=MongoDB%20Performance%20Issues%20%E2%80%93%20Fact%20or%20Fiction\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"Facebook\" title=\"Share on Facebook\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/facebook.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-twitter nolightbox\" data-provider=\"twitter\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Twitter\" href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F481&#038;text=Hey%20check%20this%20out\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"twitter\" title=\"Share on Twitter\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/twitter.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-reddit nolightbox\" data-provider=\"reddit\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Reddit\" href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F481&#038;title=MongoDB%20Performance%20Issues%20%E2%80%93%20Fact%20or%20Fiction\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"reddit\" title=\"Share on Reddit\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/reddit.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-linkedin nolightbox\" data-provider=\"linkedin\" target=\"_blank\" rel=\"nofollow\" title=\"Share on Linkedin\" href=\"https:\/\/www.linkedin.com\/shareArticle?mini=true&#038;url=https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F481&#038;title=MongoDB%20Performance%20Issues%20%E2%80%93%20Fact%20or%20Fiction\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px;margin-right:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"linkedin\" title=\"Share on Linkedin\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/linkedin.png?resize=48%2C48&#038;ssl=1\" \/><\/a><a class=\"synved-social-button synved-social-button-share synved-social-size-48 synved-social-resolution-single synved-social-provider-mail nolightbox\" data-provider=\"mail\" rel=\"nofollow\" title=\"Share by email\" href=\"mailto:?subject=MongoDB%20Performance%20Issues%20%E2%80%93%20Fact%20or%20Fiction&#038;body=Hey%20check%20this%20out:%20https%3A%2F%2Fwww.kenwalger.com%2Fblog%2Fwp-json%2Fwp%2Fv2%2Fposts%2F481\" style=\"font-size: 0px;width:48px;height:48px;margin:0;margin-bottom:5px\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" alt=\"mail\" title=\"Share by email\" class=\"synved-share-image synved-social-image synved-social-image-share\" width=\"48\" height=\"48\" style=\"display: inline;width:48px;height:48px;margin: 0;padding: 0;border: none;box-shadow: none\" src=\"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/plugins\/social-media-feather\/synved-social\/image\/social\/regular\/96x96\/mail.png?resize=48%2C48&#038;ssl=1\" \/><\/a>","protected":false},"excerpt":{"rendered":"<p>I see posts and hear conversations quite frequently about MongoDB performance issues. They are a frequent, and hot, topic on sites like Quora, Hacker News, and Reddit. Many of these &#8220;hits&#8221; against MongoDB are based on outdated data and older versions of MongoDB. There was a movie from the late 1980&#8217;s called Crocodile Dundee II. &hellip; <a href=\"https:\/\/www.kenwalger.com\/blog\/nosql\/mongodb\/mongodb-performance-issues\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;MongoDB Performance Issues &#8211; Fact or Fiction&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":500,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pmpro_default_level":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[21],"yst_prominent_words":[742,705,99,300,724,733,716,87,743,711,702,703,750,749,748,781,728,712,746,745],"class_list":["post-481","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mongodb","tag-performance","pmpro-has-access"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.kenwalger.com\/blog\/wp-content\/uploads\/2017\/08\/feature-e1501791518387.png?fit=125%2C125&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8lx70-7L","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/481","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/comments?post=481"}],"version-history":[{"count":14,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/481\/revisions"}],"predecessor-version":[{"id":503,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/posts\/481\/revisions\/503"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/media\/500"}],"wp:attachment":[{"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/media?parent=481"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/categories?post=481"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/tags?post=481"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.kenwalger.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=481"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}