Free Up Virtual Memory Mac

Quick Navigation :

Your Mac comes with a set amount of physical memory applications can use. Your running programs, open files, and other data your Mac is actively working with. Mac Virtual Memory – What it is. On restart the free space jumps back up to 160GB free but can drop to 100 in a matter of hours with almost nothing running.

Virtual memory is a memory management technique that is implemented by using both hardware and software. It makes the application think it has a contiguous and available storage space or address space. However, in fact, virtual memory usually is divided into several physical memory fragments, and some of them are stored on the external disk storage which can be used to exchange data when needed. Currently, most operating systems use virtual memory, like the Windows family's “virtual memory”, or the Linux “swap space”.

Free Up Virtual Memory Mac

If you find the Windows 8/8.1 operating system gets stuck in the Windows logo page when starting it and you are unable to enter the system, you have to force shutdown and then restart it. After that, you can adjust the virtual memory to fix this problem.

Recommend: Want to know more information about operating system stuck in Windows Logo? Here, I guess you might be interested in this post: How Do You Fix 'Window 10 Stuck on Loading Screen' Issue.

Introduction

Computers need memory (it is a temporary storage area which holds the data and instructions that the CPU needs) to execute all programs. Thus, the more programs memory holds, the less free space memory has. Therefore, Windows operating systems like adopting the virtual memory technology to increase computer's memory capability.

This technology will leave a part of hard disk space to act as memory. If the system is low on memory, the virtual memory will play its full part. Virtual memory combines your computer's RAM with temporary space on your hard disk. When RAM runs low, virtual memory helps to move data from RAM to a space called a paging file. Moving data to paging file can free up the RAM so your computer can complete its work.

In general, the more RAM your computer has, the faster the programs run. If the computer is running pretty slow since there is little free space on the RAM, you can increase virtual memory to fix the problem. However, your computer can read data from RAM much more quickly than from a hard disk. So increasing the capacity of RAM is a better solution.

Virtual memory is, in fact, a giant file called PageFile.Sys, which is invisible in most cases. To see the file, you need to open the Explorer and then close the system file protection function. Therefore, virtual memory sometimes is also known as “page file”.

Recommend: You should not delete the Page Files. Read this post: Solutions to Deleting Drive C, EFI System Volume, Recovery/OEM Volume, etc to find more details.

Memory will play a big role during the process of running computer because computer needs it to execute all programs. Thus, Windows would like to use virtual memory to improve computer's memory. Virtual memory exists in the PAGEFILE.SYS file.

Reasonable Setting

How to verify the size of virtual memory?

Novice to Virtual Memory

Since Linux needs complicated commands, we take Windows 10 for example to show how to set virtual memory.

1: Open 'File Explorer', right click 'This PC', and select 'Properties'.

2: Select 'Advanced system settings' in the pop-up window.

3: In the 'System Properties' window, click 'Advanced' tab, and then click 'Settings' under 'Performance'.

4: In the 'Performance Options' window, click 'Advanced' tab, and then click 'Change' under 'Virtual memory'.

5: In the 'Virtual Memory' window, uncheck 'Automatically manage paging file size for all drives' and then choose a relatively free space to store the Pagefile.sys file.

6: Check 'Custom size' and then type a new size in megabytes in the Initial size (MB) or Maximum size (MB) box. Here, the recommended size is equivalent to 1.5 -3 times the amount of RAM on your system.

7: Click “Set”, and then click “OK”.

Veteran to Virtual Memory

In fact, setting virtual memory size strictly according to the 1.5 to 3 times multiple relationships is not science. We had better set it according to actual needs. In the process of setting virtual memory size, you may turn to the Windows built-in performance monitor (taking Windows 10 as an example).

1: Press 'Windows + R' keys to call out 'Run' box, type 'perfmon.msc', and press 'Enter'.

2: In 'Performance Monitor' window, expand 'Data Collector Sets', right-click on 'User Defined', and choose 'New' > 'Data Collector Set'.

3: In the new window, type a name ('paging file' as an example), check 'Create manually (Advanced)', and click 'Next'.

4: Check 'Performance counter' under 'Create data logs' section and click 'Next'.

5: Click 'Add' button to add counters. In the upper left box, find and expand 'Paging File'. Highlight items under it, highlight 'Total' in the lower left box, and then click 'Add>>' button to add the two counters into the right box one by one. Then, click 'OK' button.

6: Please change 'Sample interval' to a proper number, according to your need. Then, click 'Next'.

7: Choose where you like the data to be saved. Then, click 'Next'.

8: Make sure that 'Save and close' option is checked and then click 'Finish'.

9: Expand 'User Defined' under 'Data Collector Sets' and you will find the new data collector set you created just now. Right-click on it and choose 'Start'.

