Trying to optimise a VM, found behaviour I don't understand


  1. Posts : 1,767
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
       #1

    Trying to optimise a VM, found behaviour I don't understand


    I have VMs for each Win 10 version so I can test REG files and scripts. Each VM has 1 x dual-core CPU plus 4GB RAM assigned so aren't particularly speedy.

    This concerns a Win 10 Home 1803 VM that was running more slowly than usual and had been up-and-running for several days. Windows Update Blocker is in use so I knew it wasn't Windows updating itself.

    I opened Task Manager (which showed 100% CPU usage) and sorted by CPU usage. I spotted Microsoft Outlook Communications using 28% and traced it to:

    C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_17.9330.20915.0_x64__8wekyb3d8bbwe\HxTsr.exe

    Trying to optimise a VM, found behaviour I don't understand-vm-slowdown01.png

    A Google search (on another PC running alongside the host device) showed it to be part of the Outlook component of MS Office but I don't have MS Office installed at all... so I guess it's also included in another built-in Win 10 app. I looked back at the VM and saw that overall CPU usage had dropped to 78% but Microsoft Outlook Communications had risen to 43%.

    Trying to optimise a VM, found behaviour I don't understand-vm-slowdown02.png

    I ended the task and expected the overall CPU usage to plummet. It didn't. Instead the Geolocation Service began taking lots of CPU so I ended the task... and it disappeared from Task Manager.

    As I watched... it came back again... and did so every time I ended it. I opened the Services MMC and stopped it there... and disabled it for good measure.

    I couldn't believe my eyes when, even disabled, it tried to start itself again (and is still trying)!

    Trying to optimise a VM, found behaviour I don't understand-vm-slowdown03.png

    I swapped back to Task Manager and noticed sedlauncher running as a task. Now I really don't understand. Amongst other services I have Windows Remediation Service (and Windows Update Medic Service) disabled. (I had also previously uninstalled Update for Windows 10 for x64-based Systems (KB4023057).)

    Trying to optimise a VM, found behaviour I don't understand-vm-slowdown04.png

    AFAIK there should be no way that sedlauncher could be triggered. It's now obvious that un-installing KB4023057 did not remove the services nor sedlauncher (or any other of the contents of C:\Program Files\rempl). Anyway, I've gone into Task Scheduler and deleted the Microsoft > Windows > rempl folder and deleted C:\Program Files\rempl.

    Finally, in an elevated CMD console I deleted the Windows Remediation Service (sedsvc.exe).

    Task Manager is now showing a far more reasonable 27% which I would like to improve upon. However, the Geolocation Service is showing again. I checked in the Services MMC and yes, it's running... even though disabled!

    Trying to optimise a VM, found behaviour I don't understand-vm-slowdown05.png

    Questions:

    Q1. I don't understand why Windows is ignoring both the Privacy > Location setting (Off) in Settings and the Geolocation Service setting (Disabled) in Services MMC nor why the service runs so persistently. I've checked Task Scheduler and cannot see anything that would kick it off. Has anyone else experienced this?

    Q2. What could have caused Microsoft Outlook Communications to run and take so much CPU usage? I cannot find a scheduled task or service related to it (unless it was a background task... all of which I have now turned off). Could it be the OneSyncSvc which I notice is running... even though I'm using a local account and not a single one of the built-in apps like Mail, People, etc. (and Microsoft OneDrive Setup is disabled as a start-up app)?

    Q3. What, if anything, do others do to optimise their Win 10 VMs?

    Most of what I've seen here on TenForums advises to leave - for example - services well alone. Unfortunately my VM host - whilst well-specified in its day - is showing its age and I need to optimise its guests as much as possible. I'm used to waiting 5-10 mins for a Windows 10 VM to settle after being started but this VM has been up for days now.
      My Computer


  2. Posts : 31,660
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #2

    RickC said:
    ...I opened Task Manager (which showed 100% CPU usage) and sorted by CPU usage. I spotted Microsoft Outlook Communications using 28% and traced it to:

    C:\Program Files\WindowsApps\microsoft.windowscommunicationsapps_17.9330.20915.0_x64__8wekyb3d8bbwe\HxTsr.exe

    ....A Google search (on another PC running alongside the host device) showed it to be part of the Outlook component of MS Office but I don't have MS Office installed at all... so I guess it's also included in another built-in Win 10 app. I looked back at the VM and saw that overall CPU usage had dropped to 78% but Microsoft Outlook Communications had risen to 43%....
    According to this thread the Mail app also uses Microsoft Outlook Communications, and the OP said in last post on page 1 that...

    I was able to remedy my situation by removing all accounts from the Mail app and adding them again. I suspect that the Mail app was having trouble syncing my multiple Gmail accounts.
    https://answers.microsoft.com/en-us/...9-a60701cf4857


    And this post confirms that it is Mail that's using it.

    I went looking at the Windows app "Mail and Calendar" and clicked advanced options and saw among other things "terminate" this app and it's related processes and I did that and Microsoft Outlook Communications and HxTsr.exe disappeared from the task manager.
    Microsoft Outlook Communications Re: HxTsr.exe?
      My Computers


  3. Posts : 31,660
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #3

    RickC said:
    ... Each VM has 1 x dual-core CPU plus 4GB RAM assigned so aren't particularly speedy....

    ...What, if anything, do others do to optimise their Win 10 VMs?

    Nothing much, well not in the VM's OS anyway. Though, same as I do for my physical machines, I turn off all unnecessary apps in Privacy > Background apps.

    What are you using to run your VMs? Hyper-V? If so, I mostly leave mine on the defaults, which on my machine is 2 virtual CPUs (out of the 4 available) and dynamic RAM, though I do set the minimum RAM at 2GB. I find the biggest performance gain is from having their virtual disks on an SSD.

    More from Kari here: Hyper-V - Optimizing Virtual Machines
      My Computers


  4. Posts : 1,767
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
    Thread Starter
       #4

    I use a local account and don't use any of the built-in apps except Notepad... so have never had cause to use Mail.

    As a result I guess it's something that Windows checks for updates as it was originally set as a background app. (The reason I say that is because another app I have never used - Photos - also appeared as a running process.)

    Now I've disabled all the background apps from running automatically the VM is using approx. 4-5% CPU usage but with regular blips to 17-21% (almost like a heartbeat) as a result of WMI... so WMI is the next thing I need to look at.

    I've just used Geek Uninstaller to uninstall Mail (and other built-in apps) and rebooted.
      My Computer


  5. Posts : 1,767
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
    Thread Starter
       #5

    Bree said:
    What are you using to run your VMs? Hyper-V?
    VMWare Workstation 12. I had a deal with my previous manager... I provided the host machine, she paid for the software 'cos of the amount of work I did at home for free. Now I'm retired I can't justify the cost of upgrading either the software or the host again so it's a case of making do.
      My Computer


  6. Posts : 11,247
    Windows / Linux : Arch Linux
       #6

    Hi there

    @RickC

    1) Even a W10 X-64 pro will run quite happily when assigned 2GB RAM --there's not a 1:1 relationship between real and Virtual machine requirements as for RAM -- so long as there's sufficient to do the task.

    @Kari is better on the intricacies of HYPER-V but most modern VM software will dynamically allocate and release RAM as required so the allocation specified when you create your Virtual machine is the MINIMUM that will be reserved - even if it's doing nothing - so only allocate 2GB RAM for a Windows Guest - especially if running on a laptop with only 8GB RAM in it as total.

    2) The slowest part of any VM is usually the I/O subsystem - especially if you use things like the basic SCSI interface for the VM disk(s). So store the VM on an SSD and also when creating the Windows VM choose these if using VMWare (or equivalent if using other VM software) for the Guest's boot hard disk :

    Trying to optimise a VM, found behaviour I don't understand-vm1.png

    Trying to optimise a VM, found behaviour I don't understand-screenshot_20200706_142457.png

    If you can try and use passthru - i.e use real hardware - for example if you have a graphics card with more than one port assign one port to the VM. The less amount of "Paravirtualised" hardware you use the better the VM will perform as it will be using the Native Guest OS stuff.

    If there's a problem with Outlook or any particular piece of software running on the Guest - test it first on a real machine --in general unless software makes specific "naughty direct calls to physical RAM / hardware" without going via proper API's etc it should behave identically on a VM as on the HOST OS (if running say Windows on your Host).

    Personally I find the best performance I get out of VM's is to run them on a very basic Linux system (I'm using Arch Linux -- you only install what you need -- so there's minimal overhead in the host OS) and use the KVM/QEMU Hypervisor -- this allows passthru of almost every bit of hardware to the Guest so you can in theory get a Guest to runat about 95% of native performance. All free software - both the OS and the Virtualisation HYPERVISOR - easy to install and get running).

    Fedora also is a good host distro for running KVM but there's less choice over what gets installed when you install the OS -- could be good for beginners to start playing around with this though.

    Note also the Linux KVM Hypervisor will happily co-exist with VMWare (workstation or player) so you can run VM's created by VMWare and KVM concurrently. I've got a post in the Virtualisation section with an example screenshot.

    Windows VM V2V (Virt to Virt) conversion KVM to and from VMWare

    @mod -- I suggest this thread be moved to Virtualisation section though).

    Cheers
    jimbo
      My Computer


  7. Posts : 1,767
    Windows 10 Pro (+ Windows 10 Home VMs for testing)
    Thread Starter
       #7

    Many hours tinkering later and I now have the VM running at 2-5% overall CPU usage (with regular WMI Host 'heartbeats' of 10-13%, which I still haven't figured out why).

    Trying to optimise a VM, found behaviour I don't understand-vm-slowdown06a.png

    However:

    • The Geolocation Service has gone and not returned.
    • The Microsoft Outlook Communications process has gone and not returned. (Thank you, @Bree - it WAS Mail, even though I've never used it.)
    • The VM boots to a stable desktop much faster.
    • In use it is now very much more responsive - good to use instead of a chore.

    The main reasons for the performance boost were:

    • Turning off all background apps. This provided a fair boost but not enough.
    • Uninstalling all of the built-in apps I never use (using Geek Uninstaller). This provided another - smaller - boost... I assume because Win 10 no longer needs to check with the Store for updates to the apps. A side-effect was that I regained ~1GB storage space back again... so the snapshots load and save slightly faster. (I'm just defragging then compacting the VM at the moment... but already the VM has reduced from 5GB to 3.8GB.)
    • Disabling (and in some cases, deleting) services that I don't need for a test rig (especially the Windows Remediation Service). I don't know whether this was what affected shut-down speed but it now shuts down and/or suspends very much faster (even though I haven't yet optimised the VM's hard disk). Overall, the restart cycle to a stable desktop is now 2-3 times faster than it was before.

    After each change I rebooted and took occasional notes whilst I watched the incremental performance gains. I now have a much better idea what I need to do to the other Win 10 VMs. Now I have 'original' and 'heavily modified' snapshots of this VM I'm going to play around some more with the services but, in the meantime, I'm going to mark this thread as 'solved'.

    @jimbo45 - Thanks for your advice. The Host OS and VMWare Workstation itself is on an SSD but the Guest VMs are on a large capacity HDD. I'm going to have to wait patiently until Black Friday to see what bargains are available. Also, Workstation 12 only gives an option of SCSI for the virtual HDD. However, I've just checked and the upgrade price of Workstation 15 has dropped to £132... so I'm considering this as (very) early Xmas present to myself.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:26.
Find Us




Windows 10 Forums