How Big Should Your Page File or Swap Partition Be? According to an old rule of thumb, your page file or swap should be “double your RAM” or “1. RAM.” But do you really need a 3. GB page file or swap if you have 1. GB of RAM? You probably don’t need that much page file or swap space, which is a relief considering a modern computer might have a solid- state drive with very little space. The Purpose of the Page File or Swap Partition. First, let’s remember the real purpose of the page file on Windows or swap partition on Linux. Freeing up space on the C Drive. How big should the Windows folder (normally). I did disk defragmentation and disk cleanup that reduced the Windows folder by less. Both provide additional working memory to your computer. For example, if your computer has 2 GB of RAM and you open a large number of programs or large number of files, your computer might need to store 3 GB of data in its working memory. The computer stores that additional 1 GB of data in its page file or swap space. The page file or swap acts as an “overflow” area to hold the additional data. Your computer automatically transfers data back to its RAM when it’s being used, and moves data to its page file or swap partition when it’s not being used. If you used an older desktop computer, you could see this happen after you minimized a desktop program for a while. When you maximized it later, it would take a while to appear, and you’d hear your hard drive grinding away while that disk activity LED flashed — its data was being moved back from your page file or swap partition to its RAM. The RAM is much faster than the page file or swap partition. If your RAM was full and you had no page file, and then you opened another program, the program would likely crash. Having a page file with additional space programs can use prevents this from happening. Other Uses for Page File and Swap Partitions. Windows and Linux also use their page file and swap space for other purposes: Windows Crash Dumps: On Windows, the page file is used for crash dumps. I have the Windows folder on its own 64GB mSATA drive. Why is Windows folder so big in Windows 8.1? WinSxS Folder in Windows 10/8/7 explained. RECOMMENDED. So what is the mystery of this Winsxs folder in Windows Vista and later? Let us find so, in this post. ![]() How Big Should Swap Be
![]() To create a complete memory dump, the page file must be at least the size of the physical memory + 1 MB. For kernel memory dumps, the page file must be at least 8. MB on systems with 8 GB of RAM or more. Most people won’t need complete memory dumps, but kernel dumps might be useful. The required 8. 00 MB page file is fairly small, but it requires you leave your page file enabled and don’t disable it. This may also be referred to as “suspend to disk.” You might assume you need a swap partition as big as your RAM to hibernate to it, but you actually just need a swap partition as big as the RAM you use — so, if you only regularly use 4 GB of your 1. GB of RAM, you could hibernate to a 4 GB swap partition. However, if you used more than 4 GB of RAM, you might not be able to hibernate. It’s often safe to choose a swap partition equal to the size of your RAM. Note that this only applies to hibernating — if you never plan on hibernating your computer, you don’t need to worry about this. The answer depends on what you do with your computer and how much memory you use. For example, if you have 8 GB of memory but you never ever used more than those 8 GB, you could get by with no paging or swap space at all — it’s likely you would need more than 8 GB eventually, of course. On the other hand, you might have a computer with 6. GB of memory, but it might regularly work with 1. GB data sets — you’d probably want at least the 6. GB paging or swap space just to be safe. So a computer with 8 GB of RAM might need no page file and a computer with 6. GB of RAM might need a huge page file. It all depends on what the computer is doing. Most people won’t be able to predict how much paging or swap space they need. Even if you looked at your used memory right now, there’s no telling how much your programs will need in a week or a month. Windows Can Automatically Manage It. On Windows, the page file is stored at C: \pagefile. By default, Windows automatically manages the size of this file. It starts small and grows to a potentially larger size if you need it. We recommend letting Windows handle the size of the page file on its own. It shouldn’t take a massive amount of space on your system drive. If your page file does take a large amount of space on your system drive, it’s because you needed that large a page file in the past and Windows automatically grew it in size for you. For example, on a Windows 8. GB of RAM, our page file is currently only 1. GB in size. We don’t have all that much RAM, but Windows is using a small page file until we need more. There are no performance benefits to getting rid of a page file, only potential system instability issues where programs might crash if you use all your RAM. You could eliminate the page file to save space on your system drive, but it usually isn’t worth it. If you want to manually set a size — not recommended — be sure to bear in mind that what really matters if how much memory your system will use, not just the size of its RAM. Microsoft’s documentation notes that: “the reason to configure the page file size has not changed. It has always been about supporting a system crash dump, if it is necessary, or extending the system commit limit, if it is necessary. For example, when a lot of physical memory is installed, a page file might not be required to back the system commit charge during peak usage. The available physical memory alone might be large enough to do this.”In other words, it’s all about how much memory you’ll actually need — the total amount of available memory being the “system commit limit.”Linux Requires a Choice. On Linux, the equivalent to the Windows paging file is the swap partition. Because this is a partition and not just a file, you have to make a choice about the size of your swap partition when installing Linux. Sure, you could resize your partitions later — but that’s more work. Linux can’t automatically manage the size of your swap partition for you. Each Linux distribution uses its own installer, and each Linux distribution has some logic in its installer that automatically tries to choose the appropriate swap partition size. Linux distributions typically use the size of your RAM to help decide the size of your swap partition. When installing Ubuntu, the typical default swap partition size seems to be the size of your RAM plus an additional half a GB or so. This ensures hibernate will work properly. If you’re manually partitioning in your Linux installer, the size of your RAM plus . GB is a good rule of thumb that will ensure you can actually hibernate your system. That should usually be more than enough swap space, too. If you have a large amount of RAM — 1. GB or so — and you don’t need hibernate but do need disk space, you could probably get away with a small 2 GB swap partition. Again, it really depends on how much memory your computer will actually use. But it’s a good idea to have some swap space just in case. The old “double the size of the RAM” rule of thumb applied to computers with 1 or 2 GB of RAM. There’s no one- size- fits- all answer to how much page file or swap space you need. It all depends on the programs you use and what they need. If you’re unsure, sticking with your operating system’s defaults is almost always a good idea. Image Credit: William Hook on Flickr, Jean- Etienne Minh- Duy Poirrier on Flickr.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |