Windows uses a swap file or page file to temporarily store data that does not fit into RAM. This helps in smooth functioning of the system even when the RAM is insufficient. Generally, the swap file is located on the C: drive. However, when there is not enough space on C: or if it is manually configured, Windows might choose an alternative location such as J:.
Insufficient Space on C:
If the C: drive does not have sufficient space, Windows might face issues in creating or managing the swap file. This can lead to random failures in creating a swap file on the alternative drive (J:). To tackle this, ensure that the C: drive has at least 1 GB of free space for the swap file to function correctly.
Manually Configured Alternative Location [J:]
In some cases, the alternative location (J:) might have been manually configured for the swap file. While this may work in most cases, there can be occasional failures in creating the swap file. It is essential to ensure that the alternative location has the necessary permissions and space for the swap file.
Checking Space on J:
To check if the alternative drive (J:) has enough space for the swap file, you can use the following command in PowerShell or Command Prompt:
> fsutil volume diskfree J:
This command will display the total, used, and free space on the J: drive. Ensure there is at least 18 GB of free space available for smooth functioning of the swap file.
Configuring Swap File Size
To configure the swap file size, follow these steps:
- Type
SystemPropertiesAdvancedin the search bar and press Enter. - Under the Performance section, click on
Settings. - In the Performance Options window, navigate to the
Advancedtab and click onVirtual Memory. - Choose the drive (C: or J:) where you want to change the swap file size, then click
Custom sizeand input the desired size in MB (for example, 18000 MB for 18 GB).
Troubleshooting Random Failures
Random failures in creating the swap file on drive J: might be caused by permission issues or a conflicting program. Follow these steps to troubleshoot:
- Check the permission settings for the J: drive and ensure that the system has full control.
- Disable any third-party software or antivirus temporarily and check if the issue persists.
- Run the
chkdsk J:command to scan and fix possible issues with the drive.