chef-boneyard/chef-dk

Windows - Slow Execution Time on ChefDK 3.7.23

bdwyertech opened this issue · 11 comments

Description

The time to execute for various Chef utilities takes an abnormally long time under ChefDK. It has almost doubled between 3.6.57 and 3.7.23

ChefDK Version

This was exacerbated by ChefDK 3.7.23

Platform Version

Windows 10 1809 ( i7 gen8, 32gb RAM, 512gb SSD)

Replication Case

3.7.23

measure-command { chef --version }


Days              : 0
Hours             : 0
Minutes           : 2
Seconds           : 51
Milliseconds      : 443
Ticks             : 1714434629
TotalDays         : 0.00198429933912037
TotalHours        : 0.0476231841388889
TotalMinutes      : 2.85739104833333
TotalSeconds      : 171.4434629
TotalMilliseconds : 171443.4629

3.6.57

measure-command { chef --version }


Days              : 0
Hours             : 0
Minutes           : 1
Seconds           : 40
Milliseconds      : 391
Ticks             : 1003912649
TotalDays         : 0.00116193593634259
TotalHours        : 0.0278864624722222
TotalMinutes      : 1.67318774833333
TotalSeconds      : 100.3912649
TotalMilliseconds : 100391.2649

3.7.23 (Windows Subsystem for Linux - Ubuntu 18.04)

# time chef --version                       
Chef Development Kit Version: 3.7.23                               
chef-client version: 14.10.9                                       
delivery version: master (64f556d5ebfd7bac2c0b3cc2c53669688b3ea4b5)
berks version: 7.0.7                                               
kitchen version: 1.24.0                                            
inspec version: 3.4.1                                              
                                                                   
real    0m15.922s                                                  
user    0m5.063s                                                   
sys     0m10.344s                                                  

3.6.57 (Windows Subsystem for Linux - Ubuntu 18.04)

# time chef --version
Chef Development Kit Version: 3.6.57
chef-client version: 14.8.12
delivery version: master (5fb4908da53579c9dcf4894d4acf94d2d9ee6475)
berks version: 7.0.7
kitchen version: 1.24.0
inspec version: 3.2.6

real    0m14.493s
user    0m5.281s
sys     0m8.734s

You should make sure you're picking up the binstubs with the pinning and not the embedded/bin/chef version of the chef binstubs.

Could you please clarify how people could do that @lamont-granquist ?

you need to be using /opt/chef/bin/chef or i think C:\opscode\chef\bin\chef and not the one with embedded somewhere in the path.

Still an issue with latest. Unrelated to PATH, its using the right one as shown above. Maybe a dep change did it, idk.

#1987 is likely the root cause with an unresolved bundler spec causing horrible rubygems perf issues.... rubygems/rubygems#2761

Thank you for chasing the rabbit @lamont-granquist

Yeah this was triggered, although not necessarily caused, by bundler now being baked into ruby and duplicate bundler versions being shipped in omnibus, combined with appbundler "feature" I added almost 3 years ago in chef/appbundler@f01aea0 to omit pinning bundler.

tas50 commented

@bdwyertech The double bundler issue has been resolved in DK 4 so you should see a bit of an improvement there. Lamont is continuing to work on improving our Ruby performance overall with a focus on the Windows side of things.

tas50 commented

3.10:

Screen Shot 2019-05-29 at 1 32 36 PM

4.0 with bundler fixes:

Screen Shot 2019-05-29 at 3 14 00 PM

I've run the "current" channel for a week prior to the stable release and performance is night and day. Drastic performance improvement over 3.6.57 as well.

Thank you very much! @lamont-granquist @tas50

lock commented

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.