Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

paket install slow #2823

Closed
TheAngryByrd opened this issue Oct 4, 2017 · 37 comments
Closed

paket install slow #2823

TheAngryByrd opened this issue Oct 4, 2017 · 37 comments

Comments

@TheAngryByrd
Copy link
Contributor

Description

paket install seems to take a long time with dotnet core projects. On my machine this repo took over 10 minutes. Maybe my ssd is dying, maybe my internet is throttled?

Paket version 5.108.0
...
Performance:
 - Resolver: 10 minutes, 28 seconds (2 runs)
    - Runtime: 10 minutes, 23 seconds
    - Blocked (retrieving package details): 891 milliseconds (21 times)
    - Blocked (retrieving package versions): 4 seconds (6 times)
    - Not Blocked (retrieving package details): 174 times
    - Not Blocked (retrieving package versions): 189 times
 - Disk IO: 450 milliseconds
 - Average Download Time: 2 seconds
 - Number of downloads: 1
 - Average Request Time: 159 milliseconds
 - Number of Requests: 212
 - Runtime: 10 minutes, 38 seconds

Repro steps

https://github.com/TheAngryByrd/paket-install-slow

Expected behavior

[Insert Sonic]

Actual behavior

[Insert not Sonic]

Known workarounds

Obtain a hobby between calls to install

Other

