From owner-freebsd-ports@FreeBSD.ORG Thu Sep 8 05:20:10 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45908106564A for ; Thu, 8 Sep 2011 05:20:10 +0000 (UTC) (envelope-from schaecsn@gmx.net) Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by mx1.freebsd.org (Postfix) with SMTP id A93788FC14 for ; Thu, 8 Sep 2011 05:20:09 +0000 (UTC) Received: (qmail invoked by alias); 08 Sep 2011 04:53:26 -0000 Received: from adsl-71-134-240-128.dsl.pltn13.pacbell.net (EHLO keeper.homelinux.org) [71.134.240.128] by mail.gmx.net (mp004) with SMTP; 08 Sep 2011 06:53:26 +0200 X-Authenticated: #548211 X-Provags-ID: V01U2FsdGVkX196cdYSXRN68bGmBZQwiEEabz3UX6q4tp9S5irdl1 Re/3sTamQEBupk Received: by keeper.homelinux.org (Postfix, from userid 1001) id C6E2E1EE8F1; Wed, 7 Sep 2011 21:53:28 -0700 (PDT) From: Stefan Schaeckeler To: freebsd-ports@freebsd.org Message-Id: <20110908045328.C6E2E1EE8F1@keeper.homelinux.org> Date: Wed, 7 Sep 2011 21:53:28 -0700 (PDT) X-Y-GMX-Trusted: 0 Subject: The cost of a source based package system X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: schaecsn@gmx.net List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Sep 2011 05:20:10 -0000 Hi all, please don't take this posting too serious. I was just curious ... Just the other day, I bought a kill-a-watt. Among other things, I measured the "cost of a source based package system", i.e. I was comparing the energy cost of installing ports from source vs binary packages (setup, see below). Case 1: Source based installation Time: 7 hours, 3 min Energy: 0.489 kw*h Price: 4.89 US cent Case 2a: Binary packages based installation Time: 1 hour, 57 min Energy: 0.079 kw*h Price: 0.79 US cent If the computer is constantly running, then we should add the installation time of case 1 to case 2a: Case 2b: Binary packages based installation Time: 7 hours, 3 min Energy: (40/1000)kw*(7.05-1.95)h + 0.079 kw*h = 0.283 kw*h Price: 2.83 US cent Using source based ports is with almost 5 US cents 6.19 times (case 1 vs case 2a) or 1.73 times (case 1 vs case 2b) more expensive than using binary packages :) - Stefan Details: Price: 1 kw*h = 10 US cent. Kill-a-Watt trick: by setting the price per kw to $9.999 (= $10), I could get one more digit of accuracy for the consumed energy by dividing the price by 10. HW: Sony vaio pcg-k23 laptop (pentium 4, 2,8 GHz, huge display). Booted into FreeBSD, it consumes around 40 Watt ("idle"). When compiling programs, the power consumption doubles to somewhat above 80 Watt. Internet connection 768kb/s. SW: Installed 259 ports via this script: --- snip --- date for i in /usr/ports/x11/xorg-minimal\ /usr/ports/x11/xorg-apps\ /usr/ports/x11/xorg-cf-files\ /usr/ports/x11/xorg-docs\ /usr/ports/x11/xorg-libraries\ /usr/ports/shells/bash3\ /usr/ports/print/teTeX\ /usr/ports/editors/emacs\ /usr/ports/editors/joe2\ /usr/ports/multimedia/xmms\ /usr/ports/multimedia/ffmpeg\ /usr/ports/lang/clisp\ /usr/ports/lang/hugs\ /usr/ports/lang/swi-pl\ /usr/ports/lang/llvm-gcc4\ /usr/ports/lang/gnat\ /usr/ports/lang/Gofer\ /usr/ports/x11-toolkits/tk86 do cd $i && yes o | make install clean done date halt -p --- snip --- Similarly, 246 binary packages have been installed via pkg_add -r. pkg_delete /var/db/pkg/* rm -rf /usr/ports/distfiles/ PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/ export PACKAGESITE --- snip --- date for i in xorg-minimal\ xorg-apps\ xorg-cf-files\ xorg-docs\ xorg-libraries\ bash3\ teTeX\ emacs\ joe2\ xmms\ ffmpeg\ clisp\ hugs\ swi-pl\ llvm-gcc4\ gnat\ Gofer\ tk86 do pkg_add -r $i done date halt -p --- snip --- The number of ports and binary packages varies slightly. I don't know why. This only introduces a small error.