{"id":2007,"date":"2021-06-30T17:06:00","date_gmt":"2021-06-30T17:06:00","guid":{"rendered":"https:\/\/www.jameshatton.co.uk\/blog\/?p=2007"},"modified":"2022-08-16T00:33:19","modified_gmt":"2022-08-16T00:33:19","slug":"deleting-the-windows-10-pagefile","status":"publish","type":"post","link":"https:\/\/www.jameshatton.co.uk\/blog\/2021\/06\/30\/deleting-the-windows-10-pagefile\/","title":{"rendered":"Deleting the Windows 10 Pagefile"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I&#8217;ve been running out of space on my boot drive, a 250 GB SSD, but I&#8217;m reluctant to upgrade it with another SSD because I am overhauling my system shortly and will go NVMe rather than SATA. However, it does mean I have to keep on top of things so I don&#8217;t get the dreaded error about scratch disks being full in Photoshop. One of those things is the enormous pagefile.sys that Windows keeps generating.<\/p>\n\n\n\n<!--more-->\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"403\" height=\"334\" data-attachment-id=\"2008\" data-permalink=\"https:\/\/www.jameshatton.co.uk\/blog\/2021\/06\/30\/deleting-the-windows-10-pagefile\/image-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-1.png?fit=403%2C334&amp;ssl=1\" data-orig-size=\"403,334\" 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=\"image-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-1.png?fit=403%2C334&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-1.png?resize=403%2C334&#038;ssl=1\" alt=\"\" class=\"wp-image-2008\" srcset=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-1.png?w=403&amp;ssl=1 403w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-1.png?resize=300%2C249&amp;ssl=1 300w\" sizes=\"auto, (max-width: 403px) 100vw, 403px\" \/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">I&#8217;m not sure why either &#8211; I&#8217;m running 16GB of RAM, which should be enough for my usage but still Windows 10 insists on using a pagefile. Can see how Windows uses a pagefile by typing &#8216;performance&#8217; in the start menu and clicking &#8216;Adjust the appearance and performance of Windows&#8217;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When the <em>Performance Options<\/em> window opens, click on the <em>Advanced<\/em> tab and then <em>Change&#8230;<\/em> at the bottom and you will open the <em>Virtual Memory<\/em> window as seen below.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"618\" data-attachment-id=\"2009\" data-permalink=\"https:\/\/www.jameshatton.co.uk\/blog\/2021\/06\/30\/deleting-the-windows-10-pagefile\/image-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-2.png?fit=860%2C633&amp;ssl=1\" data-orig-size=\"860,633\" 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=\"image-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-2.png?fit=840%2C618&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-2.png?resize=840%2C618&#038;ssl=1\" alt=\"\" class=\"wp-image-2009\" srcset=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-2.png?w=860&amp;ssl=1 860w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-2.png?resize=300%2C221&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-2.png?resize=768%2C565&amp;ssl=1 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">You can actually specify the paging file size for drive(s) by setting its intial size when Windows boots and the maximum size it can have. I&#8217;ve experienced difficulties on a few host machines in the past when I&#8217;ve done this and also noticed the pagefile goes straight to the maximum size quite quickly. The current recommendation is to always let Windows manage the pagefile i.e. leave <em>System managed size <\/em> selected.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That being said, I leave my desktop on 24\/7 and my pagefile was getting enormus every few days or sometimes hours. The system would grind to a halt, let alone not be abel to launch anything, so I needed a quick way of deleting the pagefile without causing issues &#8211; investigating why it gets so big is then next.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There&#8217;s a simple fix so that Windows clears the paging file on shutdown and this can be activated in the Windows Registry. Type &#8220;regedit&#8221; in the Start Menu and navigate to the following folder:<br><em>Computer\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management<\/em><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Double click the key <em>ClearPageFileAtShutdown<\/em> and change the value to &#8220;1&#8221; (without quotes!) as shown below. OK out and close the Registry Editor to save the changes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"480\" data-attachment-id=\"2010\" data-permalink=\"https:\/\/www.jameshatton.co.uk\/blog\/2021\/06\/30\/deleting-the-windows-10-pagefile\/image-3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-3.png?fit=686%2C480&amp;ssl=1\" data-orig-size=\"686,480\" 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=\"image-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-3.png?fit=686%2C480&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-3.png?resize=686%2C480&#038;ssl=1\" alt=\"\" class=\"wp-image-2010\" srcset=\"https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-3.png?w=686&amp;ssl=1 686w, https:\/\/i0.wp.com\/www.jameshatton.co.uk\/blog\/wp-content\/uploads\/2022\/08\/image-3.png?resize=300%2C210&amp;ssl=1 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">I awlays restart to commit registry changes and now upon subsequent restarts or shutdowns, the pagefile will be cleared. This actually, importantly, has a security benefit to it as well.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been running out of space on my boot drive, a 250 GB SSD, but I&#8217;m reluctant to upgrade it with another SSD because I am overhauling my system shortly and will go NVMe rather than SATA. However, it does mean I have to keep on top of things so I don&#8217;t get the dreaded error about scratch disks being full in Photoshop. One of those things is the enormous pagefile.sys that Windows keeps generating.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[82],"tags":[],"class_list":["post-2007","post","type-post","status-publish","format-standard","hentry","category-ict-issues"],"featured_image_src":null,"author_info":{"display_name":"james","author_link":"https:\/\/www.jameshatton.co.uk\/blog\/author\/james\/"},"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p89zH1-wn","jetpack-related-posts":[],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2007","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2007"}],"version-history":[{"count":1,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2007\/revisions"}],"predecessor-version":[{"id":2011,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2007\/revisions\/2011"}],"wp:attachment":[{"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jameshatton.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}