"You gain no performance improvement by turning off the Paging File. When certain applications start, they allocate a huge amount of memory (hundreds of megabytes typically set aside in virtual memory) even though they might not use it. If no paging file (pagefile.sys) is present, a memory-hogging application can quickly use a large chunk of RAM. Even worse, just a few such programs can bring a machine loaded with memory to a halt. Some applications (e.g., Adobe Photoshop) will display warnings on startup if no paging file is present." - Source
"In modern operating systems, including Windows, application programs and many system processes always reference memory using virtual memory addresses which are automatically translated to real (RAM) addresses by the hardware. Only core parts of the operating system kernel bypass this address translation and use real memory addresses directly. All processes (e.g. application executables) running under 32 bit Windows gets virtual memory addresses (a Virtual Address Space) going from 0 to 4,294,967,295 (2*32-1 = 4 GB), no matter how much RAM is actually installed on the computer. In the default Windows OS configuration, 2 GB of this virtual address space are designated for each process' private use and the other 2 GB are shared between all processes and the operating system. RAM is a limited resource, whereas virtual memory is, for most practical purposes, unlimited. There can be a large number of processes each with its own 2 GB of private virtual address space. When the memory in use by all the existing processes exceeds the amount of RAM available, the operating system will move pages (4 KB pieces) of one or more virtual address spaces to the computer's hard disk, thus freeing that RAM frame for other uses. In Windows systems, these "paged out" pages are stored in one or more files called pagefile.sys in the root of a partition. Virtual Memory is always in use, even when the memory required by all running processes does not exceed the amount of RAM installed on the system." “关闭页面文件你不会获得任何性能的提升。当应用程序启动后会分配到大量的内存(从虚拟内存中获得几百MB)即使可能根本不会用到。如果没有页面文件(即虚拟内存),吞噬内存的应用程序很快能用去一大块物理内存。更糟的是,很少的应用程序会使内存耗尽的机器停下来,如果没有页面文件,一些应用程序(例如Adobe Photoshop)会在启动时显示警告。”- 资料
“在现在的操作系统中,包括Windows,应用程序和很多系统进程总是使用虚拟内存地址来访问内存,硬件会自动把虚拟内存地址转为实地址,只有操作系统核心会绕过这个地址转换直接访问实存地址。所有在32位Windows环境下运行的进程(例如可执行文件)都会获得虚拟内存地址(一块虚拟内存空间)范围从0到4,294,967,295(232 - 1 = 4 GB),不论到底这台计算机上安装了多少内存。在Windows的默认设置里,每个进程会分配2 GB虚拟内存专用,另外2 GB由所有进程和操作系统共享。内存是有限的资源,然而通常来说,虚拟内存却是无限的。可以存在很多进程,它们各自拥有2 GB的虚拟地址空间。当所有进程需要的内存量超过了可用值,操作系统会把一到多个虚拟地址空间页(每块4 KB)移动到硬盘,为其它用途腾出内存空间。在Windows系统中,这些被转移的页就暂存在一到多个名为pagefile.sys的文件中,这些文件位于分区的根目录下。虚拟内存总是处于使用中,即使所有进程需要的内存量加起来还没有系统已安装大。” |