From owner-freebsd-questions@FreeBSD.ORG Thu Sep 22 07:23:53 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 48D5A16A41F for ; Thu, 22 Sep 2005 07:23:53 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFC9B43D46 for ; Thu, 22 Sep 2005 07:23:52 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by zproxy.gmail.com with SMTP id z31so110113nzd for ; Thu, 22 Sep 2005 00:23:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fy2VczynA5xhvyTbMpnbo34rW8XTl050U3/uoENqlWQ3rBohhKwHDOWEJTcANcoYjkUgFImMT55Fb76nhxZ1VVJp0DVDkuNhpmFIXJBloyq940GTqN31WwNWlcKZJoX8jeQWmMyteZOBgxkBVezB/PQzCbo2EyLVw6rDCa7glhg= Received: by 10.36.8.17 with SMTP id 17mr5366644nzh; Thu, 22 Sep 2005 00:23:52 -0700 (PDT) Received: by 10.37.20.34 with HTTP; Thu, 22 Sep 2005 00:23:52 -0700 (PDT) Message-ID: Date: Thu, 22 Sep 2005 11:23:52 +0400 From: "Andrew P." To: jason In-Reply-To: <43325422.2070308@ec.rr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <43325422.2070308@ec.rr.com> Cc: questions@freebsd.org Subject: Re: AMD Sempron CPUTYPE & Co. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Andrew P." List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Sep 2005 07:23:53 -0000 On 9/22/05, jason wrote: > Andrew P. wrote: > > >Hello! > > > >So I have a Sempron 2500+ CPU, one that supports > >SSE3. What should I place in my /etc/make.conf? I use > >ssh with X11Forward very often, so OpenSSL should > >be compiled to be as fast as it can be on this CPU. > >Here's a part of dmesg: > > > >CPU: AMD Sempron(tm) Processor 2500+ > >(1407.05-MHz 686-class CPU) > >Origin =3D "AuthenticAMD" Id =3D 0x20fc2 Stepping =3D 2 > > > > Features=3D0x78bfbff >PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV, > >PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2> > > Features2=3D0x1 > > AMD Features=3D0xe2500800 >,LM,3DNow+,3DNow> > > > >I want to use SSE3, but I don't want to set CPUTYPE > >to nocona, cause that way compilers won't ever use > >AMD features. Is there a way to tell compilers to use > >every feature I've got? > > > > > >Thanks very much, > >Andrew P. > >_______________________________________________ > >freebsd-questions@freebsd.org mailing list > >http://lists.freebsd.org/mailman/listinfo/freebsd-questions > >To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.= org" > > > > > > > man make.conf and man gcc > > You will be limited by the gcc version on FreeBSD. You can use gcc 4 > for your apps, and all that SSE and 3DNow stuff is not currently > allowed in the kernel. > > I remember ready, maybe on slashdot, where a man did very little work to > do a native port of ssh to native amd64 code and got a hugh speed > boost. Making sure you get a optimized version os ssh like what I > described will make a much bigger difference than just adding amd64 as > your cp type to make.conf. > > Jason I run FreeBSD/i386, not amd64. make.conf, gcc and cpp manpages tell you nothing about the subj. I roamed mailing lists for a few hours and settled on adding "-march=3Dpentium4 -msse3" to CFLAGS and COPTFLAGS. I didn't do any serious benchmarking, but the `top` output feels like sshd got 2-3% performance boost. Will try to recompile with "-mfpmath=3Dsse" later. Also, I tried forwarding X11 over network without SSH, and some things kept lagging. My guess is network connection and my solution is a Gigabit switch; the funny thing is that I have Gb NICs in most of my PCs, but I still use a 100Mb switch.