Mono JIT compiler version 5.2.0.215 (d15-3/da80840 Thu Jul 20 16:43:07 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	LLVM:          yes(3.6.0svn-mono-master/8b1520c)
	GC:            sgen (concurrent by default)
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
@sandeepc24
Copy link

I have this issue on Windows 10. I avoid upgrading my packages but when I have to add a new package to my project it takes a long time as for some reason I see all projects listed in console.

@forki
Copy link
Member

forki commented Oct 4, 2017 via email

@sandeepc24
Copy link

If I create a new project and download packages using nuget it is much quicker than converting the new project to use paket and then to download the packages.

@MadelineRitchie
Copy link
Contributor

I reproduced the issue as well

 - src/paket-slow/paket.references -> src/paket-slow/paket-slow.fsproj
 - tests/paket-slow.Tests/paket.references -> tests/paket-slow.Tests/paket-slow.Tests.fsproj
Performance:
 - Resolver: 12 minutes, 17 seconds (2 runs)
    - Runtime: 11 minutes, 41 seconds
    - Blocked (retrieving package details): 19 seconds (49 times)
    - Blocked (retrieving package versions): 16 seconds (5 times)
    - Not Blocked (retrieving package details): 146 times
    - Not Blocked (retrieving package versions): 190 times
 - Disk IO: 4 seconds
 - Average Download Time: 14 seconds
 - Number of downloads: 66
 - Average Request Time: 406 milliseconds
 - Number of Requests: 648
 - Runtime: 12 minutes, 50 seconds

Deets

Mono JIT compiler version 5.0.1.1 (2017-02/5077205 Wed May 31 14:47:04 BST 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen (concurrent by default)


.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.12
 OS Platform: Darwin
 RID:         osx.10.12-x64
 Base Path:   /usr/local/share/dotnet/sdk/2.0.0/

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d



@forki
Copy link
Member

forki commented Oct 5, 2017

first install: 5min
second update: 4:32 (all packages already downloaded)

@matthid something is seriously weird. It "hangs" for a while at some runtime packages

@matthid
Copy link
Member

matthid commented Oct 5, 2017

I cannot take a look the next couple of days. maybe I broke something with my perf changes. Only a profiler will tell

@forki
Copy link
Member

forki commented Oct 5, 2017

don't even know where to start here

@forki
Copy link
Member

forki commented Oct 5, 2017

ok @matthid just told me that he has an idea and wants to investigate that during the weekend

@matthid
Copy link
Member

matthid commented Oct 5, 2017

Profiler says the problem might be that simplify is too expensive.
I think there was a bug where simplify was not doing the expected thing in every case which was fixed previously. That might have been the cause of #2364.

I think the "fix" is to only do simplify on import and when writing the lockfile or even better after the resolution.

@TheAngryByrd
Copy link
Contributor Author

For reference:

Paket version 5.101.0
Performance:
 - Resolver: 8 minutes, 32 seconds (2 runs)
    - Runtime: 8 minutes, 21 seconds
    - Blocked (retrieving package details): 1 second (32 times)
    - Blocked (retrieving package versions): 8 seconds (4 times)
    - Not Blocked (retrieving package details): 163 times
    - Not Blocked (retrieving package versions): 191 times
 - Disk IO: 2 seconds
 - Average Request Time: 227 milliseconds
 - Number of Requests: 212
 - Runtime: 8 minutes, 42 seconds

Paket version 5.100.2
Performance:
 - Resolver: 2 minutes, 36 seconds (2 runs)
    - Runtime: 2 minutes, 25 seconds
    - Blocked (retrieving package details): 3 seconds (57 times)
    - Blocked (retrieving package versions): 8 seconds (9 times)
    - Not Blocked (retrieving package details): 138 times
    - Not Blocked (retrieving package versions): 186 times
 - Disk IO: 688 milliseconds
 - Average Request Time: 223 milliseconds
 - Number of Requests: 212
 - Runtime: 2 minutes, 55 seconds

@matthid
Copy link
Member

matthid commented Oct 5, 2017

@TheAngryByrd Thanks, yes that agrees with my quick findings with the profiler :)

@zaaack
Copy link

zaaack commented Oct 12, 2017

Hit this problem, too. I need to waiting for 17minute with an install.

@forki
Copy link
Member

forki commented Oct 13, 2017

@zaaack so you have the deps file for us?

@zaaack
Copy link

zaaack commented Oct 13, 2017

@forki Here is my deps file, not the newest, but I think the speed won't change too much. In my debian labtop, most time it just takes 100% CPU and doesn't cause much network traffic.

source https://nuget.org/api/v2
storage:none

nuget FSharp.Core redirects: force
nuget Fable.JsonConverter
nuget Suave
nuget Microsoft.Extensions.Logging.Console
nuget System.Net.NetworkInformation
nuget Newtonsoft.Json
nuget jose-jwt

nuget Fable.Core
nuget Fable.Elmish.Browser
nuget Fable.Elmish.Debugger
nuget Fable.Elmish.React
nuget Fable.Elmish.HMR
nuget WindowsAzure.Storage
nuget Nett.Coma
nuget Microsoft.EntityFrameworkCore.Tools
nuget Pomelo.EntityFrameworkCore.MySql
nuget Z.EntityFramework.Plus.EFCore
nuget SmtpServer
nuget Foundatio
nuget Humanizer

clitool dotnet-fable
clitool Microsoft.DotNet.Watcher.Tools

group ServerTests
  source https://nuget.org/api/v2
  storage:none
  clitool Microsoft.DotNet.Watcher.Tools
  nuget FSharp.Core redirects: force
  nuget Expecto

group UITests
  source https://nuget.org/api/v2
  framework >= net461
  nuget FSharp.Core redirects: force
  nuget Canopy
  nuget Expecto
  nuget phantomjs

group Build
  source https://nuget.org/api/v2
  framework >= net461
  nuget FAKE
  nuget Newtonsoft.Json

forki added a commit that referenced this issue Oct 13, 2017
@forki
Copy link
Member

forki commented Oct 13, 2017

first trial: #2846

@matthid
Copy link
Member

matthid commented Oct 14, 2017

Please test with https://github.com/fsprojects/Paket/releases/tag/5.114.5 sorry for the delay :/

@matthid matthid closed this as completed Oct 14, 2017
@forki
Copy link
Member

forki commented Oct 14, 2017 via email

@TheAngryByrd
Copy link
Contributor Author

TheAngryByrd commented Oct 16, 2017

Much better! 🎸

Paket version 5.114.5
Performance:
 - Resolver: 2 minutes, 44 seconds (2 runs)
    - Runtime: 2 minutes, 33 seconds
    - Blocked (retrieving package details): 5 seconds (45 times)
    - Blocked (retrieving package versions): 6 seconds (3 times)
    - Not Blocked (retrieving package details): 150 times
    - Not Blocked (retrieving package versions): 192 times
 - Disk IO: 1 second
 - Average Download Time: 4 seconds
 - Number of downloads: 1
 - Average Request Time: 146 milliseconds
 - Number of Requests: 551
 - Runtime: 2 minutes, 53 seconds

@matthid
Copy link
Member

matthid commented Oct 16, 2017

Thanks for reporting back.

@MadelineRitchie
Copy link
Contributor

Paket version 5.114.5
Performance:
 - Resolver: 4 minutes, 17 seconds (2 runs)
    - Runtime: 3 minutes, 39 seconds
    - Blocked (retrieving package details): 25 seconds (51 times)
    - Blocked (retrieving package versions): 12 seconds (5 times)
    - Not Blocked (retrieving package details): 144 times
    - Not Blocked (retrieving package versions): 190 times
 - Disk IO: 2 seconds
 - Average Request Time: 310 milliseconds
 - Number of Requests: 734
 - Runtime: 4 minutes, 28 seconds

+1 🎸

@somdoron
Copy link

somdoron commented Nov 4, 2017

I'm using latest paket (5.120.1) and paket install is taking a lot of time (10 minutes) for every package I'm adding.

@TheAngryByrd
Copy link
Contributor Author

Seems like this is starting to creep back up:

Performance:
 - Resolver: 4 minutes, 6 seconds (2 runs)
    - Runtime: 3 minutes, 38 seconds
    - Blocked (retrieving package details): 20 seconds (52 times)
    - Blocked (retrieving package versions): 7 seconds (4 times)
    - Not Blocked (retrieving package details): 143 times
    - Not Blocked (retrieving package versions): 191 times
 - Disk IO: 947 milliseconds
 - Average Download Time: 4 seconds
 - Number of downloads: 15
 - Average Request Time: 209 milliseconds
 - Number of Requests: 688
 - Runtime: 4 minutes, 16 seconds

@forki
Copy link
Member

forki commented Dec 1, 2017 via email

@TheAngryByrd
Copy link
Contributor Author

Sorry I wasn't clear. I was using the same github repo as stated in the original issue: https://github.com/TheAngryByrd/paket-install-slow

@forki
Copy link
Member

forki commented Dec 2, 2017 via email

@blair55
Copy link

blair55 commented Feb 6, 2018

I experience slow performance with mono paket.exe install using the below dependencies & lock

https://gist.github.com/blair55/fcbb276fc04e17517fd92beb37f33d11

Performance:
 - Resolver: 11 minutes, 32 seconds (1 runs)
    - Runtime: 10 minutes, 48 seconds
    - Blocked (retrieving package details): 40 seconds (63 times)
    - Blocked (retrieving package versions): 4 seconds (5 times)
    - Not Blocked (retrieving package details): 216 times
    - Not Blocked (retrieving package versions): 11 times
 - Disk IO: 743 milliseconds
 - Average Download Time: 307 milliseconds
 - Number of downloads: 9
 - Average Request Time: 107 milliseconds
 - Number of Requests: 1054
 - Runtime: 11 minutes, 50 seconds

@blair55
Copy link

blair55 commented Feb 6, 2018

p.s. Paket version 5.133.0

@forki
Copy link
Member

forki commented Feb 7, 2018 via email

@forki
Copy link
Member

forki commented Feb 11, 2018

@blair55 how fast is second update run after the first run?

@blair55
Copy link

blair55 commented Feb 11, 2018

@forki Normally there is no significant difference.

@forki
Copy link
Member

forki commented Feb 12, 2018 via email

@forki
Copy link
Member

forki commented Feb 12, 2018

@blair55 #3037 is solving your case in 45s

@forki
Copy link
Member

forki commented Feb 12, 2018

@blair55 can you please retry?

@forki
Copy link
Member

forki commented Feb 12, 2018

@TheAngryByrd tried git@github.com:TheAngryByrd/paket-install-slow.git and it's now at 52s

@TheAngryByrd
Copy link
Contributor Author

Awesome! I'll yet when I get in the office

@blair55
Copy link

blair55 commented Feb 12, 2018

Yep, can confirm:

 - Resolver: 45 seconds (1 runs)
    - Runtime: 19 seconds
    - Blocked (retrieving package details): 11 seconds (96 times)
    - Blocked (retrieving package versions): 14 seconds (16 times)
    - Not Blocked (retrieving package details): 183 times
    - Not Blocked (retrieving package versions): 263 times
 - Disk IO: 123 milliseconds
 - Average Request Time: 124 milliseconds
 - Number of Requests: 282
 - Runtime: 51 seconds

👍

@TheAngryByrd
Copy link
Contributor Author

🎸

Performance:
 - Resolver: 23 seconds (2 runs)
    - Runtime: 5 seconds
    - Blocked (retrieving package details): 3 seconds (42 times)
    - Blocked (retrieving package versions): 14 seconds (12 times)
    - Not Blocked (retrieving package details): 164 times
    - Not Blocked (retrieving package versions): 192 times
 - Disk IO: 591 milliseconds
 - Average Download Time: 167 milliseconds
 - Number of downloads: 17
 - Average Request Time: 88 milliseconds
 - Number of Requests: 227
 - Runtime: 28 seconds

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants