From owner-freebsd-questions@FreeBSD.ORG Wed Aug 30 22:22:37 2006 Return-Path: X-Original-To: freebsd-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 C4DA916A4F1 for ; Wed, 30 Aug 2006 22:22:37 +0000 (UTC) (envelope-from jordilin@gmail.com) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF06F43D49 for ; Wed, 30 Aug 2006 22:21:46 +0000 (GMT) (envelope-from jordilin@gmail.com) Received: by nz-out-0102.google.com with SMTP id 13so222457nzn for ; Wed, 30 Aug 2006 15:21:41 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=kTw/wVDChRqwB3Cb+aDpmPpKKjHAG1Dcj72Ra2ej1ofx7BEZtrp73ugnYa1wMT4BXIV1D9jFpQ/cBjfBSteV+KFYRsGfcVdzgcUEUAqByYPNhg6RKC4AFviW0FZuh5wdkScg0lbJKH0I3W/kPh6T91ddM/P8pliDpZbebkMQIPk= Received: by 10.64.148.8 with SMTP id v8mr232850qbd; Wed, 30 Aug 2006 15:21:41 -0700 (PDT) Received: by 10.65.231.11 with HTTP; Wed, 30 Aug 2006 15:21:40 -0700 (PDT) Message-ID: <94ff3700608301521r2f8f9476jdc0a30602b39bb21@mail.gmail.com> Date: Thu, 31 Aug 2006 00:21:41 +0200 From: "Jordi Carrillo" To: freebsd-questions@freebsd.org In-Reply-To: <94ff3700608301520o323feed3r342d9a92ac644d02@mail.gmail.com> MIME-Version: 1.0 References: <94ff3700608301302n13f9aabcs935fbe6403601d30@mail.gmail.com> <20060830205239.43472.qmail@web83112.mail.mud.yahoo.com> <94ff3700608301520o323feed3r342d9a92ac644d02@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Fwd: SMP detection 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: Wed, 30 Aug 2006 22:22:38 -0000 2006/8/30, backyard : > > --- Jordi Carrillo wrote: > > > 2006/8/30, backyard : > > > > > > > > > > > > --- Jordi Carrillo wrote: > > > > > > > I've read that SMP should be disabled for > > > > performance issues (I did not know > > > > that before installing freebsd). I have a P4 > > 3GHz > > > > with hyperthreading > > > > technology. I have the SMP-GENERIC kernel and it > > > > only launches one cpu. So, > > > > I've decided to disable SMP from BIOS. Is that > > ok?, > > > > knowing that I have a > > > > Smp enabled kernel? or should I install one > > without > > > > smp? If so, is there a > > > > way to install one already precompiled? > > > > Thanks in advance > > > > > > > > -- > > > > http://jordilin.wordpress.com > > > > _______________________________________________ > > > > 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" > > > > > > > > > > if the system runs with one cpu now and you don't > > > enable smp with HT with the sysctl variable then > > you > > > should be ok. If your not doing SMP then > > recompiling > > > the kernel for single processor mode will make > > things > > > run a little quicker because the SMP code won't > > come > > > into play. > > > > > > with HT disabling in FreeBSD is more for the > > security > > > issues about a potential exploit whereby one > > process > > > in one pipe can access the priveledged information > > of > > > a process in another pipe because the two cores > > share > > > one processor cache and thus one cache table. To > > my > > > knowledge this hasn't been exploited yet. > > > > > > If you just install the generic kernel you it > > should > > > be only the uniprocessor one. I would just do a: > > > > > > cd /usr/src && make buildworld && make > > > KERNCONF=GENERIC buildkernel && make > > KERNCONF=GENERIC > > > installkernel > > > > > > as opposed to a binary version assuming you > > haven't > > > updated yet you won't have to install world but I > > > believe it must have the build in the source tree > > to > > > build a kernel. On your P4 though the difference > > > between SMP and uniproc may not be worth the > > trouble > > > because I don't think much of a gain would be > > made. on > > > a P1 a much different story... > > > > > > if you aren't concerned with bad users or hackers > > > hitting the box I would just enable HT with the > > sysctl > > > variable. This will not make things run slower at > > all, > > > just (in theory) less secure, which is why the > > > veriable was created in the first place as I > > recall. > > > If you are concerned I would wait until you update > > > your system and then just build a GENERIC/CUSTOM > > > kernel without the SMP option set. > > > > > > > > > -brian > > > > > > > > > I will disable smp from bios. If I have a smp > > kernel, I suppose there will > > be no problem after all. Would that be ok? > > The problem with having SMP enabled is that the smp > > kernel only detects one > > cpu and the system monitor only features one cpu as > > well as gkrellm (in > > Linux it shows two cpus). When compiling the system > > monitor shows the cpu at > > a maximum of 50%, so what's going on with the other > > 50%? > > writing machdep.hlt_logical_cpus to 2 in loader.conf > > does not solve > > anything. > > -- > > machdep.hyperthreading_allowed=1 in loader.conf > > from my reading on the web... > > is the variable you should probably be setting, the > other variable will disable cpu's on the system or > limit how many are used. It does not turn on HT. Linux > does not have an option like this to disable HT, I > believe it must be passed to the kernel at boot and I > don't know what the exact switch is but the Linux > community is not as concerned with the potential > exploit as the *BSD community is and so they let HTs > run under their SMP kernel. > > 50% is running idle, this is pretty normal, At least > on the systems I've seen when it is building the > system. You have to remember most of compiling is > reading code and libraries then putting it together > and back on the hard drive. Compiling is I/O intensive > more then CPU intensive. If you set > > MAKEOPTS="-j5" > > in make.conf you will compile quicker use more cpu > power, but it will maybe spike around 80%. > > usually this is set by 2X CPU_CORES +1 but it makes my > dual p3 550Mhz Xeon build a system with the > quickness... You maybe able to get away with "-j9" as > my little formula might be based on Linux more then > BSD and I know generally BSD allows for more make > processes to be going at once. maybe 4x CPU_CORE +1 is > more in order. Experiment until your loaded as high as > you want to, but its nice to have Gnome/KDE going > while you're building a system and watching a movie; > so having 50% to play with isn't a bad thing... > > -brian > Yes, having only 50% on compiling, let's you do other tasks, which is great if the soft to compile is very large such as openoffice and you only have one computer at home. -- http://jordilin.wordpress.com -- http://jordilin.wordpress.com