15cd4 Intel Hyper-Threading & FreeBSD - The FreeBSD Forums
The FreeBSD Forums  

Go Back   The FreeBSD Forums > Base System > System Hardware

System Hardware Internal storage, motherboards, PCI cards, stuff inside the case.

Reply
 
Thread Tools Display Modes
  #1  
Old March 2nd, 2009, 17:52
Graaf_van_Vlaanderen Graaf_van_Vlaanderen is offline
Member
 
Join Date: Feb 2009
Location: Halle, Belgium
Posts: 198
Thanks: 16
Thanked 8 Times in 6 Posts
Default Intel Hyper-Threading & FreeBSD

I read some articles how this can affect security. How does it affect performance in FreeBSD? What are your experiences/recommendations? Which (kind of) applications do benefit from hyper-threading?

Last edited by DutchDaemon; January 30th, 2012 at 17:57.
Reply With Quote
  #2  
Old March 2nd, 2009, 18:38
mk mk is offline
Member
 
Join Date: Nov 2008
Posts: 300
Thanks: 9
Thanked 16 Times in 17 Posts
Default

you can check this as a start.
Reply With Quote
  #3  
Old March 2nd, 2009, 23:58
Graaf_van_Vlaanderen Graaf_van_Vlaanderen is offline
Member
 
Join Date: Feb 2009
Location: Halle, Belgium
Posts: 198
Thanks: 16
Thanked 8 Times in 6 Posts
Default

Thanks for the link.
I did some tests on my own on a DL360 G4 single 3.4GHz CPU
(1MB L2 cache) and have the impression that it's better to switch off hyper-threading for applications like Octave, which invokes Gnuplot while executing the script.
Also 'unixbench' gives better results, with hyper-threading disabled.
Reply With Quote
  #4  
Old March 3rd, 2009, 00:22
hydra hydra is offline
Member
 
Join Date: Nov 2008
Location: Slovakia
Posts: 272
Thanks: 18
Thanked 24 Times in 21 Posts
Default

My former computer with P4 provided much worse results in Quake3 when HT was enabled. The idea behind HT may be nice, but the reality seems to be somewhere else...
Reply With Quote
  #5  
Old March 3rd, 2009, 01:57
lumiwa
Guest
 
Posts: n/a
Default

I have a CPU: Intel(R) Pentium(R) 4 CPU 2.60GHz (2605.92-MHz 686-class CPU) and with HT enable it is faster and when I compailing for example I can working with GIMP, OO without problem.
Reply With Quote
  #6  
Old March 3rd, 2009, 08:31
mk mk is offline
Member
 
Join Date: Nov 2008
Posts: 300
Thanks: 9
Thanked 16 Times in 17 Posts
Default

AFAIK HT in newest intel cpu is redesign from scratch i.e P4 HT can't be compare with i7 (that's how my small research end but i didn't manage to get some specs of what exactly is HT from intel site, yes there is wikipedia but ...
Reply With Quote
  #7  
Old March 3rd, 2009, 19:47
hydra hydra is offline
Member
 
Join Date: Nov 2008
Location: Slovakia
Posts: 272
Thanks: 18
Thanked 24 Times in 21 Posts
Default

@lumiwa
How did you notice it's faster ? In what sort of applications ?

@mk
HT splits a single core into 2 virtual CPUs, so the OS scheduler believes there are two processors. If two operations use disjoint function blocks, they can be executed in parallel. There are some security considerations since they both use the same cache. This is made obsolete by Core 2 Duo and others, where you don't pretend to have a multitude of function blocks, but you really have more cores.
Reply With Quote
  #8  
Old March 4th, 2009, 13:49
Graaf_van_Vlaanderen Graaf_van_Vlaanderen is offline
Member
 
Join Date: Feb 2009
Location: Halle, Belgium
Posts: 198
Thanks: 16
Thanked 8 Times in 6 Posts
Default

Here are some results from unixbench on a DL360 G4 with a Xeon 3.4GHz (1MB L2):

I: Hyper-threading enabled:

INDEX VALUES
TEST BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 9784314.6 838.4
Double-Precision Whetstone 55.0 1874.8 340.9
Execl Throughput 43.0 1322.2 307.5
File Copy 1024 bufsize 2000 maxblocks 3960.0 31338.0 79.1
File Copy 256 bufsize 500 maxblocks 1655.0 32655.0 197.3
File Copy 4096 bufsize 8000 maxblocks 5800.0 32812.0 56.6
Pipe Throughput 12440.0 621656.8 499.7
Pipe-based Context Switching 4000.0 93648.1 234.1
Process Creation 126.0 4380.0 347.6
Shell Scripts (8 concurrent) 6.0 326.3 543.8
System Call Overhead 15000.0 537310.4 358.2
=========
FINAL SCORE 272.5



II: Hyper-threading disabled:

TEST BASELINE RESULT INDEX

Dhrystone 2 using register variables 116700.0 9808714.4 840.5
Double-Precision Whetstone 55.0 1876.3 341.1
Execl Throughput 43.0 1366.9 317.9
File Copy 1024 bufsize 2000 maxblocks 3960.0 26512.0 66.9
File Copy 256 bufsize 500 maxblocks 1655.0 27417.0 165.7
File Copy 4096 bufsize 8000 maxblocks 5800.0 32259.0 55.6
Pipe Throughput 12440.0 621646.8 499.7
Pipe-based Context Switching 4000.0 128596.4 321.5
Process Creation 126.0 5117.5 406.2
Shell Scripts (8 concurrent) 6.0 395.0 658.3
System Call Overhead 15000.0 540504.8 360.3
=========
FINAL SCORE 281.2
Reply With Quote
  #9  