10: Make your daily operation on computer, and run all different applications and games that you use frequently. After using it for a few hours, the new data collector set can make a basic and complete assessment of your usage.

11: At this time, right-click on the paging file data collector set and choose 'Stop'. Then, go to 'Reports' > 'User Defined' > 'paging file'. Under 'paging file', there is a report about virtual memory usage. Click this report to view it.

12: What you should note here is that the value in the report refers to the percentage of the paging file amount in use. That is to say, according to report, you will find that although system leaves 2GB paging file, only 25% paging file will be used. Therefore, the maximum size of the paging file is set to 512MB to save free space.

Tip: Windows built-in tool 'System Information' will tell you Total Physical Memory and Total Virtual Memory on the PC. You can open this tool from Windows search box.

Related Information

The Location of Virtual Memory

It's also important to notice that you had better put the paging file on the drive which does not contain operating system or applications if you have more than one disk. Keeping applications and paging files on different disks not only can minimize the usage of disk but also can improve the efficiency of disk. However, if you have only one disk and you put the paging files on a different volume in the same disk, it will not improve the efficiency of disk.

Virtual Memory Paging File and Disk Fragmentation

Virtual memory combines your computer's RAM with temporary space on your hard disk. The hard disk may contain Disk Fragmentation since its files are written in a non-sequential way. Therefore, if the paging file or the virtual memory partition is patchy, the disk seeking time may be increased but disk performance may be decreased.

Some people think that there will be disk fragments if Windows frequently read the pagefile.sys file. Actually, it's not. Once pagefile.sys is created, its distribution type in the partition will be fixed. Reading and writing file will not influence the size of pagefile.sys file. However, the system will create temppf.sys after running out of the pagefile.sys, which will result in disk fragmentation. In Linux operating system, if you divide a separate partition to act as the memory, you can basically eliminate the effects brought by disk fragmentation.

Different Ways for Fixing “Tool Little Virtual Memory”

In general, Windows XP uses the free space of C drive to act as the virtual memory by default. Thus, the larger free space the C drive has, the faster the system runs. Virtual memory will change dynamically as you use the C drive. Therefore, the C drive is easy to generate disk fragmentation to affect system operation speed. So well, you had better set another volume like D: as the virtual memory.

Steps to Check the Location of Virtual Memory

Here, we take Windows XP for example. Right-click “My Computer” icon and choose “Properties” from the bottom. From the System box, click “Advanced System Settings”, and then view “Advanced” tab, and click “Settings” under Performance. In the Performance Options box, select the “Advanced” tab, and click “Change” button under Virtual memory. After that, you can see the Virtual Memory dialog box.

As a matter of fact, you had better set a fixed value for the virtual memory to avoid disk fragmentation. And the specific values depend on your physical memory size. And it is 1.5 times to 3 times the size of physical memory. For instance, if you have 512MB memory, you can set 256-768MB virtual memory (the total size of RAM and virtual memory is generally above 256MB). If your memory size is over 2GB, you need no virtual memory.

But, in some special situations, you also need the virtual memory. For instance, your system is low on memory when playing large 3D games and making large pictures, you can consider setting virtual memory. Setting method as follows:

Let us suppose that you have 256M memory and you want to set D drive as the virtual memory. At this time, you should remove the default virtual memory (C drive) at first, and leave the C drive selected. Next, choose the “No paging files (N)” and click the “Set” button to remove the C drive virtual memory. After that, select the D drive, and click “Customer Size”. And then, type 512 in the following “Initial Size” and “Maximize size” box and click “Set” button. Finally, click “OK” button. Now, the system will be restarted to make this change take effect.

Setting Method

Manual Setting

Here, we take Windows XP for example to show how to set the virtual memory.

1: Right-click “My Computer” icon and choose “Properties” from the bottom.

2: From the System box, click “Advanced System Settings”, and then view “Advanced” tab, and click “Settings” under Performance.

3: In the Performance Options box, select the “Advanced” tab, and click “Change” button under Virtual memory.

4: Choose a suitable drive, and check the “Customer size”, and then write the accurate values in the “Initial Size” and “Maximize size” box. Next, click “Set” and “OK”. After that, restart the computer. After restarting, all work has been done.

Adjust the Pagination Location

The Win386.swp file (swap file) is saved in the root directory C. In fact, the Win386.swp file can be stored in any partition. If the system volume C doesn't have enough free space, you can store it on another partition. However, how to complete this task? Firstly, you should open the System.ini file (under the C: Windows) via the Notepad. Then, in the [386Enh] section, change the location of Win386.swp file. For instance, you can change “Paging Drive= C: WindowsWin386.swp” to “Paging Drive= D: WindowsWin386.swp”.

Windows 2000/XP users can click “Control Panel-System-Advanced-performance”, and then click “Settings-Advanced-Change” to open the virtual memory dialog-box. At this time, if you want to store the Win386.swp file on another partition, you have to remove the paging file from the original partition, and then choose the desired partition you need. (By default, the system partition contains paging file.)

