PageFile in Windows 10 — A life saver (P.S. I still hate windows for programming)
So the other day, I had to reset my laptop because I had some bootsector issues and after that I had to install ubuntu 20.04 alongside windows(as dual boot). Must say, I had tried installing ubuntu in other drives(non-SSD ones) but the performance was quite slow. So this time I decided to install it on the SSD drive.
Currently I am using the Dell Inspiron 7560 laptop whose features include — 8 GB RAM, 1 TB hard-disk along with 128 GB SSD. Also it has an i7 processor. But when I went to shrink the drive, I showed me only 8 GB of shrinkable space. I was surprised, since I already had 36 GB taken up by the default OS, i.e. windows 10 and the rest of the drive was empty. I did some digging and found out about something called as the “PageFile”.
Now according to Google —
Pagefile in Windows 10 is a hidden system file with the .SYS extension that is stored on your computer’s system drive (usually C:\). The Pagefile allows the computer to perform smoothly by reducing the workload of the physical memory, or RAM.
Some more points about the pagefile are as follows(courtesy - Google):
- Simply put, every time you open more applications than the RAM on your PC can accommodate, the programs already present in the RAM are automatically transferred to the Pagefile. This process is technically called Paging. Because the Pagefile works as a secondary RAM, many times it is also referred to as Virtual Memory.
- The minimum and maximum size of the Pagefile can be up to 1.5 times and 4 times of the physical memory that your computer has, respectively. For example, if your computer has 1GB of RAM, the minimum Pagefile size can be 1.5GB, and the maximum size of the file can be 4GB.
- By default, Windows 10 automatically manages the Pagefile according to your computer’s configuration and the RAM present in it. However, if you ever face lagging while working on Windows 10, or you start getting the PAGE_FAULT_IN_NONPAGED_AREA or KERNEL_DATA_INPAGE_ERROR Blue Screen of Death (BSOD), managing the size of the Pagefile manually is the first thing you should look for.
Now, I came across another article which said that I had to uncheck the Automatically manage paging file size for all drives checkbox in order to allow me to have more shrinkable size for my ubuntu installation. So I did that under system properties and after that I was able to get 32 GB of shrinkable space, out of which I allocated 30 GB for ubuntu. I am still curious though, why does the system not allow me to shrink more than that! Well honestly, 30 GB is less I know, but I can handle that much of space along with all other apps and personal projects. May be it’s something related to the configuration of my laptop. I know it could be changed, and I will try my best to figure it out eventually. To be frank, when it comes to programming, I hate the windows OS, too many setups, and stuff like that.
Well Ubuntu has always been my favourite OS since college and now that I have installed the latest version i.e. 20.04, I must say it is ❤️ 😍!