<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":970,"date":"2021-07-18T20:31:13","date_gmt":"2021-07-18T20:31:13","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=970"},"modified":"2021-09-09T07:24:03","modified_gmt":"2021-09-09T07:24:03","slug":"lazy-writer-in-memory","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/","title":{"rendered":"Lazy writer in Memory ?"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"lazy-write\" class=\"color-pink\" style=\"text-align: justify;\"><span style=\"font-family: inherit; font-size: 2rem;\">Lazy write<\/span><\/h2>\n<\/div>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>Lazy write is an effect caused by the use of a write-back\u00a0<a href=\"https:\/\/forums.wikitechy.com\/question\/what-is-the-difference-between-cache-and-persist\/\" target=\"_blank\" rel=\"noopener\">cache<\/a>. In a write-back cache, data is first written to the cache and then is later (during a particular time such as an idle machine cycle) is written to the disk or memory.<\/li>\n<li>This type of cache is more complex to implement, due to the need to track each locations that have been written over and what needs to be marked as dirty to fix later.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"text-center row\" style=\"text-align: justify;\"><\/div>\n<div class=\"Content\">\n<div class=\"hddn\">\n<h2 id=\"lazy-writer-in-memory\" class=\"color-green\" style=\"text-align: justify;\">Lazy writer in Memory<\/h2>\n<ul>\n<li style=\"text-align: justify;\">Lazy writer is a thread which is present for each NUMA node (and every instance has at least one) that scans through the buffer cache associated with that node.<\/li>\n<li style=\"text-align: justify;\">The lazy writer thread sleeps for a specific interval of time, and when it wakes up, it examines the size of the free buffer list.<\/li>\n<li style=\"text-align: justify;\">If the list is below a certain threshold, which depends on the total size of the buffer pool, the lazy writer thread scans the buffer pool to repopulate the free list.<\/li>\n<li style=\"text-align: justify;\">As buffers are added to the free list, they are also written to disk if they are dirty.<\/li>\n<li style=\"text-align: justify;\">So if there is no memory pressure and memory notification is stable it sleeps<\/li>\n<li style=\"text-align: justify;\">The sole purpose of Lazy Writer is to maintain some free buffers in the\u00a0<a href=\"https:\/\/www.wikitechy.com\/tutorials\/sql\/subquery-in-sql-server\" target=\"_blank\" rel=\"noopener\">SQL Server<\/a>\u00a0Buffer Pool.<\/li>\n<li style=\"text-align: justify;\">Lazy writer runs periodically and check which buffers can be flushed and returned to the free pool.<\/li>\n<li style=\"text-align: justify;\">So even SQL Server is not under memory pressure, it will also work regularly.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : Lazy write is an effect caused by the use of a write-back cache&#8230;<\/p>\n","protected":false},"author":2,"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":[6547],"tags":[195,6595,203,199,214,198,209,283,205,6811,2936,222,484,196,212,286,6809,6812,6807,6814,6815,6810,6808,970,207,204,282,208,288,206,6806,6813,975,200,197,284,280,364,6805,285],"class_list":["post-970","post","type-post","status-publish","format-standard","hentry","category-sql","tag-accenture-interview-questions-and-answers","tag-allstate-solut-interview-questions-and-answers","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-chetu-interview-questions-and-answers","tag-collabera-technologies-interview-questions-and-answers","tag-conduent-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-difference-between-checkpoint-and-lazy-writer-in-sql-server","tag-fis-global-business-solutions-india-pvt-ltd-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-genpact-interview-questions-and-answers","tag-ibm-interview-questions-and-answers","tag-indecomm-global-services-interview-questions-and-answers","tag-lt-infotech-interview-questions-and-answers","tag-lazy-server","tag-lazy-spool-sql-server-2008","tag-lazy-writer-in-sql-server","tag-lazy-writer-in-sql-server-2008","tag-lazy-writer-in-sql-server-2008-r2","tag-lazy-writer-in-sql-server-2012","tag-lazy-writing","tag-mindtree-interview-questions-and-answers","tag-mphasis-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-persistent-systems-interview-questions-and-answers","tag-prokarma-softech-pvt-ltd-interview-questions-and-answers","tag-r-systems-interview-questions-and-answers","tag-sap-labs-india-pvt-ltd-interview-questions-and-answers","tag-sql-lazy-writer","tag-sql-server-lazywriter","tag-tata-consultancy-service-interview-questions-and-answers","tag-tech-mahindra-interview-questions-and-answers","tag-unitedhealth-group-interview-questions-and-answers","tag-valuelabs-interview-questions-and-answers","tag-virtusa-consulting-services-pvt-ltd-interview-questions-and-answers","tag-wells-fargo-interview-questions-and-answers","tag-what-is-lazy-writer-in-sql-server-2008","tag-xoriant-solutions-pvt-ltd-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Lazy writer in Memory ? - SQL Interview Questions - Wikitechy<\/title>\n<meta name=\"description\" content=\"Lazy writer in Memory ? - SQL Interview Questions - Lazy write is an effect caused by the use of a write-back\u00a0cache. In a write-back cache, data is first written to the cache\" \/>\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\/sql\/lazy-writer-in-memory\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lazy writer in Memory ? - SQL Interview Questions - Wikitechy\" \/>\n<meta property=\"og:description\" content=\"Lazy writer in Memory ? - SQL Interview Questions - Lazy write is an effect caused by the use of a write-back\u00a0cache. In a write-back cache, data is first written to the cache\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-18T20:31:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-09T07:24:03+00:00\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\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\/sql\/lazy-writer-in-memory\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/\",\"name\":\"Lazy writer in Memory ? - SQL Interview Questions - Wikitechy\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"datePublished\":\"2021-07-18T20:31:13+00:00\",\"dateModified\":\"2021-09-09T07:24:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"Lazy writer in Memory ? - SQL Interview Questions - Lazy write is an effect caused by the use of a write-back\u00a0cache. In a write-back cache, data is first written to the cache\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/\"]}]},{\"@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\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lazy writer in Memory ? - SQL Interview Questions - Wikitechy","description":"Lazy writer in Memory ? - SQL Interview Questions - Lazy write is an effect caused by the use of a write-back\u00a0cache. In a write-back cache, data is first written to the cache","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\/sql\/lazy-writer-in-memory\/","og_locale":"en_US","og_type":"article","og_title":"Lazy writer in Memory ? - SQL Interview Questions - Wikitechy","og_description":"Lazy writer in Memory ? - SQL Interview Questions - Lazy write is an effect caused by the use of a write-back\u00a0cache. In a write-back cache, data is first written to the cache","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/","og_site_name":"Wikitechy","article_published_time":"2021-07-18T20:31:13+00:00","article_modified_time":"2021-09-09T07:24:03+00:00","author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/","name":"Lazy writer in Memory ? - SQL Interview Questions - Wikitechy","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2021-07-18T20:31:13+00:00","dateModified":"2021-09-09T07:24:03+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"Lazy writer in Memory ? - SQL Interview Questions - Lazy write is an effect caused by the use of a write-back\u00a0cache. In a write-back cache, data is first written to the cache","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/sql\/lazy-writer-in-memory\/"]}]},{"@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\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/970","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=970"}],"version-history":[{"count":2,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/970\/revisions"}],"predecessor-version":[{"id":3159,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/970\/revisions\/3159"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=970"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=970"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=970"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}