Windows XP requires 256 MB physical memory at least. If you like paying large 3D games but your Windows XP system is low on memory, don't panic since the system will automatically adjust virtual memory size.

Note: You can set 2MB virtual memory at least, but its maximum size cannot exceed the current remaining hard disk space and cannot exceed the 32-bit operating system's addressing range (4GB).

Disable Paging Executive

If your RAM is larger than 1GB, you don't have to use paging file. And you can disable it. Steps: click “Start” and choose “Run”, and then type “Regedit”. Next, choose “HKEY-LOCAL-MACHINESYSTEMCurrentControlSetControlSessionManagerMemoryManagement”. Now, select the “Disable Paging Executive” and type 1 in its value data.

Note: This way may cause system instability. And some programs can not run. Therefore, please change it according to the actual situations.

If your RAM is larger than 4GB, virtual memory will make very little impact. If you don't receive the insufficient memory warning in the daily use, you can rest easy.

Clear Page File

At the same place, you can see a “ClearPageFileAtShutdown” choice. Here, the “Clear” refers to “clean” and arrange the pagefile.sys file instead of completely removing it. Microsoft notes that this is a safe option and it will not influence the performance.

Advanced topics: Windows 2000/XP/2003 users can turn to SweepRAM (a memory optimization program) to free some unused RAM since this free application aims to empty all processes working sets. Working set is a concept in computer science which defines the amount of memory that a process requires in a given time interval. When a process is running, Windows will automatically adjust working set.

To be specific, the frequently visited page will be leaved in the memory, and other pages may be removed from the working set and temporarily stored in the memory “Conversion list” since there is no more free space. When the application accesses a page again, operating system will automatically add these removed pages into the working set.

SweepRAM is a piece of little freeware that will very quickly free some unused RAM, which can help to improve system performance.

Shutdown Helps to Clear Virtual Memory Pagefile

1: Click “Start” and choose “Run”, and then type “gpedit.msc”.

2: In the Local Group Policy Editor, choose “Computer Configuration - Windows Settings - Security Setting - Local Policies-Security Options - Shutdown: Clear virtual memory pagefile”.

3: Right-click the “Properties” and click “Enabled” and click “OK”.

If there is no local group policy editor, you can try another approach. As follows:

1: Click Win & R, and then type “regedit” to open the Registry Editor.

2:Choose“HKEY-LOCAL-MACHINESYSTEMCurrentControlSetControlSessionManagerMemoryManagement”. And then, double click the “ClearPageFileAtShutdown”.

3: In the Edit DWORD Value dialog box, type 1 in the Value data, and then click “OK” button.

4: Restart the computer to make this change take effect.

The Spinning Wheel on Mac

The Spinning Wheel on Mac computers is a variant of the regular arrow cursor that’s shaped like a rainbow-colored circle that spins. The default arrow cursor transforms into the spinning wheel on Mac machines when the computer is stuck trying to load something

The dreaded spinning wheel on Mac computers is basically your Mac’s way of telling you that the system is taking longer than normal to load something and that there might be some kind of problem with it. Typically, you would only see the wheel for a second or two until your Mac solves the issue and goes back to normal. In such cases, there’s usually no need to do anything about it.

However, if the spinning wheel keeps appearing and/or if it stays on your screen for a longer period of time, then this might indicate that there’s a more serious problem with the computer that requires your attention. If the wheel stays on the screen for a while and doesn’t go away on its own, it’s likely that one or more of the apps that are currently open have frozen and become unresponsive.

Oftentimes, the fix to this issue is trivial and involves reducing the current workload of the machine. In other instances, however, especially if you keep seeing the wheel appear on your screen, there could be an issue that’s more difficult to fix. In the lines below, we will try to go over the main causes for the Spinning Wheel of Death (this is how most users refer to it) to keep replacing your regular cursor and what actions you can perform to alleviate or fully resolve the problem.

Possible reasons for the Spinning Wheel to show up on your Mac

A problem with a particular app

This is one of the most typical causes of this problem. Oftentimes, a single app that has experienced an error could be the reason for the spinning wheel’s appearance. In such cases, simply restarting or force-quitting the app should get the job done. If the app in question keeps triggering this problem in the future, you can try reinstalling it or simply not using it anymore.

Insufficient RAM (virtual memory)

If you are running too many things at once, your Mac may run out of virtual memory, causing it to put one or more of the currently running apps on hold until some memory gets freed up.

Insufficient processing power

Another thing that could be happening that may be the reason for the spinning wheel’s appearance is if your Mac’s processing unit is overwhelmed and cannot handle all currently active tasks at the same time. Unlike the previous possible cause – the lack of sufficient RAM – if your Mac runs out of processing power, you will likely notice that the whole computer has become unresponsive and not only one or more of the currently open apps.

