Skip to content

Commit

Permalink
julia upgrade silently, closes #149
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed May 15, 2020
1 parent 4f569a5 commit db7bbdb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion juliadf/init-juliadf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ set -e

# upgrade to latest devel
echo 'upgrading juliadf...'
julia -q -e 'using Pkg; Pkg.update();' > /dev/null
julia -q -e 'using Pkg; Pkg.update();' > /dev/null 2>&1

This comment has been minimized.

Copy link
@jangorecki

jangorecki Jun 8, 2021

Author Contributor

@bkamins Any idea if we can speed this up? I noticed this step was taking quite long time, even when DataFrames has not been upgraded. Can we just update DataFrames (and other packages only if necessary) instead?

This comment has been minimized.

Copy link
@bkamins

bkamins Jun 8, 2021

Contributor

Looking at #149 this is very strange. The process should be fast and not invoke pip at all as I assume you use only DataFrames.jl and CSV.jl that do not have Python as a dependency.

Here is a timing on my machine (I have many more packages installed and I show you timings on Windows which is slower than Linux):

julia> using Pkg; @time Pkg.update();
    Updating registry at `C:\Users\bogum\.julia\registries\General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `C:\Users\bogum\.julia\environments\v1.6\Project.toml`
  No Changes to `C:\Users\bogum\.julia\environments\v1.6\Manifest.toml`
  9.160539 seconds (9.34 M allocations: 638.679 MiB, 2.12% gc time, 4.44% compilation time)

Most likely there is some problem with your Julia installation.

In order to diagnose could you please:

  • show me the dump of terminal output when running using Pkg; @time Pkg.update() on your machine
  • share the Project.toml and Manifest.toml files (their paths will be given in the output of the above commands) so that I can inspect if some unnecessary and unwanted dependencies are not installed

If I cannot resolve this I will ask @KristofferC for help who is an expert in Julia package management issues.

This comment has been minimized.

Copy link
@jangorecki

jangorecki Jun 8, 2021

Author Contributor

This pip was related to some python software, not output of Julia process but whole benchmark script. So linked issue is not really relevant. I will check your suggestions and provide output. Thanks!

This comment has been minimized.

Copy link
@jangorecki

jangorecki Jun 9, 2021

Author Contributor

@bkamins

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.1 (2021-04-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Pkg; @time Pkg.update()
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
  No Changes to `~/.julia/environments/v1.6/Project.toml`
  No Changes to `~/.julia/environments/v1.6/Manifest.toml`
 46.052451 seconds (8.06 M allocations: 327.801 MiB, 0.40% gc time, 1.28% compilation time)
cat ~/.julia/environments/v1.6/Project.toml
[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
cat ~/.julia/environments/v1.6/Manifest.toml
# This file is machine-generated - editing it directly is not advised

[[ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"

[[Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[CSV]]
deps = ["Dates", "Mmap", "Parsers", "PooledArrays", "SentinelArrays", "Tables", "Unicode"]
git-tree-sha1 = "b83aa3f513be680454437a0eee21001607e5d983"
uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
version = "0.8.5"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mm
ap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UU
IDs", "Unicode"]
git-tree-sha1 = "e4e2b39db08f967cc1360951f01e8a75ec441cab"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.30.0"

[[Crayons]]
git-tree-sha1 = "3f71217b538d7aaee0b69ab47d9b7724ca8afa0d"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.0.4"

[[DataAPI]]
git-tree-sha1 = "dfb3b7e89e395be1e25c2ad6d7690dc29cc53b1d"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.6.0"

[[DataFrames]]
deps = ["Compat", "DataAPI", "Future", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "P
ooledArrays", "PrettyTables", "Printf", "REPL", "Reexport", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"]
git-tree-sha1 = "66ee4fe515a9294a8836ef18eea7239c6ac3db5e"
uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
version = "1.1.1"

[[DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "4437b64df1e0adccc3e5d1adbc3ac741095e4677"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.9"

[[DataValueInterfaces]]
git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6"
uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464"
version = "1.0.0"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[Formatting]]
deps = ["Printf"]
git-tree-sha1 = "8339d61043228fdd3eb658d86c926cb282ae72a8"
uuid = "59287772-0a20-5a39-b81b-1366585eb4c0"
version = "0.4.2"

[[Future]]
deps = ["Random"]
uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[InvertedIndices]]
deps = ["Test"]
git-tree-sha1 = "15732c475062348b0165684ffe28e85ea8396afc"
uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
version = "1.0.0"

[[IteratorInterfaceExtensions]]
git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856"
uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"

[[LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"

[[LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"

[[Missings]]
deps = ["DataAPI"]
git-tree-sha1 = "4ea90bd5d3985ae1f9a908bd4500ae88921c5ce7"
uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28"
version = "1.0.0"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"

[[NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"

[[OrderedCollections]]
git-tree-sha1 = "85f8e6578bf1f9ee0d11e7bb1b1456435479d47c"
uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.4.1"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "c8abc88faa3f7a3950832ac5d6e690881590d6dc"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "1.1.0"

[[Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serializat
ion", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[PooledArrays]]
deps = ["DataAPI", "Future"]
git-tree-sha1 = "cde4ce9d6f33219465b55162811d8de8139c0414"
uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720"
version = "1.2.1"

[[PrettyTables]]
deps = ["Crayons", "Formatting", "Markdown", "Reexport", "Tables"]
git-tree-sha1 = "b60494adf99652d220cdef46f8a32232182cc22d"
uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d"
version = "1.0.1"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[Reexport]]
git-tree-sha1 = "5f6c21241f0f655da3952fd60aa18477cf96c220"
uuid = "189a3867-3050-52da-a836-e630ba90ab69"
version = "1.1.0"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[SentinelArrays]]
deps = ["Dates", "Random"]
git-tree-sha1 = "bc967c221ccdb0b85511709bda96ee489396f544"
uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c"
version = "1.3.2"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SortingAlgorithms]]
deps = ["DataStructures"]
git-tree-sha1 = "2ec1962eba973f383239da22e75218565c390a96"
uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c"
version = "1.0.0"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions"]
git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39"
uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c"
version = "1.0.1"

[[Tables]]
deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "LinearAlgebra", "TableTraits", "Test"]
git-tree-sha1 = "aa30f8bb63f9ff3f8303a06c604c8500a69aa791"
uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"
version = "1.4.3"

[[Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"

[[Test]]
deps = ["InteractiveUtils", "Logging", "Random", "Serialization"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"

[[nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"

[[p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"

This comment has been minimized.

Copy link
@bkamins

bkamins Jun 9, 2021

Contributor

Unfortunately all is OK. We had such issues on Windows, but it was never encountered on Linux AFAICT. Hopefully when a new version of Julia is out then this fix will resolve the issue.

@KristofferC can you give any additional advice here?

This comment has been minimized.

Copy link
@bkamins

bkamins Jun 9, 2021

Contributor

@jangorecki - I have discussed this internally. It seems it is an issue with git.

In order to diagnose could you please go to ~/.julia/registries/General directory and start Julia in it and then run (I am showing you my timings):

julia> using LibGit2

julia> repo = LibGit2.GitRepo(".")
LibGit2.GitRepo("C:/Users/bogum/.julia/registries/General")

julia> @time LibGit2.fetch(repo)
  1.637181 seconds (39 allocations: 3.531 KiB)
0

and then exit Julia and check the timing of:

git fetch

in bash?

If these commands are slow (and this is a hypothesis) then this is an issue with fetching data from the Internet on your server via git (as you see normally it should be less than 2 seconds).

Thank you!

This comment has been minimized.

Copy link
@jangorecki

jangorecki Jun 10, 2021

Author Contributor
julia> using LibGit2

julia> repo = LibGit2.GitRepo(".")
LibGit2.GitRepo("/home/jan/.julia/registries/General")

julia> @time LibGit2.fetch(repo)
exit() 44.959726 seconds (24.84 k allocations: 1.713 MiB, 0.14% compilation time)
0

julia> exit()
jan@mr-dl11:~/.julia/registries/General⟫ time git fetch
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.

real    0m2.174s
user    0m0.573s
sys     0m0.095s

yes, it seems that git fetch uses all that time. I think it would be nice to have a mechanism to avoid full git fetch. In data.table we are adding extra field "Revision" to PACKAGES file (which is CRAN-like packages index file), so we only fetch PACKAGES file and then see if Revision has a new value than currently installed. This works pretty good.

time ./datatable/upg-datatable.sh 
#upgrading data.table...
#R data.table package is up-to-date at d9e1afd5519a3fe32caf02358cdf5f374e3831e8 (1.14.1)
#
#real    0m0.960s
#user    0m2.548s
#sys     0m2.593s

Should I remove ~/.julia/registries/General/.git now?
Thank you for debugging with me @bkamins.

This comment has been minimized.

Copy link
@bkamins

bkamins Jun 10, 2021

Contributor

No, the .git folder is required. In general the git fetch does not do fetching of the packages but it does fetch the https://github.com/JuliaRegistries/General repository. I am curious why git fetch is so slow on your machine (as it should not be - but this is probably a system level issue for some reason).

@KristofferC - I have now noticed that the registry clones whole history of git repo. Why does it do it? I would think it would be enough to just fetch current state without history? (would it save some time?)

This comment has been minimized.

Copy link
@KristofferC

KristofferC Jul 2, 2021

In 1.7 it will not get any history so at that point it should be fixed. Sorry for the late reply.

This comment has been minimized.

Copy link
@bkamins

bkamins Jul 2, 2021

Contributor

Thank you!


0 comments on commit db7bbdb

Please sign in to comment.