Old March 4th, 2009, 14:47
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Member
 
Join Date: Nov 2008
Location: Eindhoven, Netherlands
Posts: 794
Thanks: 19
Thanked 123 Times in 93 Posts
Default

HyperThreading should preform better when you have multiple applications running, in a typical Windows environment you often have quite a bit of stuff running in the background, and HT should really help in those cases -- At least, this is what our Intel rep told me during the i7 briefing.
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote
  #10  
Old March 4th, 2009, 19:21
Mel_Flynn Mel_Flynn is offline
Member
 
Join Date: Nov 2008
Location: Drachten, Netherlands
Posts: 379
Thanks: 7
Thanked 74 Times in 57 Posts
Default

Hmm, interesting results. Concurrent shellscripts and pipe-based context switching is expected to be slower, but I didn't expect the file copies to be significantly faster. Did you reboot and give machine cooldown time before starting the second test?
Reply With Quote
  #11  
Old March 4th, 2009, 20:13
phoenix's Avatar
phoenix phoenix is offline
Moderator
 
Join Date: Nov 2008
Location: Kamloops, BC, Canada
Posts: 3,141
Thanks: 43
Thanked 702 Times in 579 Posts
Default

Quote:
Originally Posted by Carpetsmoker View Post
HyperThreading should preform better when you have multiple applications running, in a typical Windows environment you often have quite a bit of stuff running in the background, and HT should really help in those cases -- At least, this is what our Intel rep told me during the i7 briefing.
HyperThreading on P4/Core/Core2 CPUs is very different from HyperThreading on i7 CPUs.

The usefulness of HTT on P4/Core/Core2 is very hit-and-miss. Some workloads benefit, some don't. The main reason is that the way the CPU units are split is not uniform, and if you don't have an HTT-aware CPU scheduler (ie one that things both logical CPUs are identical) you can severely hamper performance.

Supposedly, HTT on i7 is smarter, and the CPU can properly balance instructions across the logical CPUs. In theory, HTT on i7 should be useable for all workloads.
Reply With Quote
  #12  
Old March 4th, 2009, 22:04
Graaf_van_Vlaanderen Graaf_van_Vlaanderen is offline
Member
 
Join Date: Feb 2009
Location: Halle, Belgium
Posts: 198
Thanks: 16
Thanked 8 Times in 6 Posts
Default

I did one of the tests yesterday and the other (disabled) today. In both cases the machine was running already for about an
hour and no other programs were running during this test.
Some extra info. Both hard disks (one of them is new!) are in RAID1 and the used memory is DDR (PC2700).

I remember about 5 years ago when moving from Solaris 8 to Red Hat for Cadence design tools, on all the simulation servers hyper-threading was enabled. At that time we didn't have a MP simulator available. So if you were the only one running a long simulation of twelve hours on a dual (P4 like) Xeon machine you had the impression that only 25 percent of this machine was used.
Reply With Quote
  #13  
Old March 5th, 2009, 02:04
lumiwa
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by hydra View Post
@lumiwa
How did you notice it's faster ? In what sort of applications ?
Example: postmaster -a. There are 5 app for update and it start. Than I start KDE, Gimp and working with pictures and with Amarok listen music and use Opera for surfing. Everything run smooth but if I do same with HT disabled than I have problem with music, waiting for Gimp, surfing...and OO running too.

I didn't ran any benchamrk just my personal opinion (feeling )
I did try with HT disabled about one week just for test and than went back to HT enabled.
Reply With Quote
  #14  
Old January 30th, 2012, 04:10
estrabd's Avatar
estrabd estrabd is offline
Member
 
Join Date: Nov 2008
Location: Houston, Tx
Posts: 155
Thanks: 36
Thanked 5 Times in 5 Posts
Default

I know this is an old thread, but I am doing research on HT and FreeBSD - because I am looking at setting up a Xeon-based system (Dell PowerEdge 1750) with HT support. HT really just interleaves memory fetches with instructions between two logical threads of execution - as said above, benefits are greatly dependent on the workload.
__________________
www/vee Tiny CLI blogging tool
lang/qore A scripting language designed for SMP scalability
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel DG43NB & 82567V Ethernet Controller pasha System Hardware 5 May 22nd, 2009 07:26
FreeBSD threading model bsd_newbie Porting New Software 2 February 8th, 2009 18:16
libc.so.6 && FMOD && FreeBSD Sa3r Userland Programming & Scripting 6 February 5th, 2009 11:54
FreeBSD 7.0-RELEASE-p4 && xorg-7.3_2 huge memory leak TheFeaR X.Org 17 November 27th, 2008 10:54
Python Threading question lme@ Userland Programming & Scripting 8 November 26th, 2008 17:23


All times are GMT +1. The time now is 23:36.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
The mark FreeBSD is a registered trademark of The FreeBSD Foundation and is used by The FreeBSD Project with the permission of The FreeBSD Foundation.
Web protection and acceleration provided by CloudFlare
0