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.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "[email protected]"

Reply via email to