What is swap usage? What is an acceptable swap usage percentage? What should I do if the swap usage is too high? In this post, MiniTool Partition Wizard shows you how to reduce the swap usage by adding the swap space.

What Is Swap Usage

If you are a Linux user, you may notice that there is a swap partition on your computer. The function of this partition is similar to virtual memory (paging file) on Windows.

When the actual memory is not enough, the operating system will take out part of the temporarily unused data from the memory and place it into the swap partition, thereby freeing up enough memory space for the currently running program.

In Linux, users can use command “~$ free” or “~$ free -h” to display swap utilization. In Windows, the system will not display the swap usage or virtual memory usage. In most case, users may see the swap usage on third-party software like Rainmeter.

Linux Swap – An Alternative to PC Memory Not Enough

What Is an Acceptable Swap Usage Percentage?

I have rainmeter on my desktop… My CPU usage is about 10%, my RAM is at 33%, but my SWAP Usage is at 57%. Is that normal, or could this mean I have an issue somewhere? —reddit.com

Some people may find that the swap usage on their PCs is very high and they are worried about this. What is an acceptable SWAP Usage percentage? Should I take measures to decrease the swap usage?

The Best Way to Free Create Swap Partition in Linux
The Best Way to Free Create Swap Partition in Linux

It is an important thing to create Swap partition in Linux. MiniTool Partition Wizard can help you to create Linux partition quickly when there is a need.

Read More

Actually, swap usage percentage is not so much important. Instead, you should check the swap space, making sure it is not too big or too small.

According to Microsoft, the Windows swap space (virtual memory) should be 1.5 times or twice the physical memory. As for Linux systems, you can refer to RedHat’s saying. The recommended swap space is as follows:

Amount of RAM in the systemRecommended swap spaceRecommended swap space if allowing for hibernation
<=2GB2 times the amount of RAM3 times the amount of RAM
2GB – 8GBEqual to the amount of RAM2 times the amount of RAM
8GB – 64GBAt least 4 GB1.5 times the amount of RAM
> =64GBHibernation not recommended

How to Reduce Swap Usage

In most cases, high swap usage may mean that the RAM has heavy load. You can reduce the swap usage by reducing the RAM usage or adding the swap usage.

Windows 10 High Memory Usage [Causes and Solutions]
Windows 10 High Memory Usage [Causes and Solutions]

This article explains what high memory usage is and how to check it. It also gives 11 methods to fix Windows 10 high memory usage caused by most common reasons.

Read More

In this part, I will show you how add the swap space in Windows and Linux. In Windows, please follow steps below:

  • Open File Explorer, right-click This PC, and select Properties.
  • Select Advanced system settingsin the pop-up window.
  • In the System Properties window > Advanced tab, click Settingsin Performance.
  • Skip to Advanced tab in the pop-up window, and click Changein Virtual memory.
  • Uncheck Automatically manage paging file size for all drives.
  • Click partition C, check No paging file, and click Setto save it.
  • Click Yesto confirm.
  • Select a non-system partition and then check Custom size.
  • Set a proper virtual memory value. Please note that it’s recommended that the value in Initial sizeis the same as that in Maximum size.
  • Click Setand OK to save changes.

change virtual memory

In Linux, you can use the following commands to add the swap space:

  • dd if=/dev/zero of=swapfile bs=1M count=1024 (This command creates a swapfile with specified size. bs is the unit bytes, you can also designate the unit to M or G manually. The swapfile size is bs*count.)
  • mkswap swapfile (This command makes the file the swap format. You should change the swapfile path accordingly.)
  • swapon swapfile (This command enables the swapfile. Please change the path accordingly.)
  • Modify /etc/fstab In the file, add command line “swapfile swap swap defaults 0 0“. This makes the swapfile valid permanently. Similarly, please change the path accordingly.
  • linkedin
  • reddit