From owner-freebsd-net@FreeBSD.ORG Thu Jan 10 01:38:47 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F307116D for ; Thu, 10 Jan 2013 01:38:46 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from nm40-vm4.bullet.mail.ne1.yahoo.com (nm40-vm4.bullet.mail.ne1.yahoo.com [98.138.229.180]) by mx1.freebsd.org (Postfix) with ESMTP id B5023D04 for ; Thu, 10 Jan 2013 01:38:46 +0000 (UTC) Received: from [98.138.90.51] by nm40.bullet.mail.ne1.yahoo.com with NNFMP; 10 Jan 2013 01:38:39 -0000 Received: from [98.138.89.254] by tm4.bullet.mail.ne1.yahoo.com with NNFMP; 10 Jan 2013 01:38:39 -0000 Received: from [127.0.0.1] by omp1046.mail.ne1.yahoo.com with NNFMP; 10 Jan 2013 01:38:39 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 922599.68529.bm@omp1046.mail.ne1.yahoo.com Received: (qmail 12554 invoked by uid 60001); 10 Jan 2013 01:38:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1357781919; bh=qq0IFnL1Texq09Iy5LNjOnH6taG99dj/wQNSFiiOBQU=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=2fC0rdUOHsKdeXRlsoe2JqZBCdsPdiXLu7eRTWVvWCmPOwJeqKWa+/cPSVc/142cX/9wFb6iPWM/HVGPw8TAkpgHbi5Tsk3X6fYLEa4/QhK66KX0gvcWqePgeQjQEE2hbIyv/6Ql4F5+zIbtpXFEr0hjfiF8SEPCWnHKCMzSkVk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=f+zAPhHFTGwK7iIzg/CTZNCgKBFhdq4QQo39XMZMB3akhmBWagNHAlX+xlHZcdYULynYi8AtfzxGsaBS4rv5Y6N9BSFK32/lt91eW1uImBC1Qm41TXVrWDMKpTT51C4BVfqV3bub5sFxA/DtAaNrJgkd0nev2kySWEBtzvM5AaI=; X-YMail-OSG: XIRz4usVM1mbrnEIlr0DqIIRytNtcOOinn5W30uuwqDaeB0 tUhCVrRvJlpBmUy8TARNfGf0NbS9yX2LyVIpXTlT9nKb3K7tFfhruMBCYF9R FzC5FUxgKUfT8j_.YW.kBvu.J2K9ybr6BQLTAhQYLEcdBvswd4BfUkLU8ZKk hylSHgDn0Wx1hlULLcy4uHVRvC.J5bwGfp5vdj4YJBZ_xuHzTRKXX6rAcjiD Hu1kyBGHp9Gs4plcdc7mI4EaciU5xdgBnp.NwJxFI2HpRW9Bxeo5qv5oM3yo djeCfw8xx4kAYZDJ2k8K7JFr.FXwnJep2nRzajewK3CX6BwfMI2I39wbIpDi 6w.qx1kcwoI4rFWxOCyT.823496axlAV1M_r6cfZsPq3HcSOoO5WO.1J.pjv hMh31n3oVqsFTHGrBaZI.glOG90UZFt0vCC4NvTdf7ARf6435yU_zakEG9cZ hNS2HkyB_BxUkayC6ILnz1CQGc0HjnLBNwdwvWA1O.meuFFCYdS09amMcn38 x.QUuBBIxLw6VzsRpzA4FXUe6Nb016A-- Received: from [174.48.128.27] by web121602.mail.ne1.yahoo.com via HTTP; Wed, 09 Jan 2013 17:38:39 PST X-Rocket-MIMEInfo: 001.001, DQoNCi0tLSBPbiBXZWQsIDEvOS8xMywgQmFybmV5IENvcmRvYmEgPGJhcm5leV9jb3Jkb2JhQHlhaG9vLmNvbT4gd3JvdGU6DQoNCj4gRnJvbTogQmFybmV5IENvcmRvYmEgPGJhcm5leV9jb3Jkb2JhQHlhaG9vLmNvbT4NCj4gU3ViamVjdDogUmU6IFRvIFNNUCBvciBub3QgdG8gU01QDQo.IFRvOiAiTWFyayBBdGtpbnNvbiIgPGF0a2luOTAxQGdtYWlsLmNvbT4NCj4gQ2M6IGZyZWVic2QtbmV0QGZyZWVic2Qub3JnDQo.IERhdGU6IFdlZG5lc2RheSwgSmFudWFyeSA5LCAyMDEzLCAxOjA4IFBNDQo.IA0KPiABMAEBAQE- X-Mailer: YahooMailClassic/15.1.2 YahooMailWebService/0.8.130.494 Message-ID: <1357781919.7451.YahooMailClassic@web121602.mail.ne1.yahoo.com> Date: Wed, 9 Jan 2013 17:38:39 -0800 (PST) From: Barney Cordoba Subject: Re: To SMP or not to SMP To: freebsd-net@freebsd.org In-Reply-To: <1357754924.51744.YahooMailClassic@web121601.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2013 01:38:47 -0000 --- On Wed, 1/9/13, Barney Cordoba wrote: > From: Barney Cordoba > Subject: Re: To SMP or not to SMP > To: "Mark Atkinson" > Cc: freebsd-net@freebsd.org > Date: Wednesday, January 9, 2013, 1:08 PM >=20 >=20 > --- On Tue, 1/8/13, Mark Atkinson > wrote: >=20 > > From: Mark Atkinson > > Subject: Re: To SMP or not to SMP > > To: freebsd-net@freebsd.org > > Date: Tuesday, January 8, 2013, 11:29 AM > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > >=20 > > On 01/07/2013 18:25, Barney Cordoba wrote: > > > I have a situation where I have to run 9.1 on an > old > > single core > > > box. Does anyone have a handle on whether it's > better > > to build a > > > non SMP kernel or to just use a standard SMP build > with > > just the > > > one core? Thanks. > >=20 > > You can build a SMP kernel, but you'll get better > > performance (in my > > experience) with SCHED_4BSD on single cpu than with > ULE. > >=20 >=20 > I've tested the 2 schedulers on an SMP kernel with 1 core. I > don't have > a 1 core system to test with so I'm using an E5520 > with=A0 1 core enabled. >=20 > Bridging a controlled test (curl-loader doing a web-load > test with 100=20 > users that consistently generates 870Mb/s and 77Kpps, I see > the following: >=20 > top -SH >=20 > ULE: >=20 > idle: 74.85% > kernel {em1 que} 17.68% > kernel {em0 que} 5.86% > httpd: .49%=A0=20 >=20 > 4BSD: >=20 > idle: 70.95% > kernel {em1 que} 18.07% > kernel {em0 que} 4.44% > httpd: .93% >=20 > Note that the https is a monitor I'm running. >=20 > so it appears that theres 7% of usage missing (all other > apps show 0% > usage).=20 >=20 > If i had to guess just looking at the numbers, it seems that > 4BSD might=20 > do better with the interrupt level stuff, and not as good > with user=20 > level context switching. I think they're close enough to > stick with ULE > so I can just use a stock kernel. >=20 > One thing that bothers me is the idle sits at 100% when > other tasks are=20 > registering values under light loads, so it's certainly not > all that=20 > accurate. >=20 > BC Ok, thanks to J Baldwin's tip I got a NON-SMP kernel running with some interesting results. Here's all 4 tests: I've tested the 2 schedulers on an SMP kernel with 1 core. I don't have a 1 core system to test with so I'm using an E5520 with 1 core enabled. Bridging a controlled test (curl-loader doing a web-load test with 100=20 users that consistently generates 870Mb/s and 77Kpps, I see the following: top -SH ULE (SMP): idle: 74.85% kernel {em1 que} 17.68% kernel {em0 que} 5.86% httpd: .49% =20 4BSD (SMP): idle: 70.95% kernel {em1 que} 18.07% kernel {em0 que} 4.44% httpd: .93% 4BSD (NON-SMP): idle: 72.95% kernel {em1 que} 15.04% kernel {em0 que} 6.10% httpd: 1.17% ULE (NON-SMP): idle: 76.17% kernel {em1 que} 16.99% kernel {em0 que} 5.18% httpd: 1.66% A kernel with SMP off seems to be a bit more efficient. A better test would be to have more stuff running, but Im about out of time on this project. BC