Free Up Memory On Mac

Insufficient storage space

If your Mac’s hard drive is nearly full, this could trigger a number of issues with the computer, including the frequent and prolonged appearance of the spinning wheel. If the problem doesn’t seem to originate from any of the aforementioned situations, then you should probably see how much free storage space there is on your Mac and delete some stuff to free up some space.

How to stop the Spinning Wheel on Mac?

To stop the Spinning Wheel on Mac, you can try quitting the apps that are currently non-responsive and maybe uninstall them. What may also help you to stop the Spinning Wheel on Mac is resetting Mac’s NVRAM and/or freeing up some storage space.

Free Up Virtual Memory Macbook

Quitting the problematic app

If when the wheel appears, only one of your apps has become unresponsive and has frozen, then the problem is likely limited to that particular app, and quitting it should bring things back to normal.

If you have many apps open at once and are not sure which one is triggering the problem, go to Finder > Applications > Utilities, start the Activity Monitor – note that your mouse cursor should still be working normally, although it has been changed into the spinning wheel. When you open the Activity Monitor app, click CPU to see which of the processes are the most CPU-hungry ones. If there’s a process that seems to be using way more CPU power than normal and/or if there’s a “(Not responding)” note written next to the name of a given process, this means that this process (the app it represents) is where the problem lies.

Once you’ve figured out which one of the apps is being problematic, give it a couple more minutes to see if the issue gets resolved on its own and if it doesn’t, it’s time to quit it. Note that force-quitting a given app will likely cause any unsaved work on that app to be lost. For this reason, we suggest you first try to quit it normally by right-clicking its icon in the Dock and selecting Quit. If this doesn’t work and the app is still unresponsive and doesn’t close, then right-click the app’s icon in the Dock again, hold down the Option key, and when the Force Quit option appears, select it and confirm the action.

If, when you start the app again, it ends up triggering the spinning wheel again, you should probably uninstall that app by dragging it to the Trash and emptying the Trash. After that, you can install it again – a fresh install of the app may no longer bring the same problem. If you reinstall the app, and it continues to be problematic, it’s simply best to delete it for good and not use it anymore.

Freeing up virtual memory and resetting NVRAM/PRAM

If there are many apps running at the same time on your Mac, this could quickly deplete your Mac’s virtual memory (RAM), causing some of the apps to become unresponsive until there’s enough free memory for the system to handle them. You can check which apps are using the highest amounts of RAM through the Activity Monitor, by selecting Memory from the top. Go there and see which of the apps are consuming the biggest amounts of RAM and quit them (first, try to quit them normally and if this doesn’t work, perform a force quit, as we showed above).

Another thing that could help is resetting the NVRAM of your Mac – NVRAM is a small amount of virtual memory dedicated to a specific system and app settings. Resetting is a common troubleshooting method for virtual memory-related issues that are causing the Mac to misbehave. You can find out how to reset the NVRAM of your Mac by following the linked guide.

Restarting your Mac

If your entire Mac has frozen, this may be due to an overwhelmed CPU. If you can, try quitting some apps as we showed you above, but if your Mac is totally unresponsive, then it may be a good idea to restart it. Still, wait a couple of minutes before doing that to see if the problem goes away on its own, especially if you have any unsaved work on the computer.

The default way to restart your Mac is through the Apple Logo menu, but if even the menu is unresponsive and can’t be opened, then you will have to press and hold down Mac’s power button to shut down the computer. After that, wait for about a minute and start the Mac again to see if the problem is now gone.

Freeing up storage space

It’s possible that the problem with the spinning wheel is due to too little free space on your Mac. To check how much free storage space there is on the computer, go to Apple Menu > About this Mac > Storage.

There you will see how much space each file category is taking up on your Mac and how much free space there’s left on the Mac. If the free space bar (the empty one) is small (less than 10-15% of the entire bar), then you may need to find a way to free up some space, as this may be the problem behind the spinning wheel cursor.

The Storage page of your Mac also shows which type of data is taking up the most space on your Mac – this can help you figure out what may need to be deleted. For instance, if the photos segment on the storage bar is very big, it may be a good idea to delete some photos to free up storage space. If you don’t want to permanently lose any data, you can always save it on an external drive, a flash memory stick, or simply upload it to a cloud service and then delete it from the computer.

If nothing helps

Mac Virtual Memory Setting

If none of the suggestions thus far have helped you resolve the spinning wheel issue on your Mac and the wheel keeps showing up, then there may be a more serious underlying problem that may require professional help. For example, it’s possible that there’s a hardware problem with your Mac’s RAM sticks or processing unit. In such cases, it may be best to take your Mac to a certified specialist who can determine the exact cause of the problem and hopefully fix it.