From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Hydra doesn't have enough memory+swap to evaluate jobsets Date: Tue, 16 Dec 2014 17:53:42 +0100 Message-ID: <87mw6n8rjd.fsf@gnu.org> References: <874msw48t4.fsf@yeeloong.lan> <87zjao2jgo.fsf@yeeloong.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0vNh-0004Mh-NY for guix-devel@gnu.org; Tue, 16 Dec 2014 11:54:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0vNY-0006N3-Mb for guix-devel@gnu.org; Tue, 16 Dec 2014 11:53:53 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:49843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0vNY-0006Mo-9B for guix-devel@gnu.org; Tue, 16 Dec 2014 11:53:44 -0500 In-Reply-To: <87zjao2jgo.fsf@yeeloong.lan> (Mark H. Weaver's message of "Tue, 16 Dec 2014 01:32:23 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org (This is the continuation of a thread about the memory requirements of job evaluation on Hydra.) Here=E2=80=99s a run in conditions similar to those of Hydra: --8<---------------cut here---------------start------------->8--- $ \time -v guile -l build-aux/hydra/gnu-system.scm -c '(use-modules (guix))= (with-store store (hydra-jobs store (list)))' prepending "build-aux/hydra/../.." to the load path ;;; note: source file build-aux/hydra/../../guix/config.scm ;;; newer than compiled /home/ludo/soft/share/guile/site/2.0/guix/con= fig.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling build-aux/hydra/../../guix/config.scm ;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/home/ludo/src/guix= /guix/config.scm.go ;;; note: source file build-aux/hydra/../../guix/store.scm ;;; newer than compiled /home/ludo/soft/share/guile/site/2.0/guix/sto= re.go ;;; compiling build-aux/hydra/../../guix/store.scm ;;; note: source file build-aux/hydra/../../guix/utils.scm ;;; newer than compiled /home/ludo/soft/share/guile/site/2.0/guix/uti= ls.go ;;; compiling build-aux/hydra/../../guix/utils.scm [...] ;;; compiling build-aux/hydra/../../gnu/packages/wdiff.scm ;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/home/ludo/src/guix= /gnu/packages/wdiff.scm.go ;;; compiling build-aux/hydra/../../gnu/packages/gps.scm ;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/home/ludo/src/guix= /gnu/packages/gps.scm.go Command being timed: "guile -l build-aux/hydra/gnu-system.scm -c (use-modu= les (guix)) (with-store store (hydra-jobs store (list)))" User time (seconds): 90.48 System time (seconds): 0.30 Percent of CPU this job got: 103% Elapsed (wall clock) time (h:mm:ss or m:ss): 1:27.40 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 777056 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 3 Minor (reclaiming a frame) page faults: 18296 Voluntary context switches: 7426 Involuntary context switches: 26029 Swaps: 0 File system inputs: 7392 File system outputs: 11936 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 --8<---------------cut here---------------end--------------->8--- So there=E2=80=99s a peak at 758 MiB, which is arguably too much, but far f= rom 5=C2=A0GiB. Each evaluation forces a complete recompilation. However this is apparently not what takes the most memory: --8<---------------cut here---------------start------------->8--- $ \time -v ./pre-inst-env guile -l build-aux/hydra/gnu-system.scm -c '(use-= modules (guix)) (with-store store (hydra-jobs store (list)))' ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/ludo/src/guix/build-aux/hydra/gnu-system.scm prepending "build-aux/hydra/../.." to the load path ;;; compiled /home/ludo/.cache/guile/ccache/2.0-LE-8-2.0/home/ludo/src/guix= /build-aux/hydra/gnu-system.scm.go prepending "build-aux/hydra/../.." to the load path Command being timed: "./pre-inst-env guile -l build-aux/hydra/gnu-system.s= cm -c (use-modules (guix)) (with-store store (hydra-jobs store (list)))" User time (seconds): 45.26 System time (seconds): 0.14 Percent of CPU this job got: 104% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:43.48 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 798912 --8<---------------cut here---------------end--------------->8--- The latter is faster, but uses about as much memory as the auto-compilation variant. For reference, loading all the package modules takes around 180=C2=A0MiB: --8<---------------cut here---------------start------------->8--- $ \time -v guix build foobarbaz guix build: error: foobarbaz: unknown package Command exited with non-zero status 1 Command being timed: "guix build foobarbaz" User time (seconds): 0.31 System time (seconds): 0.03 Percent of CPU this job got: 64% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.53 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 181376 --8<---------------cut here---------------end--------------->8--- Anyway, we need to do actual heap profiling now. :-) Ludo=E2=80=99.