From owner-freebsd-questions@FreeBSD.ORG Thu Apr 24 20:21:20 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2E871065672 for ; Thu, 24 Apr 2008 20:21:20 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.228]) by mx1.freebsd.org (Postfix) with ESMTP id DC0148FC16 for ; Thu, 24 Apr 2008 20:20:44 +0000 (UTC) (envelope-from naylor.b.david@gmail.com) Received: by hu-out-0506.google.com with SMTP id 28so12532hub.8 for ; Thu, 24 Apr 2008 13:18:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:organization:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:message-id; bh=6MI1OaxI3iiRzs6QRuGIT4QHzbXZ0e4UUmLnFd9Fjlc=; b=Uu4oOGW2poihC5Ak1zQK37jpu+6vDo1zgFHrmhDyfFypIHTjPTFt6s8pGMHQf35n9B9nw1z2VXrIfX6wxmMXKvLLeZspWzTHYWGv9vDbaSOCjMLuxfVNPsrZvaUAJZ80jTEt8sEdiDkQwj/7iy4QPGTJfZwg9Eazu8Xd8hWXsj8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:organization:to:subject:date:user-agent:mime-version:content-type:content-transfer-encoding:message-id; b=panTPIVECXmMc6pFZuL7koRyHuQ9Ze+rqqJrb6m2Y+/InyD09r99vMHGg/Ih1tGKMqqYFqdI9WHRua6d93obzHXhqZ59auSceA2TsqxkbemEoXP0j4b3ZjSUJRmNL/JFDXT75bxlblWiu8pNix2y2CBYGc5rpt2y5FeIXmrKUBc= Received: by 10.86.100.19 with SMTP id x19mr160153fgb.53.1209067287698; Thu, 24 Apr 2008 13:01:27 -0700 (PDT) Received: from ?0.0.0.0? ( [196.34.241.123]) by mx.google.com with ESMTPS id b17sm1742712fka.4.2008.04.24.13.01.24 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Apr 2008 13:01:27 -0700 (PDT) From: David Naylor Organization: Private To: freebsd-questions@freebsd.org Date: Thu, 24 Apr 2008 21:58:22 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart4248026.QdsbbB2Shf"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200804242158.27132.naylor.b.david@gmail.com> Subject: Performance research X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Apr 2008 20:21:21 -0000 --nextPart4248026.QdsbbB2Shf Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi, (If you want to skip to the questions (since this is a questions mailing=20 list :-) please see the 2nd last paragraph) I am interested in the performance difference of using either -Os or -O2. = =20 =46rom my preliminary research I have found that in most cases -Os=20 outperforms -O2 (and produces smalled binaries). =20 However this is only in a very isolated situation and does not make any cas= e=20 for a system wide change therefore I would like to run some experiments to= =20 measure the difference between the two flags. =20 I plan to use a live CD (with a system using 3GB) and having both the sourc= e=20 and object tree in memory (so as to avoid the harddrive influencing the=20 times). Since the CD is very small I am expecting caching to eliminate any= =20 influence of the slow CD read times of any of the files required to build=20 world. =20 The tests will be automated by scripts with two CD's, the first with -Os an= d=20 the second with -O2 binaries for the kernel and world (both amd64). I am=20 running an Intel Core 2 Duo 2.2 and 3GB of ram (as mentioned before). I am= =20 hoping that only the execution speed will be measured without any other=20 factors influencing (such a lack of memory [and thus -Os having the=20 advantage]) the results. =20 Onto the questions: 1) Is there any other (better) tool I should use to measure the performance= of=20 building world (other than time)? 2) Since (I think) all of FreeBSD sources of aliassing safe (I have been=20 running a system without -fno-strict-aliassing and optimised for a while=20 without a problem) should I leave it out of the build flags (i.e.=20 CFLAGS=3D-Os -pipe) 3) Any other suggestions on refining this experiment? 4) Should this experiment produce potential, or conclusive, results any oth= er=20 suggestions of experiments to run (perhaps a database or other flags?)=20 I will be posting my results (possible wiki page, or a particular mailing=20 list) after this weekend. =20 Thank you for your time. =20 David --nextPart4248026.QdsbbB2Shf Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBIEOZjUaaFgP9pFrIRAvX7AJ4++t7wp6tNmnIwv2rgxJvYL5iWIQCaA62d m8PikFqzg7WPXRUIiqJs/m4= =ftWu -----END PGP SIGNATURE----- --nextPart4248026.QdsbbB2Shf--