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??
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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, 9 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
-
My Simple Word 2010 Macro Is Not Working (Awaiting moderation)
by
mbennett555
7 hours, 8 minutes ago -
Office gets current release
by
Susan Bradley
11 hours, 51 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
1 day, 4 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
12 hours, 55 minutes ago -
Stop the OneDrive defaults
by
CWBillow
1 day, 5 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
1 day, 15 hours ago -
X Suspends Encrypted DMs
by
Alex5723
1 day, 17 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
1 day, 17 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
1 day, 18 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
1 day, 18 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
1 day, 7 hours ago -
Enabling Secureboot
by
ITguy
1 day, 14 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
2 days, 2 hours ago -
No more rounded corners??
by
CWBillow
1 day, 22 hours ago -
Android 15 and IPV6
by
Win7and10
1 day, 12 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
2 days, 15 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
2 days, 17 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
2 days, 12 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
3 days, 1 hour ago -
May preview updates
by
Susan Bradley
2 days, 12 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
2 days, 4 hours ago -
Just got this pop-up page while browsing
by
Alex5723
2 days, 17 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
2 days, 14 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
1 day, 16 hours ago -
At last – installation of 24H2
by
Botswana12
3 days, 16 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
14 hours, 24 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
4 days, 4 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
2 days, 3 hours ago -
Limited account permission error related to Windows Update
by
gtd12345
4 days, 18 hours ago -
Another test post
by
gtd12345
4 days, 18 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.