superstator
Contributor
Contributor

Visual Studio performance

I am trying to use Workstation Pro 15.5 to run Visual Studio 2019 in a windows guest, and the performance is pretty abysmal. It appears that hardware accelerated graphics is working fine for the OS, but Visual Studio is noticeably laggy and sluggish. Disabling 3d acceleration for VS improves things somewhat, but it's still crummy. As a rough kind of benchmark, I can open a code window on a native windows machine and scroll and see that it is fast and smooth, and CPU utilization is basically 0%. In the VM with 3d enabled it's very rough and stuttering, and CPU utilization is 30-40%. With 3d disabled in the VM it's less rough but still laggy, and CPU utilization is 20-25%. I've never received any errors, just poor performance.

Host:

HP Z4

i9 10980xe (18 core)

64gb ram

Quadro RTX 4000 (8gb)

Ubuntu 20.04 (5.4.0-42-generic)

Workstation 15.5.6 build-16341506

Guest:

Win10 2004

4 cores, 16gb ram, 2gb video ram allocated

VMware SVGA 3D driver 8.16.7.5

I've tried updating the NVidia driver to the latest (450), reinstalling VMWare Tools, I've swapped in different GPUs (an NVidia RTX 2080ti, and an AMD Radeon 5500xt), and I've tried various combinations of core counts, ram allocation, etc. Anything more than 4 cores seems to magnify the problem, but otherwise I haven't seen any change. FWIW, anything based on Chromium (Chrome, Atom, VSCode, etc) seems to have the same problem. Other Windows apps I've tried (eg, Paint 3d) run fine.

Is this a known issue with Workstation? Is there anything else I can do to troubleshoot it?

0 Kudos
19 Replies
superstator
Contributor
Contributor

Forgot to mention, I did try Win10 1903 as well. Chromium/Atom/VSCode are much better, but VS is still laggy and using excessive CPU to draw basic windows.

0 Kudos
wila
Leadership
Leadership

Hi,

Is this Full Screen or are you using Unity (FWIW, unity is much less performant)

Are you perhaps using the stretch option on your display settings?

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
superstator
Contributor
Contributor

I am running fullscreen, no scaling or stretching, no Unity. I don't even see a Unity option in the Workstation console.

0 Kudos
louyo
Virtuoso
Virtuoso

This isn't much help, but I don't see that here. I am running 2 W10 VM's, VS2019. One VM is winver 2004 and the other is  1909. I host with Mint, 20.0 with WS 15 and Mint 19.3 with WS14. One VM has graphics accelerated and the other doesn't. I see CPU running around 20-25%, maybe a little more if I connect the NIC.  Both VM's run on the same system, I have not fully moved to Mint 20, so dual boot.

Doesn't make any difference if full screen or not. System is an older one with Xeon E5-1605 (6 Core). Everything on SSD's (makes a big difference), I used to run striped RAID. Each VM has 5GB Ram and 2 cores.

Unity was removed from the Linux version of WS a couple of releases back, maybe when we went to 14. I think too many distro's had problems with it.

0 Kudos
superstator
Contributor
Contributor

What version of Visual Studio are you running?

0 Kudos
louyo
Virtuoso
Virtuoso

2019 Community.

0 Kudos
bluefirestorm
Virtuoso
Virtuoso

FWIW, anything based on Chromium (Chrome, Atom, VSCode, etc) seems to have the same problem.

Have you tried changing the GPU hardware acceleration settings at Chrome and VSCode level?

There is a slightly newer version of the SVGA driver (8.17.1.1) with VMware Tools 11.1.5

VMware Tools 11.1.5 Release Notes

0 Kudos
wila
Leadership
Leadership

Hi,

I'm not louyo, but since you seem to be looking for comparisons..

Similar config as louyo, VM has 2 cores, just 2GB of RAM, win10 2004 and running VS 2019 community as well.

My biggest difference however is that I'm using VMware Fusion ... so that makes it a lot harder to compare.

But VS 2019 is fast, not laggy at all and as you can see from the above the VM's configuration is pretty frugal and my MBP certainly does not have the horsepower that your workstation has, the NVMe disk however helps a lot.

For reference, I'm not just a VMware Fusion user, also use Workstation a lot, most of those are hosted on Linux, just like you.

