Re: Guix closure size of a system?

2020-05-19 Thread Leo Famulari
On Tue, May 19, 2020 at 06:46:14PM +0200, Pierre Neidhardt wrote:
> Should I file a bug?

I've done it: 



Re: Guix closure size of a system?

2020-05-19 Thread Leo Famulari
On Tue, May 19, 2020 at 05:58:54PM +0200, Pierre Neidhardt wrote:
> I haven't looked at the details, but
> 
> --8<---cut here---start->8---
> > guix size docker
> store item   totalself
> /gnu/store/w8gjhcw6a16rk1dvxa97bz2znal5fihm-go-1.13.9  639.1   
> 350.7  28.2%
> --8<---cut here---end--->8---
> 
> Then
> 
> --8<---cut here---start->8---
> > grep w8gjhcw6a16rk1dvxa97bz2znal5fihm dockerd
> Binary file dockerd matches
> --8<---cut here---end--->8---

I don't think that package is using the go-build-system, so that is
probably the reason for the bogus reference.



Re: Guix closure size of a system?

2020-05-19 Thread Leo Famulari
On Tue, May 19, 2020 at 11:57:02AM +0200, Pierre Neidhardt wrote:
> /gnu/store/w8gjhcw6a16rk1dvxa97bz2znal5fihm-go-1.13.9  639.1   
> 350.7   6.8%

> - go: I think I've got go because of docker, but go should be a
>   build-time dependency, I don't think it belong here.

Just FYI the Go build system has a phase that removes references to the
Go compiler.



Re: Guix closure size of a system?

2020-05-19 Thread Julien Lepiller
Le 19 mai 2020 08:50:39 GMT-04:00, Pierre Neidhardt  a écrit 
:
>Julien Lepiller  writes:
>
>>>Moving the llvm libs to a "lib" output could reduce the closure size
>of
>>>many packages I believe.
>>>
>>>Thoughts?
>>
>> Llvm doesn't support that afaik.
>
>Does not support what?
>Arch Linux has a separate llvm-libs package, I suppose we can do
>something similar.
>
>> I've recently found that we have a 30MB static library in mozjs (a
>gdm dependency) that is described as unused by other packages in FS,
>and they suggest to remove it.
>>
>> Another easy win is the 30MB gnome-backgrounds which useless on my
>system, as I don't use gnome. Not sure why it's in the closure of gdm.
>>
>> We could gain 50MB in the closure of many software (but not the
>system) by placing gnutls guile bindings in their own output (for
>instance, icecat depends on ffmpeg which depends on gnutls which in
>turn depends on guile). This might still be useful to reduce the size
>of separate profiles.
>>
>> I'll probably send a some patches in the next few days :)
>
>Fantastic, and thankgs for your insights!

A separate /lib. Archlinux can do this because the package installs at the 
expected /lib. I remember trying to set a libdir, but that failed because the 
libdir and the rest of llvm didn't share the same prefix. Of course you can 
still try, I'll be happy if you can find a way to split the package properly :)



Re: Guix closure size of a system?

