guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guix gc: smarter collection & guix.el manual deletion


From: Efraim Flashner
Subject: Re: guix gc: smarter collection & guix.el manual deletion
Date: Sun, 29 Jul 2018 20:48:40 +0300
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun, Jul 29, 2018 at 05:06:34AM -0700, Chris Marusich wrote:
> Pierre Neidhardt <address@hidden> writes:
> 
> >> Perhaps you simply don't have enough garbage available for the collector
> >> to collect?  If you ask for 5 GiB, your system has 3 GiB free, and there
> >> is only 1 GiB of garbage, the best the collector can do is collect all
> >> the garbage (1 GiB) and leave you with just 4 GiB of free space.
> >
> > Sorry for the sparse details, I forgot to mention that if I run `guix gc 
> > -F8GB`,
> > then I get 5-6GB back, so it _can_ remove that much garbage indeed! ;)
> 
> The "guix gc" command appears to be working correctly for me:
> 
> --8<---------------cut here---------------start------------->8---
> [0] address@hidden:~
> $ df -h /gnu/store
> Filesystem                  Size  Used Avail Use% Mounted on
> /dev/mapper/encrypted-root  211G  194G  5.8G  98% /gnu/store
> [0] address@hidden:~
> $ guix gc -F8G
> guix gc: freeing 2,336.80469 MiBs
> finding garbage collector roots...
> deleting garbage...
> [...]
> deleted or invalidated more than 2450317312 bytes; stopping
> [...]
> [0] address@hidden:~
> $ df -h /gnu/store
> Filesystem                  Size  Used Avail Use% Mounted on
> /dev/mapper/encrypted-root  211G  187G   13G  94% /gnu/store
> --8<---------------cut here---------------end--------------->8---
> 
> Above, I began with 5.8 GiB of free space in the store's file system.  I
> asked Guix to increase that value to 8 GiB.  Guix correctly determined
> that it would need to free approximately 8 - 5.8 = 2.2 GiB or more to
> fulfill my request.  It then started collecting garbage and stopped once
> it found that it had freed slightly more space than required.  I ended
> with 13 GiB of free space.  Since I asked Guix to collect enough garbage
> to end up with at least 8 GiB of free space, Guix behaved correctly.
> 
<...snip...>
> 
> Hopefully this will help to explain the behavior you're seeing.
> 

$ guix gc --help
Usage: guix gc [OPTION]... PATHS...
Invoke the garbage collector.

  -C, --collect-garbage[=MIN]
                         collect at least MIN bytes of garbage
  -F, --free-space=FREE  attempt to reach FREE available space in the store
  -d, --delete           attempt to delete PATHS
      --optimize         optimize the store by deduplicating identical files
      --list-dead        list dead paths
      --list-live        list live paths

      --references       list the references of PATHS
  -R, --requisites       list the requisites of PATHS
      --referrers        list the referrers of PATHS
      --derivers         list the derivers of PATHS

      --verify[=OPTS]    verify the integrity of the store; OPTS is a
                         comma-separated combination of 'repair' and
                         'contents'
      --list-failures    list cached build failures
      --clear-failures   remove PATHS from the set of cached failures

  -h, --help             display this help and exit
  -V, --version          display version information and exit

Report bugs to: address@hidden
GNU Guix home page: <https://www.gnu.org/software/guix/>
General help using GNU software: <http://www.gnu.org/gethelp/>

`guix gc -F 8GB' should try to free space until there is 8GB of free
space, you're thinking of `guix gc -C 8 GB' which tries to free 8GB of
space.


-- 
Efraim Flashner   <address@hidden>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]