My system was slow so I fired up task manager to see what what going on . and it tells me that I’m using 31.8 gigs of my 32gigs of memory. so I switch over to details and in adding up everything there I can only get about 11gigs accounted for… where are the other 20 gigs hiding??
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Where is the memory going?
Home » Forums » AskWoody support » Windows » Windows 10 » Windows 10 version 22H2 » Where is the memory going?
- This topic has 11 replies, 5 voices, and was last updated 1 year, 8 months ago.
Viewing 6 reply threadsAuthorReplies-
Microfix
AskWoody MVP -
berniec
AskWoody PlusSeptember 2, 2023 at 12:43 pm #2584878Thanks — I figured out where the memory was going. My Virtualbox VDI had ballooned to 150. megs [and when I exited it all the mysterious missing memory came back].
My problem now is that I can’t fix it. I opened the Virtualbox manager and selected the VM, clicked on tools and it showed me the nasty vdi, and it clearly said “Virtual Size 150gigs” and and “actual size 48gigs” [which is exactly right — it is supposed to be a 50gig VM]. But when I try to shrink it with the “size” slider, it won’t let me get below 125 gigs. [and , indeed the size of the .vdi file is 50gigs]. I’m not sure why it won’t let me fully shrink it.
-
Mothy
AskWoody LoungerSeptember 2, 2023 at 1:17 pm #2584883The virtual size is what you set when the VM was initially created. I don’t think it can be changed. However the “actual size” of the VDI file can be compressed/shrunk, see the link below for more info.
https://www.virtualbox.org/manual/UserManual.html#vboxmanage-modifymedium
Edit: you will need to run Sdelete on the VM. It’s available from Microsoft here: https://learn.microsoft.com/en-us/sysinternals/downloads/sdelete
Below are steps I use to shrink the size of the VDI. Depending on the OS of your host system (ex. Windows or Linux) and the location of your VDI file you will need to adjust the command in step 6.
1. Clean up temp folders/files on VM
2. Run Disk Defrag on VM
3. On the VM, open command prompt as administrator, change directory to location of sdelete
4. Run command: sdelete.exe c: -z
5. Shut down VM
6. Open terminal (command prompt on Windows) and run: vboxmanage modifymedium disk “/home/user/VirtualBox VMs/Win8.1/Win8.1.vdi” –compact
-
-
Mothy
AskWoody LoungerSeptember 2, 2023 at 1:05 pm #2584880I’m using VirtualBox too for a Windows 8.1 VM although on Linux Mint. But in any case you should be able to adjust the amount of memory that the VM is allowed to use. Shut down the VM first then in VirtualBox Manager click on the name of VM then click settings. Under “System” there should be a slider for “Base memory” or a box to the far right to manually enter the amount.
-
berniec
AskWoody Plus -
berniec
AskWoody PlusSeptember 2, 2023 at 2:09 pm #2584886Thanks for pointing me at vboxmanage . I *think* what I want is “modifymedium”. \ What am I doing wrong. Here’s my VDI:
Directory of E:\Virtualbox VMs\win10
09/02/2023 12:15 PM <DIR> .
09/02/2023 12:15 PM <DIR> ..
09/01/2023 07:09 AM <DIR> Logs
08/28/2023 02:22 PM <DIR> Snapshots
09/02/2023 12:15 PM 6,845 Win 10.vbox
09/02/2023 12:15 PM 52,452,917,248 Win 10.vdiIt says it is 50 or so gigs, which is correct, but as I posted, it *thinks* it wants 150gigs. when I try to run it I do:
C:\Program Files\Oracle\VirtualBox>vboxmanage modifymedium –compact “e:\Virtualbox VMs\win10\win10.vdi”
VBoxManage.exe: error: Could not find file for the medium ‘E:\Virtualbox VMs\win10\win10.vdi’ (VERR_FILE_NOT_FOUND)
VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MediumWrap, interface IMedium, callee IUnknown
VBoxManage.exe: error: Context: “OpenMedium(Bstr(pszFilenameOrUuid).raw(), enmDevType, enmAccessMode, fForceNewUuidOnOpen, pMedium.asOutParam())” at line 191 of file VBoxManageDisk.cppso I don’t know what to do — that’s the correct path but it gets “not found”. and I also tried feeding it the .vbox file and it couldn’t find that, either….
-
Mothy
AskWoody LoungerSeptember 2, 2023 at 2:38 pm #2584888Looks like there is a space missing for the name of the vdi file (from looking at your screenshot above). So the command would be: vboxmanage modifymedium –compact “E:\Virtualbox VMs\win10\Win 10.vdi”
But keep in mind this command only shrinks the “actual size” of the VDI file and per my steps listed above, ONLY after cleaning up any unused files (ex. temp files), run disk defrag and then run sdelete on the VM to zero out that unused space.
From the VirtualBox website:
“–compact
Compresses disk images by removing blocks that contain only zeroes. This option shrinks a dynamically allocated image and reduces the physical size of the image without affecting the logical size of the virtual disk.
You can use this option for base images and for differencing images that are created as part of a snapshot.
Note: Before you compress the image, you must use a suitable software tool to zero out free space in the guest system. For example:
Windows guests. Run the sdelete -z command.
Linux guests. Use the zerofree utility, which supports ext2 and ext3 file systems.
Mac OS X guests. Use the diskutil secureErase freespace 0 / command.”
Otherwise the “virtual size” is from when the VM was initially created and I don’t think it can be changed without creating a new VM and setting it to what you want, then possibly cloning the existing VDI. But not sure on that as I have never done it so may be best to research the VirtualBox website and forums for more info on it.
However it sounded like the real issue you were having was high memory use. So not quite sure how shrinking the VDI size is going to help unless free space on the E: drive is getting low and it’s somehow affecting your host operating system as well. But usually the host OS such as Windows would be installed on the C: drive.
-
Sueska
AskWoody PlusSeptember 2, 2023 at 3:02 pm #2584894I agree with Mothy’s post.
You are coming to some wrong conclusions.
Your main concern was that you were using so much memory (ram) and could not see what was using it in task manager. Were you running task manager in the host OS or the virtual machine OS?
A right conclusion would be shutting down the virtualbox OS returns the memory used as seen in the host OS task manager. You did not say what your host OS was? I see from your screenshot that the virtualbox is Windows 10. If you are worried about using too much ram, look at how much system base memory (ram) you have assigned to your Win 10 virtualbox.
Note: The virtual disk size of the virtualbox is “not” related to the amount of ram memory used. You have your virtualbox dynamic disk set to 150.08 G and your current actual size is 48.85G. This does not mean that your disk usage ballooned to 150G. It only means your virtual machine can dynamically grow to 150G if needed. If you were getting low on space in the virtualbox OS, you would get a low on space error while running the Win 10 virtual machine.
Yes, you cannot easily shrink a virtual machine. There is a “non-trivial” procedure that must be followed. Google “How to Shrink a VirtualBox Virtual Machine” or “Resize a Virtual Box” to learn more. I would advise against trying changing this. I don’t think this is your problem.
-
-
-
berniec
AskWoody PlusSeptember 2, 2023 at 3:11 pm #2584895great catch — I didn’t see the missing space. Still didn’t work:
I tried to follow the direcdtions in the website and I got
C:\Program Files\Oracle\VirtualBox>vboxmanage modifyhd “e:\Virtualbox VMs\win10\win 10.vdi” –resize 25000
0%…
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Failed to resize medium
VBoxManage.exe: error: Shrinking is not yet supported for medium ‘E:\Virtualbox VMs\win10\Win 10.vdi’
VBoxManage.exe: error: Details: code VBOX_E_NOT_SUPPORTED (0x80bb0009), component MediumWrap, interface IMedium
VBoxManage.exe: error: Context: “enum RTEXITCODE __cdecl handleModifyMedium(struct HandlerArg *)” at line 816 of file VBoxManageDisk.cppWHy is shrinking not suppported??? I’m running 6.1.44r156814
-
Mothy
AskWoody LoungerSeptember 2, 2023 at 3:48 pm #2584900You were attempting to resize it instead of shrink it. The resize command can only expand/increase size not reduce it as stated on the VirtualBox website:
“–resize=size
Specifes the new capacity of an existing image in MB. You can use this option only to expand the capacity of an image. You cannot shrink the capacity of an image.”
But as Sueska mentioned above I think you’re confusing the size allocated to the VDI to the high memory use that caused the performance issues. They are not the same. So there really is no point in trying to shrink the size of the VM unless there are free space issues on the E: drive or you just want to clean up the VM and reduce its size. To be clear, even if you were to shrink the size it will only go down from the current actual size of 48.85 GB (from your screenshot above).
-
-
PKCano
ManagerSeptember 2, 2023 at 4:34 pm #2584901The VM is contained in a big file. When you create the VM, you set a maximum size for that file. Think of that as equivalent to the size of a HDD.
Windows is installed in that VM. It does not have to take up the entire space any more than it has to fill the entirety of a HDD.
Reducing the maximum size of the VM does not change the size of the installed OS. Nor does it mean that the VM takes up the entire maximum space at any given time. You can run Disk Cleanup, delete temporary files and caches, run Maintenance, etc. within the installed OS to reduce it’s size, but that does not reduce the maximum space dedicated to the VM.I use Parallels software for VMs on a Mac. When I create a VM, I designate a give amount of RAM for that VM, balancing it with the total amount of RAM on the host and the amount of RAM required for the host to operate effectively. The amount of RAM used by the VM should not exceed the amount assigned to it. It should not be able to run the host out of RAM, use all the host’s RAM.
One possibility would be that the VM is not closed (running multiple incidents), or the RAM it uses is not released when it does close. That might reduce the amount of total amount of RAM available to the host device, and on restart of the VM, it is again assigned it’s allotment of the RAM.
Suggestion: after using and closing the VM, restart the computer, which would clear the RAM. Restart the VM and see if the problem reoccurs.
1 user thanked author for this post.
Viewing 6 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
6 hours, 43 minutes ago -
Flash Drive Eject Error for Still In Use
by
J9438
8 hours, 16 minutes ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
1 day, 1 hour ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
1 day, 1 hour ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
5 hours, 15 minutes ago -
Migrate off MS365 to Apple Products
by
dmt_3904
6 hours, 4 minutes ago -
Login screen icon
by
CWBillow
1 hour, 14 minutes ago -
AI coming to everything
by
Susan Bradley
4 hours, 2 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
1 day, 17 hours ago -
No Screen TurnOff???
by
CWBillow
1 day, 17 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
1 day, 18 hours ago -
InfoStealer Malware Data Breach Exposed 184 Million Logins and Passwords
by
Alex5723
2 days, 5 hours ago -
How well does your browser block trackers?
by
n0ads
1 day, 16 hours ago -
You can’t handle me
by
Susan Bradley
16 hours, 2 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
1 day, 8 hours ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
2 days, 17 hours ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
1 day, 20 hours ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
2 days, 17 hours ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
2 days, 17 hours ago -
Lumma malware takedown
by
EyesOnWindows
2 days, 5 hours ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
3 days, 2 hours ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
3 days, 2 hours ago -
Meet Gemini in Chrome
by
Alex5723
3 days, 6 hours ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
3 days, 6 hours ago -
Trump signs Take It Down Act
by
Alex5723
3 days, 14 hours ago -
Do you have a maintenance window?
by
Susan Bradley
1 day, 19 hours ago -
Freshly discovered bug in OpenPGP.js undermines whole point of encrypted comms
by
Nibbled To Death By Ducks
2 days, 16 hours ago -
Cox Communications and Charter Communications to merge
by
not so anon
3 days, 17 hours ago -
Help with WD usb driver on Windows 11
by
Tex265
1 hour, 24 minutes ago -
hibernate activation
by
e_belmont
4 days, 2 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.