Date: Sat, 4 Oct 2003 13:04:35 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Richard Coleman <richardcoleman@mindspring.com> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: Hyperthreading slowdown Message-ID: <20031004200435.GA60432@rot13.obsecurity.org> In-Reply-To: <3F7F1D63.2010703@mindspring.com> References: <Pine.LNX.4.58.0310041623250.6065@artax.karlin.mff.cuni.cz> <20031004190251.GA60026@rot13.obsecurity.org> <3F7F1D63.2010703@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 04, 2003 at 03:20:03PM -0400, Richard Coleman wrote: > Kris Kennaway wrote: > >On Sat, Oct 04, 2003 at 04:39:03PM +0200, Mikulas Patocka wrote: > >>I installed FreeBSD 4.9RC1 on P4 3GHz with hyperthreading and I see > >>drastic slowdown when kernel with hyperthreading is booted. For example > >>program compilation took this time: > >> > >>hyperthreading kernel, make -j 1 --- 1:09 > >>hyperthreading kernel, make -j 2 --- 0:42 > >>singlethreading kernel, make -j 1 --- 0:45 > >>singlethreading kernel, make -j 2 --- 0:41 > >> > >>Compilation does very few system calls so when I compile with only one > >>process (-j 1), it should be as fast as with singlethreading kernel. Do > >>you have any idea why is it so slow? > > > >Do you realise that hyperthreading !=3D a secret extra CPU in your syste= m? > > > >Kris >=20 > I didn't see anywhere in the message where he implied that. To me, the= =20 > interesting thing is that there is such a larger difference between the= =20 > compile time for -j1 and -j2 when using hyperthreading as compared to=20 > the difference between -j1 and -j2 for a single threaded kernel. It's=20 > over a 50% slowdown. Yes, that's because (as discussed in the archives) the kernel treats it like an extra, completely decoupled physical CPU and schedules processes on it without further consideration. This is presumably the cause of the slowdown, because it's only efficient to use the virtual CPU under certain workload patterns. HTT is not magic performance beans. Kris --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/fyfTWry0BWjoQKURAlBWAKD3sjB59L46XLP+m6bkP7IYbc9aCQCfX278 eZSzkqA5MYRYYmTByyF81zg= =XUkm -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031004200435.GA60432>