chefDK on windows painfully slow


#1

Running commands via powershell for chefDK on winddows7 x86-64, latest version (download today) is painfully slow.

Running the same chef commands on a cloud vm talking to the same chef-server or even local-mode stuff, is 10x faster.

any idea why that might be? laptop is plenty capable, but chefDK via powershell just crawls in its execution.


#2

Ruby is slower on Windows, but it shouldn’t be 10x slower.

Are you using the ChefDK Powershell that is added to the start menu, or are you opening powershell directly?

Have you watched the performance monitor to see if your disk, memory, or CPU bound?

What does Measure-Command { chef } in powershell return for time?


#3

What would you expect for that output? I was thinking sub-second, but it was 8.25
C:\Users\jmiller\Desktop> measure-command {chef}

Days : 0Hours : 0Minutes : 0Seconds : 8Milliseconds : 257Ticks : 82575679TotalDays : 9.55737025462963E-05TotalHours : 0.00229376886111111TotalMinutes : 0.137626131666667TotalSeconds : 8.2575679TotalMilliseconds : 8257.5679

btm Chef Software Staff
November 29 |

Ruby is slower on Windows, but it shouldn’t be 10x slower.

Are you using the ChefDK Powershell that is added to the start menu, or are you opening powershell directly?

Have you watched the performance monitor to see if your disk, memory, or CPU bound?

What does Measure-Command { chef } in powershell return for time?

Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.


#4

for good measure, i ran it two more times. both additional times it took over 12 seconds.
ouch!

btm Chef Software Staff
November 29 |

Ruby is slower on Windows, but it shouldn’t be 10x slower.

Are you using the ChefDK Powershell that is added to the start menu, or are you opening powershell directly?

Have you watched the performance monitor to see if your disk, memory, or CPU bound?

What does Measure-Command { chef } in powershell return for time?

Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.


#5

There must be some broader issue of Ruby on my windows PC. I tried to run a knife command and got no output and it never completed.
It was a simple bootstrap for a single trivial cookbook. It never produced any output and ran in the ChefDK Powershell window for more than 12 hours.
I launched another cloud vm configured the client, copied all the files from the windows chefDK to the cloud vm new workstation, and was able to run the same knife bootstrap back to the same node I was trying to bootstrap from the windows ChefDK.
If I was going to dig into why the knife command never gets any output to STDOUT and hangs forever, do you have any pointers on how might I do that? tracing a command in powershell? tracing ruby execution?

Job

btm Chef Software Staff
November 29 |

Ruby is slower on Windows, but it shouldn’t be 10x slower.

Are you using the ChefDK Powershell that is added to the start menu, or are you opening powershell directly?

Have you watched the performance monitor to see if your disk, memory, or CPU bound?

What does Measure-Command { chef } in powershell return for time?

Visit Topic or reply to this email to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, click here.


#6

One thing I would do is run the knife command with -VV to get debug output to see if anything is emitted before the hang. I’d also look to see if the ruby process is running at all if no output is generated still.


#7

-vv on Windows doesn’t seem to work. I can use --verbose or -V, but not the -vv (maximum verbosity), it doesn’t seem to understand that.
I’m a newbie to chef. my chef knife commands were using --attributes ipaddress, instead of the default of FQDN if you exclude it.
turning on verbose issued a warning showing me that because of the attribute i was passing to the knife ssh command (ipaddress), it was using the virtual cloud networks private IP in the SSH connection, causing a timeout. However, when I ran that same command in a cloud based workstation in the same virtual cloud network as the Chef Server and node, it didn’t have trouble resolving them.
It also seems that powershell though buffers all output to STDOUT. In other words, I don’t get any output to the screen, until the command finishes, at which point, I see everything it was doing during its run-time execution.
I’m sure I can figure out how to fix that.


#8

was -VV uppercase? I’ve definitely had success with that on windows in the past.


#9

The docs show it as lowercase: -VV

but -VV (uppercase) works


#10

There is definitely something amiss here and it isn’t buffering.
If I run a measure command on a knife node list command it take about 20 seconds.
A packet trace indicates that the actual request wasn’t issued to the chef server until after 18s
A single thread worth of CPU is consumed for those 18 seconds
This is also after a knife rehash, prior to that it was 48 seconds for the same command.

It is verging on unusable.

Terraform chef provider seems to be able to issue commands in rapid succession so it is all down to the ruby compile/interpretation or whatever it does. Replicated on numerous environments so it isn’t down to my build.

I am surprised there hasn’t been a revolt about this so I can only assume it doesn’t affect everybody…not sure where to go from here, I did do a procmon trace which I now can’t lay my hands on, no single thing jumped out at me but it did seem like it was doing the same thing over and over in a loop.


#11

@ken.gaul Since you are necro-ing a thread from a long while ago, it would help if you specified which version of ChefDK you are running and which version of Windows.


#12

Sorry.

ChefDK 13.6.4 on both win 7 and win 8.1