Free Up Memory



P.S. Scroll down to ‘The Solution’ for the fix.

For the past couple months, I’ve been using Windows Subsystem for Linux to write code and program inside a Linux system on my Windows 10 Home PC without having to bother with either VMware or Docker.

If you’re struggling with low Windows 10 system performance or 100% memory usage, High CPU. Then use these methods to free up memory on your computer system to speed up the performance and reduced memory usage. Restart The Computer System The Ram is volatile memory, you’ll lose its contents when your computer turned off. First step for me was checking how much memory was Ubuntu consuming using the free -h command inside my WSL terminal. Free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo.

  • From there you have a few different ways to free up storage space. There’s a Manual Removal option where you can choose from different types of content (books, audiobooks, documents, etc) and then choose multiple titles to remove at once. Another option is to use the Quick Archive setting.
  • The good news is you can probably free up a lot of space on your PC running Windows by following the tips here. But if you keep getting messages about low drive space, you might want to consider other options, including adding additional removable storage. To get the most out of these tips, do them in order from top to bottom.

If the free space is too low, under 5% of total disk space, it is time to free up space on the disk. Use the following steps to check the amount of free space on the hard drive.

VMware feels super archaic in the world of Docker images and Kubernetes. Creating shells take so much memory and every single instance of an OS inside VMware takes entire chunks of memory/CPU. Meanwhile, if you have Windows 10 Home, you don’t have access to Hyper-V which is the engine that allows proper virtualization on Windows, thus you can’t use Docker Desktop on your system and have to settle for Docker Toolbox. I don’t want to go too deep into the subjects of my other blogs.

WSL allows me to run a GNU/Linux environment — including most command-line tools, utilities, and applications — directly on Windows, unmodified, without the overhead of a virtual machine.

The Problem

WSL promised me super low resource usage, but I was really surprised to see my RAM usage at almost full capacity while I was working.

Looking For The Problem

I assumed it was my browser hogging all that RAM because I never have lesser than 50 tabs open. I close dozens of tabs everyday but reopen more. At this point, I’ve had to allocate “Spring Cleaning” sessions for my browser every couple weekends. You probably know the struggle, devbros.

Finding The Culprit

I closed up my browser, and checked my RAM usage and was suprised to see that something called Vmmem was eating up 4GB.

After a quick search and making sure that a cryptocurrency mining malware hadn’t infected my system, I found this description on the web.

The vmmem process is a virtual process that the system synthesizes to represent the memory and CPU resources consumed by your virtual machines. In other words, if you see vmmem consuming a lot of memory and CPU resources, then that means your virtual machines are consuming a lot of memory and CPU resources.

Well then, this isn’t supposed to happen, right? Even VMware doesn’t eat this much.

Figuring A Fix

First step for me was checking how much memory was Ubuntu consuming using the free -h command inside my WSL terminal.

free displays the total amount of free and used physical and swap memory in the system, as well as the buffers and caches used by the kernel. The information is gathered by parsing /proc/meminfo. -h or --human shows all output fields automatically scaled to shortest three digit unit and display the units of print out.

When I saw my entire memory under total instead of how much vmmem was hogging, I remembered reading that WSL uses your entire RAM as it’s own. And moreoever, only 101MB was actually being used by the distro.

I started up a Rails server to see if there were any changes.

Huh. It only increased my used RAM to 169MB. Yet, Vmmem continued to consume the same amount.

Anyway, after jumping around from Github Issues to WSL documentations, I figured I had to actually stop the WSL processes to reclaim the memory.

Use wsl -l -v to check out all running distros on your WSL.

Then, wsl -t {insert distro} to terminate the ones in use. Or, simply wsl --shutdown.

You’ll get back the memory from WSL, and you can see the drop in RAM usage in the screenshot above.

Takeaway

WSL does use a really low amount of RAM but it is allocated about 4GB by default when it is started. If you think that’s too much and would like to decrease it, Windows Insider Build 18945 brough customizable settings for wsl.

Create a %UserProfile%.wslconfig file and use it to limit memory assigned to WSL2 VM.

Therefore, in your situation, all you need to include in your file is ⤵

Customize it as necessary with the available options.

Summary :

Receiving 'There is not enough free space on partition (C:)' error? C drive keeps filling up? We show you some fixes to free up disk space as well as how to use free partition manager to upgrade hard drive in Windows 10.

Quick Navigation :

What Is Taking up Space on My Hard Drive

In the daily usage of computer, you may find hard drive space disappearing and wonder 'what is taking up space on my hard drive?' Indeed, it is hard to tell what is taking up disk space simply by looking at installed apps and saved files in Windows Explorer. Luckily, Windows helps you make it out.