2020-05-19 Thread Julien Lepiller
Le 19 mai 2020 05:57:02 GMT-04:00, Pierre Neidhardt  a écrit 
:
>This works, thanks!
>
>Should we document it in `guix size -h`?
>
>I think the result is interesting with respect to the discussion we had
>about shrinking the closure sizes in Guix:
>
>--8<---cut here---start->8---
>> guix size /gnu/store/alydrspjw3sfc6b01kyz30vjhjrny86c-system
>store item   total 
>  self
>/gnu/store/w8gjhcw6a16rk1dvxa97bz2znal5fihm-go-1.13.9 
>639.1   350.7   6.8%
>/gnu/store/9qs1v87rv4ch7x07adbx8pfnkjxm39d1-guix-1.1.0-4.bdc801e  
>467.8   268.9   5.2%
>/gnu/store/cpx45dbix533r2yx73jbv8fd0h8c3vyn-linux-5.4.41  
>244.0   244.0   4.7%
>/gnu/store/6hnk449wv8vhbrm0in0ychqiwipsqyza-docker-19.03.7   
>1245.3   195.7   3.8%
>/gnu/store/n08as2lvmcc14q57bq1z8p7r1kaa1vv2-gnome-getting-started-docs-3.32.2
>  164.0   164.0   3.2%
>/gnu/store/skxkrhgn9z0fg9hmnbcyfdgzs5w4ryrr-llvm-9.0.1
>199.9   128.5   2.5%
>/gnu/store/da1lys4i2yxl549iwkbdg1fb7azphniw-emacs-26.3   
>1181.3   128.1   2.5%
>/gnu/store/8jn365r0kk69j1f4b1q2b7aa2qm1xvg1-mesa-19.3.4   
>341.6   114.6   2.2%
>/gnu/store/rn75fm7adgx3pw5j8pg3bczfqq1y17lk-gcc-7.5.0 
>178.5   107.3   2.1%
>/gnu/store/rsjdq6b0csxc16mbapx5yvrc2zrk20za-containerd-1.2.5  
>755.7   105.9   2.0%
>/gnu/store/vnivzyfy0bcxz8rn9gasav5k7skax57y-samba-4.12.2  
>594.198.8   1.9%
>/gnu/store/1hrwdsd5fwn3xmdgnpyg2h1j5jr6q8ws-webkitgtk-2.28.2  
>930.498.2   1.9%
>/gnu/store/znly83q0jmcqg6ppwbz5marj5ix9vkk2-locale-2.31
>91.991.9   1.8%
>/gnu/store/ikcjpg1y0mb5qinpdc0q85xvm53cz80q-locale-2.28
>91.891.8   1.8%
>/gnu/store/09a5iq080g9b641jyl363dr5jkkvnhcn-python-3.8.2  
>171.479.8   1.5%
>/gnu/store/fj33c1nw4v81qcd33wp53f3aa01g3m9d-ibus-1.5.22   
>946.266.3   1.3%
>/gnu/store/sd278fsdfx5hjrcgncflnp9qq4l42p1c-python2-2.7.17
>151.761.1   1.2%
>/gnu/store/8zvc5mvk0xm3ygrxsgpyy5ilxb5rzjry-perl-5.30.2   
>146.257.1   1.1%
>/gnu/store/lvnv80g5iqf7fqlckadjfradd4f7-mozjs-60.2.3-2
>248.354.7   1.1%
>/gnu/store/ljcrz0d86r20phszvj6s1mdyjchz79ja-guile-static-stripped-3.0.2
>   54.754.7   1.1%
>/gnu/store/m1z7cdbqsqyp9xnjw5cvlb4a7gkcg3m4-binutils-2.34  
>93.054.6   1.1%
>/gnu/store/18hp7flyb3yid3yp49i6qcdq0sbi5l1n-guile-3.0.2   
>132.853.2   1.0%
>/gnu/store/0m0vd873jp61lcm4xa3ljdgx381qa782-guile-3.0.2   
>132.853.2   1.0%
>/gnu/store/fii66zlqdzv3kbfdbzmj33vvxfwvj33h-gnome-user-docs-3.32.3   
>49.949.9   1.0%
>[...]
>--8<---cut here---end--->8---
>
>- go: I think I've got go because of docker, but go should be a
>  build-time dependency, I don't think it belong here.
>
>- llvm: I think it's mostly dragged by Mesa.
>  Mesa depends on some LLVM libs, but not all of llvm:
>  https://www.archlinux.org/packages/extra/x86_64/mesa/
>
>Moving the llvm libs to a "lib" output could reduce the closure size of
>many packages I believe.
>
>Thoughts?

Llvm doesn't support that afaik.

I've recently found that we have a 30MB static library in mozjs (a gdm 
dependency) that is described as unused by other packages in FS, and they 
suggest to remove it.

Another easy win is the 30MB gnome-backgrounds which useless on my system, as I 
don't use gnome. Not sure why it's in the closure of gdm.

We could gain 50MB in the closure of many software (but not the system) by 
placing gnutls guile bindings in their own output (for instance, icecat depends 
on ffmpeg which depends on gnutls which in turn depends on guile). This might 
still be useful to reduce the size of separate profiles.

I'll probably send a some patches in the next few days :)



Re: Guix closure size of a system?

2020-05-19 Thread Tobias Geerinckx-Rice

Hullo Pierre,

Pierre Neidhardt 写道:
Is there a way to calculate the closure size of a system (as 
generated

by guix system reconfigure config.scm)?


Trivially!  Guix does good the unix and composes:

 $ guix size `guix build /etc/guix/system.scm`

allowing funtrospection like

 $ guix size `readlink /run/current-system`
 total: 3372.1 MiB

 $ guix size `readlink /run/current-system/profile`
 total: 2207.7 MiB

This Guix thing is pretty neat,

T G-R


