 |
|
 |
|
Next: Accepted milter-greylist 4.3.4-2 (source i386)
|
| Author |
Message |
External

Since: Oct 27, 2009 Posts: 7
|
(Msg. 1) Posted: Tue Oct 27, 2009 5:31 pm
Post subject: Hyperthreading DECREASES performance? There ought to be a solution Archived from groups: alt>os>linux>ubuntu, others (more info?)
|
|
|
At work, we have some users who ru a multithreaded app, and they need
every single bit of performance we can squeeze from computers.
We are looking into whether we can obtain additional speed performance
from using Intel hyperthreading, as opposed to disabling
hyperthreading.
If we are able to get benefits from hyperthreading, it will be a huge
argument towards converting certain high end users desktops to Linux
from Windows XP.
I wrote a test perl script, that starts several tasks in parallel. All
these tasks perform a certain amount of calculations and exit. The
test completes when all of them exit.
The results were actually a disappointment, if the number of tasks was
equal to the number of physical cores. For the test with four parallel
subprocesses, on four CPUs, It takes longer to run it with HT than
without HT.
I think that I understand why.
What I found is that not all of these parallel tasks finish at the
same time. This happens because often times, two tasks are assigned to
two logical CPUs that share the same core, and some tasks are assigned
to only one core, whereas some cores are idling.
I cannot believe that I am the only guy with this problem, and hope
that the Linux community has found a solution. For example, perhaps
they can assign higher priority to some logical CPUs (say, to 0, 2, 4,
6) and lower priority to others. This way the higher priority ones
would be filled with tunning tasks, before fake "shadow processors"
1,3,5,7 are utilized.
I would like to know if perhaps there is a boot option to this effect.
This is Ubuntu Hardy, 2.6.24 kernel.
Thanks |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2009 Posts: 7
|
(Msg. 2) Posted: Tue Oct 27, 2009 6:17 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-10-27, Brian Gregory [UK] <ng DeleteThis @bgdsv.co.uk> wrote:
>> I would like to know if perhaps there is a boot option to this effect.
>>
>> This is Ubuntu Hardy, 2.6.24 kernel.
>
> One would hope that on any system with hyperthreading processors the
> cores would all be busy with one thread before any would be asked to
> execute a second thread. It seems like common sense to me and I'd be
> amazed if any operating system did differently.
I was actually amazed for the same reason. Possibly, by the time the
kernel is running, it cannot even determine if it is running under
hyperthreaded CPUs or not, and needs to be told that. This is what I
am trying to find out.
I did find, in google, some old discussions involving Ingo and talking
about scheduler improvements. What I have not found is what should I
do to take advantage of these supposed improvements.
i |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2009 Posts: 1
|
(Msg. 3) Posted: Tue Oct 27, 2009 7:20 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a solution [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
"Ignoramus27237" <ignoramus27237.RemoveThis@NOSPAM.27237.invalid> wrote in message
news:d-udnb0465VD6XrXnZ2dnUVZ_jmdnZ2d@giganews.com...
>
> At work, we have some users who ru a multithreaded app, and they need
> every single bit of performance we can squeeze from computers.
>
> We are looking into whether we can obtain additional speed performance
> from using Intel hyperthreading, as opposed to disabling
> hyperthreading.
>
> If we are able to get benefits from hyperthreading, it will be a huge
> argument towards converting certain high end users desktops to Linux
> from Windows XP.
>
> I wrote a test perl script, that starts several tasks in parallel. All
> these tasks perform a certain amount of calculations and exit. The
> test completes when all of them exit.
>
> The results were actually a disappointment, if the number of tasks was
> equal to the number of physical cores. For the test with four parallel
> subprocesses, on four CPUs, It takes longer to run it with HT than
> without HT.
>
> I think that I understand why.
>
> What I found is that not all of these parallel tasks finish at the
> same time. This happens because often times, two tasks are assigned to
> two logical CPUs that share the same core, and some tasks are assigned
> to only one core, whereas some cores are idling.
>
> I cannot believe that I am the only guy with this problem, and hope
> that the Linux community has found a solution. For example, perhaps
> they can assign higher priority to some logical CPUs (say, to 0, 2, 4,
> 6) and lower priority to others. This way the higher priority ones
> would be filled with tunning tasks, before fake "shadow processors"
> 1,3,5,7 are utilized.
>
> I would like to know if perhaps there is a boot option to this effect.
>
> This is Ubuntu Hardy, 2.6.24 kernel.
One would hope that on any system with hyperthreading processors the cores
would all be busy with one thread before any would be asked to execute a
second thread. It seems like common sense to me and I'd be amazed if any
operating system did differently.
--
Brian Gregory. (In the UK)
ng.RemoveThis@bgdsv.co.uk
To email me remove the letter vee. |
|
| Back to top |
|
 |  |
External

Since: Dec 21, 2005 Posts: 308
|
(Msg. 4) Posted: Tue Oct 27, 2009 7:20 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Tue, 27 Oct 2009 17:31:58 -0500, Ignoramus27237 wrote:
> At work, we have some users who ru a multithreaded app, and they need
> every single bit of performance we can squeeze from computers.
>
> We are looking into whether we can obtain additional speed performance
> from using Intel hyperthreading, as opposed to disabling hyperthreading.
>
> If we are able to get benefits from hyperthreading, it will be a huge
> argument towards converting certain high end users desktops to Linux
> from Windows XP.
>
> I wrote a test perl script, that starts several tasks in parallel. All
> these tasks perform a certain amount of calculations and exit. The test
> completes when all of them exit.
>
> The results were actually a disappointment, if the number of tasks was
> equal to the number of physical cores. For the test with four parallel
> subprocesses, on four CPUs, It takes longer to run it with HT than
> without HT.
>
> I think that I understand why.
>
> What I found is that not all of these parallel tasks finish at the same
> time. This happens because often times, two tasks are assigned to two
> logical CPUs that share the same core, and some tasks are assigned to
> only one core, whereas some cores are idling.
>
> I cannot believe that I am the only guy with this problem, and hope that
> the Linux community has found a solution. For example, perhaps they can
> assign higher priority to some logical CPUs (say, to 0, 2, 4, 6) and
> lower priority to others. This way the higher priority ones would be
> filled with tunning tasks, before fake "shadow processors" 1,3,5,7 are
> utilized.
>
> I would like to know if perhaps there is a boot option to this effect.
>
> This is Ubuntu Hardy, 2.6.24 kernel.
>
> Thanks
You should try the experiment with a modern kernel, 2.6.30 for example.
What I've found is that the effect is very small, there is a slight
increase in thoughput and there is almost no decrease in single thread
performance. In the P4 days hyperthreading killed the single thread
performance but improved the total throughput. In the iCore7
hyperthreading makes very little difference either way. I'm running with
HT on because it seems harmless and there is a tiny increase in
thorughput, see the example below,
time make -j 4
13.382u 1.240s 0:06.85 213.4% 0+0k 0+35088io 0pf+0w
time make -j 8
13.446u 1.148s 0:06.44 226.3% 0+0k 0+35088io 0pf+0w |
|
| Back to top |
|
 |  |
External

Since: Nov 02, 2008 Posts: 81
|
(Msg. 5) Posted: Tue Oct 27, 2009 7:20 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a solution [Login to view extended thread Info.] Archived from groups: comp>os>linux>misc (more info?)
|
|
|
On Tue, 27 Oct 2009 17:31:58 -0500, Ignoramus27237 <ignoramus27237.RemoveThis@NOSPAM.27237.invalid> wrote:
>
>At work, we have some users who ru a multithreaded app, and they need
>every single bit of performance we can squeeze from computers.
>
....
>I cannot believe that I am the only guy with this problem, and hope
>that the Linux community has found a solution. For example, perhaps
>they can assign higher priority to some logical CPUs (say, to 0, 2, 4,
>6) and lower priority to others. This way the higher priority ones
>would be filled with tunning tasks, before fake "shadow processors"
>1,3,5,7 are utilized.
>
>I would like to know if perhaps there is a boot option to this effect.
>
>This is Ubuntu Hardy, 2.6.24 kernel.
>
Not a boot option, but a more recent kernel (current -stable branch is
2.6.31.5) has better control with separate controls for multi-core and
HT.
Of course HT is sharing CPU, so it is benefit only for some types
of loads -- somethinmes there's an improvement when it's turned
off, but I think this is BIOS option?
Grant.
--
http://bugsplatter.id.au |
|
| Back to top |
|
 |  |
External

Since: Dec 21, 2005 Posts: 308
|
(Msg. 6) Posted: Tue Oct 27, 2009 7:20 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: alt>os>linux>ubuntu, others (more info?)
|
|
|
On Tue, 27 Oct 2009 18:17:33 -0500, Ignoramus27237 wrote:
> On 2009-10-27, Brian Gregory [UK] <ng.DeleteThis@bgdsv.co.uk> wrote:
>>> I would like to know if perhaps there is a boot option to this effect.
>>>
>>> This is Ubuntu Hardy, 2.6.24 kernel.
>>
>> One would hope that on any system with hyperthreading processors the
>> cores would all be busy with one thread before any would be asked to
>> execute a second thread. It seems like common sense to me and I'd be
>> amazed if any operating system did differently.
>
> I was actually amazed for the same reason. Possibly, by the time the
> kernel is running, it cannot even determine if it is running under
> hyperthreaded CPUs or not, and needs to be told that. This is what I am
> trying to find out.
>
> I did find, in google, some old discussions involving Ingo and talking
> about scheduler improvements. What I have not found is what should I do
> to take advantage of these supposed improvements.
>
> i
The very first thing you need to do is run your tests on the current
kernel, try it on Fedora 12 or Ubuntu 9.10 which have the 2.6.31. If you
don't want to run a beta then try F11 which has a 2.6.30 kernel. The
2.6.24 kernel predates the iCore 7 so it's not going to have any iCore7
optimizations. |
|
| Back to top |
|
 |  |
External

Since: Apr 15, 2009 Posts: 97
|
(Msg. 7) Posted: Tue Oct 27, 2009 7:20 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a solution [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Ignoramus27237 wrote:
> At work, we have some users who ru a multithreaded app, and they need
> every single bit of performance we can squeeze from computers.
>
> We are looking into whether we can obtain additional speed performance
> from using Intel hyperthreading, as opposed to disabling
> hyperthreading.
>
> If we are able to get benefits from hyperthreading, it will be a huge
> argument towards converting certain high end users desktops to Linux
> from Windows XP.
>
> I wrote a test perl script,
why would anyone use PERL for performance... |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2009 Posts: 7
|
(Msg. 8) Posted: Tue Oct 27, 2009 7:23 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-10-28, The Natural Philosopher <tnp.TakeThisOut@invalid.invalid> wrote:
> Ignoramus27237 wrote:
>> At work, we have some users who ru a multithreaded app, and they need
>> every single bit of performance we can squeeze from computers.
>>
>> We are looking into whether we can obtain additional speed performance
>> from using Intel hyperthreading, as opposed to disabling
>> hyperthreading.
>>
>> If we are able to get benefits from hyperthreading, it will be a huge
>> argument towards converting certain high end users desktops to Linux
>> from Windows XP.
>>
>> I wrote a test perl script,
>
> why would anyone use PERL for performance...
>
This was a test. The actual app is in C++. But a perl; script is a
much cleaner test because it is much simpler.
i |
|
| Back to top |
|
 |  |
External

Since: Apr 01, 2009 Posts: 2
|
(Msg. 9) Posted: Tue Oct 27, 2009 7:44 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a solution [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Ignoramus27237 <ignoramus27237 RemoveThis @NOSPAM.27237.invalid> wrote in
news:QtidnSTzfZ1mE3rXnZ2dnUVZ_tadnZ2d@giganews.com:
>>> I wrote a test perl script,
>>
>> why would anyone use PERL for performance...
>>
>
> This was a test. The actual app is in C++. But a perl; script is a
> much cleaner test because it is much simpler.
Then it’s not very representative of the actual task. |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2009 Posts: 7
|
(Msg. 10) Posted: Tue Oct 27, 2009 7:48 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-10-27, General Schvantzkoph <schvantzkoph.TakeThisOut@yahoo.com> wrote:
>
> You should try the experiment with a modern kernel, 2.6.30 for example.
Well, 2.6.24 is only 1.5 years old if you count from its introduction
in Hardy. Hyperthreading is several years old. They talked about
hyperthreading in 2.5 and even 2.4 kernel.
> What I've found is that the effect is very small, there is a slight
> increase in thoughput and there is almost no decrease in single thread
> performance. In the P4 days hyperthreading killed the single thread
> performance but improved the total throughput. In the iCore7
> hyperthreading makes very little difference either way. I'm running with
> HT on because it seems harmless and there is a tiny increase in
> thorughput, see the example below,
>
> time make -j 4
> 13.382u 1.240s 0:06.85 213.4% 0+0k 0+35088io 0pf+0w
>
> time make -j 8
> 13.446u 1.148s 0:06.44 226.3% 0+0k 0+35088io 0pf+0w
Your make test is much more complicated than my parallel script. (in
terms of OS load).
I do believe that when I find the proper scheduler options, I will get
at least 20% benefit from HT.
i |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2009 Posts: 7
|
(Msg. 11) Posted: Tue Oct 27, 2009 8:55 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-10-28, DanS <t.h.i.s.n.t.h.a.t.DeleteThis@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:
> Ignoramus27237 <ignoramus27237.DeleteThis@NOSPAM.27237.invalid> wrote in
> news:QtidnSTzfZ1mE3rXnZ2dnUVZ_tadnZ2d@giganews.com:
>
>>>> I wrote a test perl script,
>>>
>>> why would anyone use PERL for performance...
>>>
>>
>> This was a test. The actual app is in C++. But a perl; script is a
>> much cleaner test because it is much simpler.
>
> Then it?s not very representative of the actual task.
It may not be representative of the actual task, but it is not very
far.
I really do not want the discussion to stray into this area.
i |
|
| Back to top |
|
 |  |
External

Since: Dec 21, 2005 Posts: 308
|
(Msg. 12) Posted: Tue Oct 27, 2009 9:20 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Tue, 27 Oct 2009 19:48:44 -0500, Ignoramus27237 wrote:
> On 2009-10-27, General Schvantzkoph <schvantzkoph.TakeThisOut@yahoo.com> wrote:
>>
>> You should try the experiment with a modern kernel, 2.6.30 for example.
>
> Well, 2.6.24 is only 1.5 years old if you count from its introduction in
> Hardy. Hyperthreading is several years old. They talked about
> hyperthreading in 2.5 and even 2.4 kernel.
2.26.24 is Feb 2008, the iCore7 wasn't introduced until the end of 2008
so there are no iCore7 optimizations in .24, the code that's there is
specific to the P4. You are wasting your time tuning .24, if you are
going to expend any effort you should do it for .31. |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2009 Posts: 7
|
(Msg. 13) Posted: Tue Oct 27, 2009 11:28 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-10-28, General Schvantzkoph <schvantzkoph RemoveThis @yahoo.com> wrote:
> On Tue, 27 Oct 2009 19:48:44 -0500, Ignoramus27237 wrote:
>
>> On 2009-10-27, General Schvantzkoph <schvantzkoph RemoveThis @yahoo.com> wrote:
>>>
>>> You should try the experiment with a modern kernel, 2.6.30 for example.
>>
>> Well, 2.6.24 is only 1.5 years old if you count from its introduction in
>> Hardy. Hyperthreading is several years old. They talked about
>> hyperthreading in 2.5 and even 2.4 kernel.
>
> 2.26.24 is Feb 2008, the iCore7 wasn't introduced until the end of 2008
> so there are no iCore7 optimizations in .24, the code that's there is
> specific to the P4. You are wasting your time tuning .24, if you are
> going to expend any effort you should do it for .31.
General, here's a good paper from Intel:
http://software.intel.com/sites/oss/pdfs/mclinux.pdf
It happens to discuss the exact issue that I am having.
``In the presence of Hyperthreading, when the system has fewer tasks
compared to number of logical CPUs in the system, scheduler must
distribute the load uniformly between the physical packages. This
distribution will avoid scenarios in the system where one physical
package has more than one logical CPU busy and another physical
package is completely idle. Uniform load distribution between physical
packages will lead to lower resource contention and higher
throughput. Presence of Hyperthreading scheduler domain will help the
scheduler achieve the equal load distribution between the physical
packages.''
However, the article says that the kernel should support proper HT
scheduling, but my kernel does not do it.
It discusses 2.6.17 kernel, which is quite a bit older than my 2.6.24.
i |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2009 Posts: 7
|
(Msg. 14) Posted: Tue Oct 27, 2009 11:41 pm
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-10-28, Joe <joe.RemoveThis@spam.hits-spam-buffalo.com> wrote:
> On 2009-10-28, Ignoramus27237 <ignoramus27237.RemoveThis@NOSPAM.27237.invalid> wrote:
>> On 2009-10-28, DanS <t.h.i.s.n.t.h.a.t.RemoveThis@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:
>>> Ignoramus27237 <ignoramus27237.RemoveThis@NOSPAM.27237.invalid> wrote in
>>> news:QtidnSTzfZ1mE3rXnZ2dnUVZ_tadnZ2d@giganews.com:
>>>
>>>>>> I wrote a test perl script,
>>>>>
>>>>> why would anyone use PERL for performance...
>>>>>
>>>>
>>>> This was a test. The actual app is in C++. But a perl; script is a
>>>> much cleaner test because it is much simpler.
>>>
>>> Then it?s not very representative of the actual task.
>>
>> It may not be representative of the actual task, but it is not very
>> far.
>>
>> I really do not want the discussion to stray into this area.
>
> And what DO you want? You are using a kernel that predates your CPU.
> It is NOT optimized to run on your CPU, and will NOT run optimally.
> If you'd like to test the performance, test it on a kernel that has
> been built and optimized for the CPU you are running it on.
OK, you convinced me. I will download and compile a new kernel,
2.6.31.5. It just might help. In fact I am already compiling it. It
has hyperthreading support as a default option, which is encouraging.
i |
|
| Back to top |
|
 |  |
External

Since: May 22, 2009 Posts: 7
|
(Msg. 15) Posted: Wed Oct 28, 2009 3:20 am
Post subject: Re: Hyperthreading DECREASES performance? There ought to be a [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On 2009-10-28, Ignoramus27237 <ignoramus27237.RemoveThis@NOSPAM.27237.invalid> wrote:
> On 2009-10-28, DanS <t.h.i.s.n.t.h.a.t.RemoveThis@r.o.a.d.r.u.n.n.e.r.c.o.m> wrote:
>> Ignoramus27237 <ignoramus27237.RemoveThis@NOSPAM.27237.invalid> wrote in
>> news:QtidnSTzfZ1mE3rXnZ2dnUVZ_tadnZ2d@giganews.com:
>>
>>>>> I wrote a test perl script,
>>>>
>>>> why would anyone use PERL for performance...
>>>>
>>>
>>> This was a test. The actual app is in C++. But a perl; script is a
>>> much cleaner test because it is much simpler.
>>
>> Then it?s not very representative of the actual task.
>
> It may not be representative of the actual task, but it is not very
> far.
>
> I really do not want the discussion to stray into this area.
And what DO you want? You are using a kernel that predates your CPU.
It is NOT optimized to run on your CPU, and will NOT run optimally.
If you'd like to test the performance, test it on a kernel that has
been built and optimized for the CPU you are running it on.
--
Joe - Linux User #449481/Ubuntu User #19733
joe at hits - buffalo dot com
"Hate is baggage, life is too short to go around pissed off all the
time..." - Danny, American History X |
|
| Back to top |
|
 |  |
| Related Topics: | acl and linux - hi, i have to work with acl and linux; how is the best file system to do it ? (i have heard reiserfs but i don't know....
Microsoft/LINUX debate. - Why does people brother having this Microsoft/LINUX mud-slinging thing? I am new to LINUX but installed REDHAT 8..
Multiple CD volume backup solution - Hi all I'm looking for a backup package that will allow me to span multiple CDs and also allow for individual CD..
virus scanner - Hi All was wondering if i can get some idea of what people are useing for virus scanners on Redhat 8. Its sendmail tha...
trailing slash in web urls - ya this may be a lame question but i have just setup apache 2.0.46 and when i connect to http://domain it gets the..
Need advice on linux distro - I Installed Debian Linux on a spare computer 2 months ago, and that was the first time I used linux. I've been using i... |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|