Azure: Visual Studio Code performance… and Chef

Today at work, I did a demo of Chef running on Azure. It went badly despite my rehearsal in the morning: Visual Studio Code, which I like when running on my laptop, seemed a nice lightweight choice as the editor. During the demo the server was clearly suffering, so much so I even struggled to bring up the Task Manager. I should at least mention the configuration. This is it:

VMSpec01 VMSpec02

So not mega-brilliant, but for the little it was being asked to do, quite reasonable I thought. And it has an (Azure) SSD. Check this out then: cpu effectively sitting at 100% just after I start VSC, and going back to idle just after I exit:

VisualCodeHog01

VisualCodeHog03

VisualCodeHog02

 

VisualCodeHog04

Wha??!!!

Also, this is on Windows Server 2016 evaluation as you see from the screenshot above. Now let’s see how VSC behaves on a VM (admittedly a desktop) ┬árunning Windows 8.1 Enterprise:

This is the setup:

Windows81Azure0 Windows81Azure1

I installed and started VSC… and it was very quick, and didn’t use any CPU, well:

 

Windows81Azure2

Here we see that although there are a number of instances, they are each at 1%, worst case. And the editor is entirely usable:

Windows81Azure4

Lesson for me: don’t use VSC on a Windows Server, or at least 2016. As a parting shot, let’s see if Brackets behaves OK on the 2016 server.

And that’s fine, defined as CPU goes up at the point of installation, and then goes back to idle, give or take:

Windows81Azure5

So I’ll run the .rb with this content, as per the Chef website…

powershell_script 'Install IIS' do
 code 'Add-WindowsFeature Web-Server'
 guard_interpreter :powershell_script
 not_if "(Get-WindowsFeature -Name Web-Server).Installed"
 end
service 'w3svc' do
 action [:enable, :start]
 end
file 'c:\inetpub\wwwroot\Default.htm' do
 content '<html>
 <body>
 <h1>hello world</h1>
 </body>
 </html>'
 end

Looking at the diagnostics in the output below, then we see that Install IIS, and the 2 w3svc commands, are skipped over, but the file does not exist, so Chef creates it, and confirms the content:

BracketsOk01

If I now point at the location of the created page:

helloworld01

Enough.