<br />
<b>Warning</b>:  Undefined array key "global_protection_id" in <b>/home/wikitechy/public_html/interview-questions/wp-content/plugins/content-protector/inc/class-ps-rest-handler.php</b> on line <b>51</b><br />
{"id":4134,"date":"2022-04-16T06:49:48","date_gmt":"2022-04-16T06:49:48","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=4134"},"modified":"2022-04-16T06:49:48","modified_gmt":"2022-04-16T06:49:48","slug":"what-are-the-storage-engines-used-by-mongodb","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/","title":{"rendered":"What are the storage engines used by MongoDB ?"},"content":{"rendered":"<ul>\n<li style=\"text-align: justify;\">Storage engine is responsible for managing how data is stored, both in memory and on disk. It is the component of the database.<\/li>\n<li style=\"text-align: justify;\">MongoDB supports multiple storage engines, as different engines perform better for specific workloads.<\/li>\n<li style=\"text-align: justify;\">Choosing the\u00a0excellent\u00a0storage engine for your use case can\u00a0extensively\u00a0have an impact on\u00a0the\u00a0overall performance\u00a0of your applications.<\/li>\n<li style=\"text-align: justify;\">Here, there are four types of storage engines used by MongoDB :\n<ul>\n<li>MMAPv1<\/li>\n<li>WiredTiger<\/li>\n<li>Encrypted<\/li>\n<li>In-memory<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4135\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png\" alt=\"Types of Storage Engines\" width=\"1422\" height=\"710\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png 1422w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines-300x150.png 300w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines-1024x511.png 1024w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines-768x383.png 768w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines-390x195.png 390w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines-820x409.png 820w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines-1180x589.png 1180w\" sizes=\"(max-width: 1422px) 100vw, 1422px\" \/><\/p>\n<h4 id=\"mmapv1\">MMAPv1 :<\/h4>\n<ul>\n<li>This type of storage engine uses memory-mapped files to store its data.<\/li>\n<li>A segment of virtual memory that has been assigned a direct byte-for-byte correlation with some portion of a file.<\/li>\n<li>This storage engine allows a great deal of performance for heavy read applications.<\/li>\n<li>Indexes and Data are mapped into virtual space.<\/li>\n<li>Data access is placed into RAM.<\/li>\n<li>It will swap out memory to disk to make space for the newly requested data if the OS runs out of RAM and an application requests for memory.<\/li>\n<li>MongoDB\u2019s memory was managed by operating system\u2019s virtual memory subsystem.<\/li>\n<\/ul>\n<h4 id=\"wiredtiger\">WiredTiger :<\/h4>\n<ul>\n<li>From Mongo 3.0 WiredTiger is the default storage engine.<\/li>\n<li>This type storage engine uses document-level concurrency control for write operations. At the same time multiple clients can modify different documents of a collection.<\/li>\n<li>It uses only intent locks at the global, database and collection levels when the storage engine detects conflicts between two operations, one will incur a write conflict causing MongoDB to transparently retry that operation.<\/li>\n<li>MongoDB utilizes both the filesystem cache and WiredTiger internal cache. the wired tiger cache will use 50% of RAM minus 1 GB or 256 MB by default.<\/li>\n<li>It is efficient use of CPU cores and RAM.<\/li>\n<li>It allows more tuning storage engines than MMVPv1. 7 to 10X better write performance. 80% less storage with compression.<\/li>\n<li>In WiredTiger internal cache collection level data\u00a0is uncompressed and uses a different representation from the on-disk format.<\/li>\n<\/ul>\n<h4 id=\"encrypted\">Encrypted :<\/h4>\n<ul>\n<li>It is available in MongoDB enterprise only.<\/li>\n<li>During encryption master keys and database keys are used.<\/li>\n<li>Master key encrypts the database keys, data is encrypted with the database keys.<\/li>\n<li>Application-Level Encryption provides encryption on a per-field or per-document basis within the application layer.<\/li>\n<\/ul>\n<h4 id=\"in-memory\">In-memory :<\/h4>\n<ul>\n<li>Available in the enterprise editions starting from version 3.2.6.<\/li>\n<li>It Handles ultra-high throughput with high availability and low latency.<\/li>\n<li>Low latency on less in-memory infrastructure and more predictable.<\/li>\n<li>Supports high level infrastructure based on zonal sharding.<\/li>\n<li>Indexing support and MongodB rich query capability.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Storage engine is responsible for managing how data is stored, both in memory and on disk. It is the component of the database. MongoDB supports multiple storage engines, as different engines perform better for specific workloads. Choosing the\u00a0excellent\u00a0storage engine for your use case can\u00a0extensively\u00a0have an impact on\u00a0the\u00a0overall performance\u00a0of your applications. Here, there are four types [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"passster_activate_protection":false,"passster_protect_child_pages":"","passster_protection_type":"password","passster_password":"","passster_activate_overwrite_defaults":"","passster_headline":"","passster_instruction":"","passster_placeholder":"","passster_button":"","passster_id":"","passster_activate_misc_settings":"","passster_redirect_url":"","passster_hide":"no","passster_area_shortcode":"","gtb_hide_title":false,"gtb_wrap_title":false,"gtb_class_title":"","gtb_remove_headerfooter":false,"footnotes":""},"categories":[16831],"tags":[17048,17043,17054,17046,17042,17051,17045,17044,17041,17049,17055,17056,17052,17047,17053,17050],"class_list":["post-4134","post","type-post","status-publish","format-standard","hentry","category-mongodb","tag-how-to-know-which-storage-engine-is-used-in-mongodb","tag-mmapv1-storage-engine","tag-mongodb-engine","tag-mongodb-engines","tag-mongodb-storage","tag-mongodb-storage-engine-mmapv1-vs-wiredtiger","tag-mongodb-versions-and-storage-engines","tag-storage-engine-in-mongodb","tag-storage-engines","tag-storage-engines-used-in-mysql","tag-types-of-storage-engine","tag-what-are-the-storage-engines-used-by-mongodb","tag-what-is-storage-engine-in-mongodb","tag-wiredtiger-storage-engine","tag-wiredtiger-storage-engine-in-mongodb","tag-wiredtiger-storage-engine-is-available-with-mongodb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What are the storage engines used by MongoDB ? - MongoDB - Wikitechy<\/title>\n<meta name=\"description\" content=\"What are the storage engines used by MongoDB ? - Storage engine is responsible for managing how data is stored, both in memory and on disk.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What are the storage engines used by MongoDB ? - MongoDB - Wikitechy\" \/>\n<meta property=\"og:description\" content=\"What are the storage engines used by MongoDB ? - Storage engine is responsible for managing how data is stored, both in memory and on disk.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-16T06:49:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/\",\"name\":\"What are the storage engines used by MongoDB ? - MongoDB - Wikitechy\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png\",\"datePublished\":\"2022-04-16T06:49:48+00:00\",\"dateModified\":\"2022-04-16T06:49:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"What are the storage engines used by MongoDB ? - Storage engine is responsible for managing how data is stored, both in memory and on disk.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/#primaryimage\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png\",\"contentUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png\",\"width\":1422,\"height\":710,\"caption\":\"Types of Storage Engines\"},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\/\/www.wikitechy.com\/interview-questions\"],\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What are the storage engines used by MongoDB ? - MongoDB - Wikitechy","description":"What are the storage engines used by MongoDB ? - Storage engine is responsible for managing how data is stored, both in memory and on disk.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/","og_locale":"en_US","og_type":"article","og_title":"What are the storage engines used by MongoDB ? - MongoDB - Wikitechy","og_description":"What are the storage engines used by MongoDB ? - Storage engine is responsible for managing how data is stored, both in memory and on disk.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/","og_site_name":"Wikitechy","article_published_time":"2022-04-16T06:49:48+00:00","og_image":[{"url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png"}],"author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/","name":"What are the storage engines used by MongoDB ? - MongoDB - Wikitechy","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png","datePublished":"2022-04-16T06:49:48+00:00","dateModified":"2022-04-16T06:49:48+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"What are the storage engines used by MongoDB ? - Storage engine is responsible for managing how data is stored, both in memory and on disk.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/mongodb\/what-are-the-storage-engines-used-by-mongodb\/#primaryimage","url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png","contentUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/04\/types-of-storage-engines.png","width":1422,"height":710,"caption":"Types of Storage Engines"},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=4134"}],"version-history":[{"count":1,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4134\/revisions"}],"predecessor-version":[{"id":4136,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4134\/revisions\/4136"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=4134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=4134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=4134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}