signature.asc
Description: PGP signature


Re: Guix closure size of a system?

2020-05-19 Thread Marius Bakke
Pierre Neidhardt  writes:

> Hi!
>
> Is there a way to calculate the closure size of a system (as generated
> by guix system reconfigure config.scm)?

Try: 'guix size $(guix system build config.scm)'.

Or for the currently running generation:

'guix size $(readlink -f /run/current-system)'


signature.asc
Description: PGP signature


Re: Guix closure size of a system?

2020-05-19 Thread Pierre Neidhardt
`guix size -h` does not advertize that it can take derivations.  Doc
bug?

I tried your trick but it seems to take forever.  So I tried on a
lighter package then:

--8<---cut here---start->8---
> guix size zile
store item   totalself
/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31  38.4
36.7  42.9%
/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib   71.0
32.6  38.1%
/gnu/store/87kif0bpf0anwbsaw0jvg8fyciw4sz67-bash-5.0.16 84.6 
6.3   7.3%
/gnu/store/zzkly5rbfvahwqgcs7crz0ilpi7x5g5p-ncurses-6.2 76.9 
5.9   6.9%
/gnu/store/mmhimfwmmidf09jw1plw3aw1g1zn2nkh-bash-static-5.0.16   1.6 
1.6   1.9%
/gnu/store/knp4rkdm39ph4brkbzsp07q248nfffi1-readline-8.0.4  78.3 
1.4   1.6%
/gnu/store/zg126cjicrpm2p6zc08ra5vh4ddag7ww-libgc-8.0.4 71.8 
0.8   0.9%
/gnu/store/2q5ksz7xaxg0ns1hrjkx7v7yip138khr-zile-2.4.14 85.7 
0.3   0.4%
total: 85.7 MiB

> guix size /gnu/store/nsjg897k88b2hr4nwhhrw2g0gxd9n6gc-zile-2.4.14.drv
store item   totalself
/gnu/store/ipp99y0cida5virzwgp0zqlwk5m61yxk-module-import0.1 
0.1  10.2%
/gnu/store/8a0wry8cvr405ha8d8bpjyzj5dzghigd-module-import0.1 
0.1   9.8%
/gnu/store/xv5ylv9hxvs1wraw375b5g9jwy57vs8p-module-import0.1 
0.1   3.7%
/gnu/store/jx23in0qbkn51bjjz47qqr3p06i0wnnw-build-utils.scm  0.1 
0.1   3.7%
/gnu/store/qkgnyh78n4y55r0ymaqzbrx842jvsmhw-glibc-hurd-signal-sa-siginfo.patch  
   0.0 0.0   1.4%
/gnu/store/wm80397r10sj6qckf6987qd2hh842p30-glibc-boot-2.16.0.patch 0.0 
0.0   0.9%
/gnu/store/sscidrirnl1nq749kmbj7zh5w5v8fn6y-ld-wrapper.in0.0 
0.0   0.8%
/gnu/store/h1nnwnrbwr7vcllyn1k0p55lkdz0clhh-mirrors  0.0 
0.0   0.7%
/gnu/store/pfz4y5i7krlvam2m8lpddmg9vi44rpqh-glibc-boot-2.2.5.patch 0.0 
0.0   0.7%
/gnu/store/m5mqzaswnmiq80y9cibihb65gbz1whdl-perl-no-sys-dirs.patch 0.0 
0.0   0.6%
/gnu/store/5vnb17vh33wq5szqyc448pm3h5ym5hnv-gcc-7.5.0-guile-builder 0.0 
0.0   0.6%
/gnu/store/r55s4fap87x9f1cc8rw7lfhc58nyim0l-gcc-cross-boot0-7.5.0-guile-builder 
0.0 0.0   0.6%
/gnu/store/mvq0q2f211bxb4syfxvng9kgdxzkr5f3-glibc-versioned-locpath.patch 
0.0 0.0   0.5%
/gnu/store/099xi8s72v8zqmyyyj74dhlhfkvnwx8n-gcc-mesboot-4.9.4-guile-builder 
0.0 0.0   0.5%
/gnu/store/mvvbyj7xhwfzkamjfb3shw2as4gk296c-glibc-2.31-guile-builder 0.0
 0.0   0.5%
/gnu/store/fn1gkdn0vb5pd77hswhj2s9ipq81b83k-glibc-mesboot-2.16.0-guile-builder  
   0.0 0.0   0.5%