Which is also why you don't have unity (seems I missed that your host is not Windows)

Other things to check:

- VM Snapshots, do you have any? Less is more in this case

- Where are you hosting your source? If it is on a VMware Shared folder, things will be slow

- Can you try a slightly lower screen resolution? (Just to see if it is a factor)

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
superstator
Contributor
Contributor

Yes, disabling hardware acceleration "fixes" Chrome and VSCode. For Chrome in particular it's pretty much mandatory; with hardware enabled just typing in the search bar will lag keypresses by several seconds. Pre-chromium versions of Edge run great.

Installed the new VMWare tools, and no difference in Visual Studio. Painful with hardware acceleration enabled, usable but pokey with it disabled. For those of you that aren't experiencing a problem, do you see any CPU utilization when you scroll a window?

0 Kudos
superstator
Contributor
Contributor

No snapshots, source is just in local git clones. The guts of VS seem to run fine (building, running, etc), it's just the UI that's horribly laggy. My impression is that while disabling hardware acceleration lets the UI run better, the extra CPU activity starts to bog other things down.

I did try running the same VM on a Windows host with similar specs (Threadripper vs i9, but same memory, ssd, and GPU), and it was the same deal. Likewise I have an older macbook with a fraction the horsepower, and it has always been able to run VS in Parallels without issues. This machine was meant to replace it...

Somebody else asked about screen resolution, and that doesn't seem to make a difference. Scaling down to 1024x768 I still see huge lag with hw enabled, and high CPU utilization with it disabled. Native resolution is 1920x1200, no huge 4k+ displays or anything.

0 Kudos
wila
Leadership
Leadership

Hi,

CPU utilisation is between 6 to 12% before scrolling and goes to about 22% with heavy scrolling.

3D is enabled.

--
Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
superstator
Contributor
Contributor

What happens if you go to Tools->Options and uncheck "Automatically adjust visual experience" and check "Enable rich client" and "Use hardware graphics"?

0 Kudos
wila
Leadership
Leadership

Hi,

CPU utilisation is a bit higher, about 8% to 10% at rest and up to 41% with heavy scrolling.

This is after checking both "Enable rich client" and "Use hardware graphics" plus a restart of VS so that it actually mentions that it is using hardware rendering.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
superstator
Contributor
Contributor

Are you using paravirtualization (Virtualize Intel VT-x/EPT etc in vm processors config)?

0 Kudos
wila
Leadership
Leadership

Nope. I have no need for that in this particular VM.

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
superstator
Contributor
Contributor

I think that's the problem. Disabling paravirtualization breaks WSL2, which breaks Docker, but suddenly Chromium and VS are much more responsive. Leaves me with a bit of a catch-22, since almost everything I work on anymore has a docker component to it. In theory I think I should be able to make the windows docker client talk to the linux docker daemon on the host, but I've never actually seen it done.

Hey VMWare, if you want a killer feature, how about a checkbox in Workstation that automatically exposes the host docker daemon to the guest? Even if paravirtualization worked smoothly it's a pretty inefficient way to get docker in a guest.

0 Kudos
wila
Leadership
Leadership

Hi,

I'm not a docker user, but perhaps you can use the containerd feature that ships with Workstation 16?

Announcing VMware Workstation 16 and Fusion 12 - VMware Workstation Zealot - VMware Blogs

There's a tech preview you can try to see if it works for you (that's assuming that the feature is also available on Linux)

--

Wil

| Author of Vimalin. The virtual machine Backup app for VMware Fusion, VMware Workstation and Player |
| More info at vimalin.com | Twitter @wilva
0 Kudos
Micke2nd
Contributor
Contributor

I can confirm the "noticeably laggy and sluggish" behavior with VST 2019 & VST 2022.

Especially when scrolling through designer windows the VM freezes for 1s, scrolls a few lines, 1s freeze, ...

 

Environment: Vmware Workstation 16, AMD 5950X (16 cores), Geforce 1080 TI

0 Kudos
Micke2nd
Contributor
Contributor

Solution:

Microsoft describes performance issues for Visual Studio here:

https://docs.microsoft.com/en-us/troubleshoot/visualstudio/general/performance-crash-issue

If I, as stated there, disable "Use hardware graphics acceleration", then the stuttering is gone. I have not yet checked what disadvantages this causes.

0 Kudos