Go to Settings -> System -> Storage, you will see all drives listed there. You can select a drive to see what's taking up space.

Besides, you can even click each item to go deeper. For instance, you will be able to see how much disk space an app/game takes.

Right now, we show you how to clean hard drive in multiple solutions.

Fix #1: Delete Unnecessary Files

Here are two approaches for you to do this. The first one is to select and delete some files you no longer use manually. The second one is to make use of Storage Sense. Storage Sense was introduced in Windows 10 version 1703 to get rid of temporary files and stuff in your Recycle Bin. If you have Storage Sense turned on in Settings, Windows can automatically free disk space by removing files you don't need.

If your Storage Sense is still OFF, you can now make it work.

Step 1. Go to Start menu -> Settings -> System -> Storage. Toggle the option for 'Storage Sense' ON and click the option 'Change how we free up space'.

Step 2. In the next window, check what kind of temporary files to delete. You can also press 'Clean now' to free up disk space Windows 10 now.

Fix #2: Uninstall Apps You No Longer Need

If you have some programs installed for problem-solving and now they are no longer needed, you can go ahead and uninstall them to free up disk space. To do this, right-click Windows Start menu and click 'Programs and Features'. Then right click the program you no longer need and choose 'Uninstall'. Repeat this process to remove the rest unnecessary apps.

Fix #3: Run Disk Cleanup

Disk Cleanup is a built-in tool that deletes temporary and unimportant files. When your hard drive like C drive keeps filling up, you can go ahead and use Disk Cleanup to free disk space. Simple guide is shown below:

Step 1. Go to Explorer and navigate to 'This PC'. Then right-click the drive you want to clean up and choose 'Disk Cleanup' from the best match.

Step 2. After several minutes' calculation, you will be given a new interface listing files in total that can be cleaned as well as the file size taken by each file type. At this time, check the ones you don't want and click OK.

Free Up Memory On Computer

Tip: If you are freeing up disk space from the C drive, you can read Disk Cleanup Windows 10 to remove more system files such as the System Restore and Shadow Copies.

Fix #4: Disable Hibernation Mode

Hibernation in computing is to power down a computer while maintaining its state. If you have enabled Hibernation Mode in Windows, by changing the Folder Options to 'Show hidden files, folders and drives' and unchecking 'Hide protected operating system files (Recommended)', you will find a file named 'hiberfil.sys' located in the C drive, taking several gigabytes' storage space.

Free

To free up disk space taken by this file, you can open CMD and run this command:

Powercfg /hibernate off

By doing this, the 'hiberfil.sys' is deleted totally.

Free

Fix #5: Enable Compact OS

Compact OS is introduced with Windows 10. It decreases the operating system's size using the combination of compression and software tricks. It also reduces the footprint of Windows apps to free up disk space, making sense in Windows disk cleanup.

Free Up Memory

Enabling Compact OS is easy. However, since you are handling the operating system, it is significant to create a system image backup before you proceed.

Step 1. Search for Command Prompt and run it as Administrator.

Step 2. Type the following command to compress Windows 10 and applications and press Enter:

Compact.exe /CompactOS:always

Step 3. This process will take around 20 minutes. When it finishes, you get 2GB around disk space.

Tip: At any time you want to revert, you can run the contrary command instead: Compact.exe /CompactOS:never

Fix #6: Reduce the Size of WinSxS Folder

If your C drive keeps filling up, you can go to C:Windows to find a folder named 'WinSxS'. By viewing its properties, you will see it takes quite a lot of disk space (image attached).

The WinSXS folder contains all Windows system components and continues to grow with the time Windows installed. It also builds up unnecessary files like old versions of system components over time.

Now you may ask:

'Can we remove WinSxS folder for Windows disk cleanup?'

Note that you should not delete the entire WinSxS folder or delete some files from it, as this might severely damage your system, making your PC impossible to restart or update. However, you can do the followings to remove the unnecessary files.

Step 1. Go to Control Panel.

Step 2. Set to view by Category and select 'System and Security'.

Step 3. Select 'Schedule tasks' under Administrative Tools.

Step 4. In the left panel, select Task Scheduler Library -> Microsoft -> Windows -> Servicing.

Free Up Memory On Ipad

Step 5. In the middle panel, right-click 'StartComponentCleanup' and choose 'Run'.

After the above trying, if your hard drive space keeps disappearing, you may consider the rest workarounds.

Fix #7: Turn on OneDrive Files On-Demand

If your PC is running Windows 10 Fall Creators Update and higher version, you can free up disk space by turning on OneDrive Files On-Demand. With this feature enabled, you'll be able to get to your OneDrive files from your PC without having to download them all, thus, freeing up a lot of disk space.

