Windows操作系统包含其正常运行所需的多个系统文件。其中一些引起很多好奇心的是Swapfile.sys、Hiberfil.sys和Pagefile.sys。要在System (C) Drive root(System (C) Drive root)上查看这些系统文件,您必须从文件夹(Folder) 选项(Options)中取消隐藏受保护的操作系统文件。在这篇文章中,我们将简要讨论每个文件。
什么是 Hiberfil.sys 文件
Hiberfil.sys文件是Windows用来支持休眠的系统文件。如果您在Windows 10中启用了(Windows 10)休眠(Hibernation),您将看到此文件。
当您启用休眠(Hibernation)并随后启用快速启动(Fast Startup)(这是默认设置)时,您的Hiberfil.sys文件将大约是(Hiberfil.sys)Windows 7中(Windows 7)RAM的3/4 。
现在在Windows 11/10中,它是 40%。如果您禁用了Hibernation,您会发现它的大小大致等于您的 RAM。在Windows 11/10/8中,当您启用休眠(Hibernation)时,您不会发现Hyberfil.sys的大小。在早期版本的Windows中,休眠文件存储了内核会话、设备驱动程序和应用程序数据。在Windows 11/10中,休眠文件仅存储内核会话和设备驱动程序,因此大小或多或少保持不变。
禁用休眠
如果您愿意,您始终可以手动或使用我们的Ultimate Windows Tweaker或 Microsoft Fix It禁用/启用休眠 。但请记住,在Windows 10/8中,这也会禁用快速启动(Fast Startup)。如果您觉得有必要,您可以更改 hiberfil.sys 文件的大小(change the size of hiberfil.sys file)。
什么是 Pagefile.sys 文件
Pagefile.sys或Page File是您的Windows用作虚拟内存的计算机页面文件。PageFile.sys将对象保存在长时间未访问的过度使用的内存中。当Windows用完物理内存时,它会使用Page File ,将(Page File)RAM的一些内容写入磁盘。如果需要回这个“分页”内存,则将其他部分写入磁盘,然后将这部分读回。
如果您经常收到消息您的系统虚拟内存不足(Your system is low on virtual memory),当您尝试启动任何内存密集型应用程序时,您可能需要增加分页文件大小(increase the Paging File size)。
阅读(Read):如何备份或移动 PageFile.sys(How to Back up or Move PageFile.sys)。
删除 Pagefile.sys
每次关机时清除页面文件(Clearing the Page file)意味着用零覆盖数据,这需要时间。这会增加关机时间。但是,如果您处理机密文档,则可能需要“开启”此设置。当您加载此类文档时,它们会被加载到RAM中。为了节省RAM,Windows将某些项目放在页面文件上。因此(Hence),在这种情况下,您可能希望在每次关机时删除页面文件。为此,请打开Regedit并导航到以下键:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
在右窗格中,选择New > DWORD (32-bit) Value。将DWORD值命名为ClearPageFileAtShutdown并为其赋值1。
阅读(Read):对于 64 位版本的 Windows,最佳页面文件大小是(best Page File size for 64-bit versions of Windows)多少?
什么是 Swapfile.sys 文件
在早期版本的Windows中,您有Swapfile.sys或Swap文件。Swap文件保存已从内存中弹出并且预计在一段时间内不会被访问的对象,并允许操作系统在系统内存不足时使用硬盘空间来模拟额外的内存,方法是交换内存部分(RAM)空闲程序正在使用到硬盘上为其他程序释放内存。这种RAM和交换(Swap)文件的组合称为虚拟内存(Memory)。拥有交换文件会使您的计算机操作系统“拥有”比实际拥有更多的RAM 。
Swapfile不用于Windows 11/10的快速启动过程。(Swapfile)存储内核会话并在这里发挥作用的是Hiberfil.sys文件。(Hiberfil.sys)
在Windows 11/10中,您再次看到Swapfile.sys!这个最新版本的Windows同时具有交换文件和分页文件。它的大小约为 256 MB——就我而言,它是 262 MB。
阅读(Read):如何在 Windows中重置虚拟内存或页面文件
为什么我们在Windows 11/10中需要另一个虚拟页面文件?
Swapfile.sys in Windows 11/10中的Swapfile.sys 是系统内部使用的一种特殊类型的页面文件,用于提高某些类型的分页操作的效率。它用于暂停或恢复 UWP Windows 应用程序(Suspend or Resume UWP Windows apps)。
TechNet对Windows中的“新” Swapfile.sys解释如下:
With the introduction of the UWP App, we needed a way to manage their memory outside of the traditional Virtual Memory/Pagefile method. With that, the “%SystemDrive%\swapfile.sys” was born.
Windows can efficiently write the whole (private) working set of a suspended UWP app to disk in order to gain additional memory when the system detects pressure. This process is analogous to hibernating a specific app, and then resuming it when the user switches back to the app. In this case, Windows takes advantage of the suspend/resume mechanism of Modern apps to empty or re-populate an app’s working set.
我希望这可以解释我们看到所有三个文件的原因,即。Windows 11/10Hiberfil.sys、Pagefile.sys和Swapfile.sys文件。
想要了解有关 Windows 中其他文件或文件类型或文件格式的更多信息?检查这些链接:(Looking to learn more about other files or file types or file formats in Windows? Check these links:)
Windows.edb 文件(Windows.edb files) | Thumbs.db 文件 | DLL 和 OCX 文件| 桌面.ini 文件| Nvxdsync.exe。
Hiberfil.sys, Pagefile.sys & the New Swapfile.sys file - Windows 11/10
The Windows operating ѕуstem contains seνeral system fileѕ required for its proper functioning. Somе of them which raise a lot of curiosity are Swapfile.sys, Hiberfil.sys & Pagefile.sys. To see these system files on your System (C) Drive root, you will have to un-hide protected operating system files from Folder Options. In this post, we will briefly talk about each file.
What is Hiberfil.sys file
Hiberfil.sys file is a system file that is used by Windows to support Hibernation. If you have enabled Hibernation in Windows 10, you will see this file.
When you have Hibernation, and subsequently Fast Startup enabled (which is the default setting), your Hiberfil.sys file will be approximately 3/4th of your RAM in Windows 7.
In Windows 11/10 now, it is 40%. In case you have disabled Hibernation, you will find its size roughly equalling your RAM. In Windows 11/10/8, you will not find the size of Hyberfil.sys running wild when you have Hibernation enabled. In the earlier version of Windows, the hibernation file stored the kernel session, device drivers, and application data. In Windows 11/10, the hibernation file stores the kernel session and device drivers only, as a result of which the size remains more or less constant.
Disable Hibernation
If you wish to, you can always disable/enable hibernation manually or by using our Ultimate Windows Tweaker, or a Microsoft Fix It. But then remember, that in Windows 10/8, this will disable Fast Startup too. If you feel the need to, you can change the size of hiberfil.sys file.
What is Pagefile.sys file
Pagefile.sys or the Page File is the computer paging file that your Windows uses as Virtual memory. PageFile.sys holds objects in an over-used memory that has not been accessed for a long period of time. When Windows runs out of physical memory, it resorts to using the Page File, by writing some of the contents of RAM on to the disk. If this ‘Paged out’ memory is needed back, some other part is written to disk, and this part is read back.
If you often get a message Your system is low on virtual memory, when you try to start any memory-intensive application, you may want to increase the Paging File size.
Read: How to Back up or Move PageFile.sys.
Delete Pagefile.sys
Clearing the Page file on every shutdown means overwriting the data by zeros, and it takes time. This will increase the shutdown time. But if you work on confidential documents, then you may want to have this setting ‘on’. When you load such documents, they are loaded into RAM. To save RAM Windows places certain items on the pagefile. Hence you may want to delete pagefile at every shutdown, in such cases. To do so open Regedit and navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
In the right pane, select New > DWORD (32-bit) Value. Name the DWORD value ClearPageFileAtShutdown and give it a value of 1.
Read: What is the best Page File size for 64-bit versions of Windows?
What is Swapfile.sys file
In earlier versions of Windows, you had Swapfile.sys or the Swap file. The Swap file holds objects which have been ejected from memory and are not expected to be accessed for some time and allow an operating system to use hard disk space to simulate extra memory whenever the system runs low on memory, by swapping section of RAM that an idle program is using onto the hard disk to free up memory for other programs. This combination of RAM and Swap files is known as Virtual Memory. Having a swap file makes your computer’s operating system “have” more RAM than it actually has.
The Swapfile is not used in the fast startup process of Windows 11/10. It is the Hiberfil.sys file which stores the kernel session and comes into play here.
In Windows 11/10, you again get to see Swapfile.sys! This latest version of Windows has both – the swapping as well as the paging file at the same time. It is around 256 MB in size – in my case, it is 262 MB.
Read: How to reset Virtual Memory or Page File in Windows
Why do we need another virtual page file in Windows 11/10?
The Swapfile.sys in Windows 11/10 is a special type of pagefile used internally by the system to make certain types of paging operations more efficient. It is used to Suspend or Resume UWP Windows apps.
TechNet explains the ‘new’ Swapfile.sys in Windows as follows:
With the introduction of the UWP App, we needed a way to manage their memory outside of the traditional Virtual Memory/Pagefile method. With that, the “%SystemDrive%\swapfile.sys” was born.
Windows can efficiently write the whole (private) working set of a suspended UWP app to disk in order to gain additional memory when the system detects pressure. This process is analogous to hibernating a specific app, and then resuming it when the user switches back to the app. In this case, Windows takes advantage of the suspend/resume mechanism of Modern apps to empty or re-populate an app’s working set.
I hope this explains the reason why we see all the three files viz. Hiberfil.sys, Pagefile.sys & Swapfile.sys files in Windows 11/10.
Looking to learn more about other files or file types or file formats in Windows? Check these links:
Windows.edb files | Thumbs.db files | DLL and OCX files | Desktop.ini file | Nvxdsync.exe.