Why did Windows guest get Slower after Adding RAM?

Discussions about using Windows guests in VirtualBox.
Post Reply
codeslayer2010
Posts: 9
Joined: 17. Apr 2017, 15:57

Why did Windows guest get Slower after Adding RAM?

Post by codeslayer2010 »

I have a host Windows 10 machine with 8 GB of RAM and a Windows 7 Ultimate guest which I allocated 4 GB to. It worked fine, no lags during normal usage. However, I noticed that I could not have even one instance of Google Chrome running on my host and have Win7Guest running at the same time. As long as I wasn't running chrome, things were usually fine. Also, when I tried to Run Photoshop and InDesign in the VM things got slower and began to hang in both guest and host. The VM always booted relatively quickly, or if Chrome was running it would just fail to boot.

I recently upgraded the RAM to 16 GB hoping that would solve these issues. However, after allocating 2GB more memory to the guest I have had unexpected results:
  • RAM 16 GB host, 4 GB guest -- no change in performance
  • RAM 16 GB host, 6 GB guest -- VM takes about 45-60 secs to boot, after boot it takes about 2 minutes to index my Downloads folder. Downloads has about 125 items in it. Launching Visual Studio Code takes about 20-30 extra seconds for the Markdown Preview extension to render the preview. Chrome in guest has a noticeable delay on launch and YouTube video lags a few seconds.
  • I can run Chrome on host alongside the guest VM just fine now, and I get the poor guest results whether Chrome is running or not
In a nutshell, after adding more memory, my guest VM slowed down and had poor performance compared to with less RAM.

I disabled large memory pages as advised by viewtopic.php?f=2&t=104086t using this command sequence:

Code: Select all

cd "C:\Program Files\Oracle\VirtualBox"
VBoxManage modifyvm "Win7Ult64_20220711" --largepages off
No change. I originally had only 1 CPU allocated, but I then tried allocating 3, which was well within the green safety range, but that also didn't help.

Does this strange behavior have to do with the RAM being a multiple of three? I ask this because in the past there were various numerical formula considerations a novice wouldn't necessarily know about such as if you had N MB of RAM you needed to have at least 4N MB of free space available on your hard drive for virtual memory. Also, at one point it was common (if not actually required) to have RAM chips in matched pairs. So you could have 2 4GB RAM DIMMS, but you would have issues if you tried one 8GB and one 2GB together.

What is causing my guest to lag after upgrading RAM?
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Why did Windows guest get Slower after Adding RAM?

Post by fth0 »

Ok, since you've already read the other thread, I'll try not to repeat its contents.

Please start the VM with the 4 GB provided, let it run for ~3 minutes, and shut it down from within the guest OS. Then start the VM with the 6 GB provided, let it run for ~3 minutes, and shut it down from within the guest OS. Provide a zip file containing VBox.log and VBox.log.1.
codeslayer2010
Posts: 9
Joined: 17. Apr 2017, 15:57

Re: Why did Windows guest get Slower after Adding RAM?

Post by codeslayer2010 »

Thanks for your reply. Here are the two logs you requested.
vbox_logs_20220714.zip
vbox logs 2022-07-14
(70.74 KiB) Downloaded 6 times
Something I didn't notice the first time: After changing to 6GB RAM the desktop icons had a lag of a few seconds (~7 seconds?) before they fully rendered.
fth0
Volunteer
Posts: 5668
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Why did Windows guest get Slower after Adding RAM?

Post by fth0 »

VBox.log.1 (4 GB) wrote:
00:00:08.746801 VMMDev: Guest Log: BIOS: Boot : bseqnr=3, bootseq=0002
00:00:34.293087 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000c1c0000 w=1920 h=1000 bpp=32 cbLine=0x1E00 flags=0x1 origin=0,0
00:01:19.503845 VMMDev: Guest Additions capability report: (0x1 -> 0x5) seamless: yes, hostWindowMapping: no, graphics: yes
VBox.log (6 GB) wrote:
00:00:08.545687 VMMDev: Guest Log: BIOS: Booting from Hard Disk...
00:00:36.741546 Display::i_handleDisplayResize: uScreenId=0 pvVRAM=000000000c920000 w=1920 h=1000 bpp=32 cbLine=0x1E00 flags=0x1 origin=0,0
00:01:23.456227 VMMDev: Guest Additions capability report: (0x1 -> 0x5) seamless: yes, hostWindowMapping: no, graphics: yes
I don't see any large differences here, and would attribute the small differences to Windows touching all its memory during its startup and thereby forcing VirtualBox to allocate it.
Post Reply