[Top][All Lists]

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

Re: running a script in a post-build hook?

From: Ludovic Courtès
Subject: Re: running a script in a post-build hook?
Date: Fri, 07 Oct 2016 21:42:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)


Ricardo Wurmus <address@hidden> skribis:

> here’s my problem: I need to have the store on a big slow NFS server
> with online compression and deduplication.  This means that *everything*
> in Guix is slow: downloading binaries, building packages from source,
> building a new profile generation — it’s all *very* slow.

This is a tricky use case…

> So I thought: I should be able to just have the store on fast local
> disks and copy over store items to the slow NFS server when they are
> done.  This is not easy because the store is very big and at the
> filesystem level we cannot take advantage of the fact that the store is
> append-only for the most part.  So running rsync, for example, won’t cut
> it.
> The daemon, however, does have information about completed builds and
> new store items.  Does the daemon have a post-build hook that can be
> called with the names of the new store items which I could then copy
> over?  (Or even the names of store items I need to delete after “guix
> gc”.)
> Could the build hook feature be used for this, maybe by wrapping the
> normal build such that a script is run when it finishes?

The build hook “protocol” doesn’t work like this.  The daemon sends a
build request, which the hook can accept, postpone, or decline (see
(guix scripts offload)).  When it accepts, the hook cannot invoke the
daemon (it’s not “reentrant”.)  The substituter protocol is similar.

> Finally, is this a good idea?  Or is /gnu/store/.links going to be a
> problem?  Should a post-build hook also inform about deduplication
> decisions?  Or should I just turn of deduplication in my case?

Turning off deduplication would probably help because deduplication is
I/O intensive.

Otherwise maybe a file system level hack?  Like making /gnu/store a
unionfs that writes elsewhere?



reply via email to

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