/gnu/store/1xdrgdgjkgsdcz55vv25ksf618sdmf8b-glibc-intermediate-2.31-guile-builder
 0.0 0.0   0.5%
/gnu/store/nywqkzl0a0n93bj5glyk69abzl049yxl-python-minimal-3.5.9-guile-builder  
   0.0 0.0   0.5%
/gnu/store/89kfq9rwbclmr658ihnmxgrpb10gvrgk-binutils-boot-2.20.1a.patch 0.0 
0.0   0.5%
/gnu/store/15fzxgqx03p5300s8nhzjyaya0qamr99-glibc-headers-mesboot-2.16.0-guile-builder
 0.0 0.0   0.5%
/gnu/store/0l5lac2pswb66gx2drb6896iqnn09nz1-bzip2-1.0.8-guile-builder 0.0   
  0.0   0.4%
/gnu/store/k509mw4rqz91r86za3i8bddjb32wxllg-gcc-mesboot1-4.6.4-guile-builder
 0.0 0.0   0.4%
/gnu/store/rbyvq8a3cjcwpck13fbny3gnd5d9j9xl-gcc-boot-2.95.3.patch 0.0 
0.0   0.4%
/gnu/store/1lls7m7jdkhpxniywgi90vzjrfpdpvg8-gcc-mesboot0-2.95.3-guile-builder   
  0.0 0.0   0.4%
/gnu/store/25j5050bywm1ziwphfgnpbp3lip4802x-m4-gnulib-libio.patch 0.0 
0.0   0.4%
/gnu/store/w4g3a7ydrrbfv9viza2mdv8dnfr5xyk5-perl-5.30.2-guile-builder 0.0   
  0.0   0.4%
/gnu/store/z299k4x1f1nzqf6svsjhc7ni3rsxjyms-perl-5.30.2-guile-builder 0.0   
  0.0   0.4%
/gnu/store/zyl7glrc0393q8kb7wbkg2hg002204ly-bash-static-5.0.16-guile-builder
 0.0 0.0   0.4%
/gnu/store/siyn1c1047v2gfm17klz307wvsmhqxif-ncurses-6.2-guile-builder 0.0   
  0.0   0.4%
/gnu/store/bvpk5hyp9rfc8wq5dvnyvblf40kv8zj8-bash-minimal-5.0.16-guile-builder   
  0.0 0.0   0.3%
/gnu/store/arb5wjdlfbaz83gnsi1kwf7r5mlmx769-bzip2-boot0-1.0.8-guile-builder 
0.0 0.0   0.3%
/gnu/store/82zx1xp485i6z9b9kccxvx0bf76418gd-perl-boot0-5.30.2-guile-builder 
0.0 0.0   0.3%
/gnu/store/rgcdax8f3if3hvqgqyhyvr4k5b7rcw32-gcc-core-mesboot0-2.95.3-guile-builder
 0.0 0.0   0.3%
/gnu/store/qdlzqg57wfy315bml7blcmx0agq5924q-make-4.3-guile-builder 0.0 
0.0   0.3%
/gnu/store/9y49p4imjf02z3b82ickysgpa2ljp9gb-glibc-mesboot0-2.2.5-guile-builder  
   0.0 0.0   0.3%
/gnu/store/bbpbacb1i51sshdvcqdh3ra93hzzc065-gzip-1.10-guile-builder 0.0 
0.0   0.3%
/gnu/store/3889dn7i7linjmggn96842807g9in870-guile-3.0.2-guile-builder 0.0   
  0.0   0.3%
/gnu/store/5l2a6116lz64v29dx81nkmicf7b1ih7x-gawk-5.0.1-guile-builder 0.0
 0.0   0.3%
/gnu/store/29jrxpn6s0cfrhsgwdn7x7d25yci0nvp-xz-5.2.4-guile-builder 0.0 
0.0   0.3%

Re: Guix closure size of a system?

2020-05-19 Thread Mathieu Othacehe


Hello Pierre,

> Is there a way to calculate the closure size of a system (as generated
> by guix system reconfigure config.scm)?

Yes, you can pass '-d' to 'guix system' to get the matching
derivation. Then you can pass this derivation to 'guix size'.

Mathieu



Guix closure size of a system?

2020-05-19 Thread Pierre Neidhardt
Hi!

Is there a way to calculate the closure size of a system (as generated
by guix system reconfigure config.scm)?

-- 
Pierre Neidhardt
https://ambrevar.xyz/


signature.asc
Description: PGP signature