Step 1. Click the OneDrive icon on the taskbar and log into your account.

Step 2. Right click the OneDrive icon and choose 'Settings'.

Step 3. Navigate to 'Settings' tab and make sure the option 'Save space and download files as you use them' is CHECKED.

Step 4. Open your OneDrive folder, select all the files and folders, bring up the context menu and choose 'Clear space'. In this way, all files are kept in the cloud, freeing up disk space Windows.

Tip: To free up more space, you can move some personal files from the default folders to your OneDrive folder and then repeat the above process. However, also note that by doing this, you are only able to access these files when there is network connection.

Fix #8: Move Files to another Location

If you have numbers of pictures, audios, videos and other large files saved on the drive, consider moving them to another location such as an external hard drive to free disk space.

Step 1. Open File Explorer, enter each partition and pick up the ones you want to move.

Step 2. After that, go to the Home tab on the ribbon, select Move to and then Choose location.

Step 3. Select your external hard drive from the location list and then select Move.

Free Up Memory On Pc

Fix #9: Save New Files to another Location

Instead of saving all your new files to the same location, save some of them to a different drive to free up disk space.

Air

Step 1. Open the Start menu and select Settings -> System -> Storage.

Step 2. Under More storage settings, select 'Change where new content is saved'.

Step 3. For each content type, select a drive to save new files from the drop-down menu.

Reading here, we hope you have resolved Windows disk cleanup. But if partition bar gets red from time to time, you still have the last choice…

Fix #10: Get a Larger Hard Drive

Hard drive upgrade is the most effective way to remove 'low disk space warning'. If you have the budget to purchase a larger hard drive, you can choose any of the following methods. And luckily, MiniTool Partition Wizard can help you all.

Before you start, download and install this free partition manager on computer.

Option A: Clone Disk

This way will copy the source disk entirely to the larger one, enabling you to extend each partition size at the same time

Step 1. Select the disk to be copied and choose 'Copy Disk' from the action panel.

Step 2. On the next interface, select the larger drive as the target disk. Note that all data on the target disk will be cleaned. Click 'Next' to continue.

Step 3. Choose the copy options depending on the basis of your preference. It is worth mentioning that no matter you choose 'Fit partitions to entire disk' or 'Copy Partitions without resize', you can resize each partition by dragging the slider on the lower part.

Note: 'Use GUID Partition Table' is a paid feature that helps to clone MBR disk to GPT disk. However, it is available in the Pro and more advanced editions. If you have such requirement, go to the Online Store.

Step 4. Here you will be told how to boot from the destination disk. Please keep this information in mind and click 'Finish'.

Step 5. Finally, click 'Apply' to save the changes.

Step 6. Remove the original system disk and boot from the larger hard drive.

Option B: Migrate OS Only

If you only want to move the operating system to a second drive, you can choose 'Migrate OS to SSD/HD'. This feature is able to clone the OS related partitions like System Reserved Partition, EFI System Partition, System Partition and Recovery Partition.

Step 1. Connect the hard drive to your PC and then run MiniTool Partition Wizard to get the main interface. Select 'Migrate OS to SSD/HD' from the toolbar.

Step 2. In the pop-up window, choose option B, i.e. 'I would like to move my operating system to another hard disk.'

Step 3. Select the target disk. All data on the target disk will be removed.

Step 4. Select the copy options and adjust the partition size.

Free

Step 5. Read the Note carefully and click 'Apply' to finish.

Step 6. When the OS is migrated, boot your PC from the larger drive and delete the operating system from the original hard drive.

For the details, please read How Can You Migrate Windows 10 to SSD without Reinstalling OS.

Option C: Copy Some Partitions

You can also choose to move some data partitions to another hard drive, which will free up disk space to the largest extent.

Step 1. Select the partition you want to copy and choose 'Copy Partition' from the left action panel.

Step 2. Select a location to create the copy of the target partition. Please note that only unallocated space can be selected. Click 'Next' to go on.

Step 3. Determine the partition size and location. To resize partition, drag the slider bar to shrink or extend. To move the location, drag the partition leftwards or rightwards. Then click 'Finish'.

Step 4. Click 'Apply' to start the copy.

Tip: Now you can delete the partitions that have been copied from the original disk and then make full use of the unallocated space to extend the rest partitions.

Now, It's Your Turn

Free Up Memory On Laptop

In this post, we show you 10 ways to free up disk space, and hope you never go to the last costly one. If you have come across other workarounds, please list the troubleshooting steps in the comment section below. If you have any questions towards using MiniTool software, you can contact us by sending an email to [email protected].