| View previous topic :: View next topic |
| Author |
Message |
Andy Guest
|
Posted: Fri Jul 23, 2004 3:47 am Post subject: Delphi + Hyperthreading problems |
|
|
Hi All,
is there anything I need to do or beware of when writing a program which
will be used on a pc with a hyperthreading processor.
I have a program I wrote which works fine in XP with older processors but
refuses to run (ie get the send error report to MS message) on pc's with
late model processors.
If I disable the hyperthreading my program works fine.
Program is in D7pro/ ADO/ Access2k
Are there any compiler options etc I need to set.
Any help is appreciated.
Andy
|
|
| Back to top |
|
 |
robin@ozsoft.com.au Guest
|
Posted: Fri Jul 23, 2004 5:56 am Post subject: Re: Delphi + Hyperthreading problems |
|
|
Andy wrote:
| Quote: | Hi All,
is there anything I need to do or beware of when writing a program which
will be used on a pc with a hyperthreading processor.
I have a program I wrote which works fine in XP with older processors but
refuses to run (ie get the send error report to MS message) on pc's with
late model processors.
If I disable the hyperthreading my program works fine.
Program is in D7pro/ ADO/ Access2k
Are there any compiler options etc I need to set.
Any help is appreciated.
Andy
Hi Andy, |
I don't know about Delphi in particular, but Interbase 6 has issues with
slow initial connection on multiple processor/hyperthreding processor
computers. It does work, just takes a little while. (There is a
regestry setting which can fix that also).
|
|
| Back to top |
|
 |
Lord Crc Guest
|
Posted: Fri Jul 23, 2004 11:46 am Post subject: Re: Delphi + Hyperthreading problems |
|
|
On Fri, 23 Jul 2004 13:17:42 +0930, "Andy" <Andy (AT) no (DOT) mail.please>
wrote:
| Quote: | is there anything I need to do or beware of when writing a program which
will be used on a pc with a hyperthreading processor.
|
Your program must be multithread safe, which it should be anyway.
However multithreading bugs seem to surface a lot sooner when you
actually got multiple cpus running the code.
So, if you got threads, make sure they're accessing things correctly.
- Asbjørn
|
|
| Back to top |
|
 |
Craig Stuntz [TeamB] Guest
|
Posted: Fri Jul 23, 2004 12:18 pm Post subject: Re: Delphi + Hyperthreading problems |
|
|
[email]robin (AT) ozsoft (DOT) com.au[/email] wrote:
| Quote: | I don't know about Delphi in particular, but Interbase 6 has issues
with slow initial connection on multiple processor/hyperthreding
processor computers. It does work, just takes a little while.
|
I'm close to certain this won't be the cause of the problems he's
experiencing with his Access 2000 app.
-CRaig
--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
news server: http://info.borland.com/newsgroups/guide.html
|
|
| Back to top |
|
 |
Dan Downs Guest
|
Posted: Fri Jul 23, 2004 2:47 pm Post subject: Re: Delphi + Hyperthreading problems |
|
|
| Quote: | I have a program I wrote which works fine in XP with older processors but
refuses to run (ie get the send error report to MS message) on pc's with
late model processors.
If I disable the hyperthreading my program works fine.
Program is in D7pro/ ADO/ Access2k
Are there any compiler options etc I need to set.
Any help is appreciated.
|
Older versions of the JCL/JVCL had issues with hyperthreaded cpus. Could be
a component pack that is detecting cpu speed/specs/etc..
DD
|
|
| Back to top |
|
 |
softcoder Guest
|
Posted: Fri Jul 23, 2004 3:48 pm Post subject: Re: Delphi + Hyperthreading problems |
|
|
I wrote a real-time daytrading app in BCB5 a couple years ago. First
customer that had hyperthreading and first customer that had
multi-processors revealed missing critical sections and mutexes are the
access of shared data in my threads. This was the primary reason for all the
problems I had expereinced and was finally resolved after careful logging
etc..
"Andy" <Andy (AT) no (DOT) mail.please> wrote
| Quote: | Hi All,
is there anything I need to do or beware of when writing a program which
will be used on a pc with a hyperthreading processor.
I have a program I wrote which works fine in XP with older processors but
refuses to run (ie get the send error report to MS message) on pc's with
late model processors.
If I disable the hyperthreading my program works fine.
Program is in D7pro/ ADO/ Access2k
Are there any compiler options etc I need to set.
Any help is appreciated.
Andy
|
|
|
| Back to top |
|
 |
Martin Harvey (Demon Acco Guest
|
Posted: Fri Jul 23, 2004 6:13 pm Post subject: Re: Delphi + Hyperthreading problems |
|
|
On Fri, 23 Jul 2004 13:17:42 +0930, "Andy" <Andy (AT) no (DOT) mail.please>
wrote:
| Quote: | Hi All,
is there anything I need to do or beware of when writing a program which
will be used on a pc with a hyperthreading processor.
|
Yes - there are potential issues with resource starvation between the
two threads scheduled to run on a single CPU. Basically, if one of the
threads busy waits (even doing a sleep(0) or "yeild"), then it can
cause serious performance problems for other threads scheduled on the
CPU.
| Quote: | I have a program I wrote which works fine in XP with older processors but
refuses to run (ie get the send error report to MS message) on pc's with
late model processors.
|
This looks more like changes made to modern CPU's to improve security
requirements. ISTR someone mentioning something in some groups about
running a program in "windows 95 compatibility mode" ?? Just a
thought.
| Quote: | If I disable the hyperthreading my program works fine.
|
If you can find an O.S switch to get that particular program to run,
rather than completely disablibg hyperthreading that would probably be
preferable.
MH.
|
|
| Back to top |
|
 |
Andy Guest
|
Posted: Fri Jul 23, 2004 8:55 pm Post subject: Re: Delphi + Hyperthreading problems |
|
|
Hi Dan,
I think you may have hit the nail on the head - I do use jvcl 2.1
I made a small sample app and as soon as I added any jvcl data-aware
components the problem occurred.
Will try installing jvcl 3 and see if that solves the problem.
Thanks
Andy
"Dan Downs" <ddowns (AT) nospam (DOT) online-access.com> wrote
| Quote: | I have a program I wrote which works fine in XP with older processors
but
refuses to run (ie get the send error report to MS message) on pc's with
late model processors.
If I disable the hyperthreading my program works fine.
Program is in D7pro/ ADO/ Access2k
Are there any compiler options etc I need to set.
Any help is appreciated.
Older versions of the JCL/JVCL had issues with hyperthreaded cpus. Could
be
a component pack that is detecting cpu speed/specs/etc..
DD
|
|
|
| Back to top |
|
 |
Robert Rossmair Guest
|
Posted: Sun Jul 25, 2004 9:54 pm Post subject: Re: Delphi + Hyperthreading problems |
|
|
Hi,
Andy wrote:
| Quote: | Hi Dan,
I think you may have hit the nail on the head - I do use jvcl 2.1
I made a small sample app and as soon as I added any jvcl data-aware
components the problem occurred.
|
The cause of the problem is JclSysInfo.GetCpuSpeed, which is
(needlessly) called during JclGraphUtils initialization.
The most simple fix is to replace the first instruction in
JclGraphUtils.SetupFunctions:
// GetCpuInfo(CpuInfo);
CpuInfo := CPUID;
so that GetCpuSpeed won't be called there.
Note: This bug is fixed (among many others) in the latest JCL release 1.91.
Greetings, Robert
|
|
| Back to top |
|
 |
Andy Guest
|
Posted: Sun Jul 25, 2004 10:54 pm Post subject: Re: Delphi + Hyperthreading problems |
|
|
THANKYOU Robert,
That fixed the problem.
Andy
"Robert Rossmair" <Robert.Rossmair (AT) gmx (DOT) net> wrote
| Quote: | Hi,
Andy wrote:
Hi Dan,
I think you may have hit the nail on the head - I do use jvcl 2.1
I made a small sample app and as soon as I added any jvcl data-aware
components the problem occurred.
The cause of the problem is JclSysInfo.GetCpuSpeed, which is
(needlessly) called during JclGraphUtils initialization.
The most simple fix is to replace the first instruction in
JclGraphUtils.SetupFunctions:
// GetCpuInfo(CpuInfo);
CpuInfo := CPUID;
so that GetCpuSpeed won't be called there.
Note: This bug is fixed (among many others) in the latest JCL release
1.91.
Greetings, Robert
|
|
|
| Back to top |
|
 |
Andrew Guest
|
Posted: Mon Jul 26, 2004 3:42 am Post subject: Re: Delphi + Hyperthreading problems |
|
|
| Quote: | I don't know about Delphi in particular, but Interbase 6 has issues
with slow initial connection on multiple processor/hyperthreding
processor computers. It does work, just takes a little while.
(There is a regestry setting which can fix that also).
|
Hi Robin,
You don't know the specifics of that Registry setting do you? My team
is about to migrate our IB6 app to Firebird because of the slow connect
issue. A fix would let us put off the migration indefiitely...
Thanks,
Andrew
|
|
| Back to top |
|
 |
robin@ozsoft.com.au Guest
|
Posted: Mon Jul 26, 2004 4:36 am Post subject: Re: Delphi + Hyperthreading problems |
|
|
Andrew wrote:
| Quote: | I don't know about Delphi in particular, but Interbase 6 has issues
with slow initial connection on multiple processor/hyperthreding
processor computers. It does work, just takes a little while.
(There is a regestry setting which can fix that also).
Hi Robin,
You don't know the specifics of that Registry setting do you? My team
is about to migrate our IB6 app to Firebird because of the slow connect
issue. A fix would let us put off the migration indefiitely...
Thanks,
Andrew
|
Hi Andrew,
Before I progress, I am not an expert!
The file (A registry edit) is located on the below link with a brief
explanation
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=16665
What this does is specify which processor (Or virtual processor with
HyperThreading) for Interbase to use. It fixes this issue on NT4 or
better OS.
I hope this helps!
Robin.
|
|
| Back to top |
|
 |
Andrew Guest
|
Posted: Tue Jul 27, 2004 1:05 am Post subject: Re: Delphi + Hyperthreading problems |
|
|
[email]robin (AT) ozsoft (DOT) com.au[/email] wrote:
| Quote: | Hi Andrew,
Before I progress, I am not an expert!
The file (A registry edit) is located on the below link with a brief
explanation
http://codecentral.borland.com/codecentral/ccweb.exe/listing?id=16665
What this does is specify which processor (Or virtual processor with
HyperThreading) for Interbase to use. It fixes this issue on NT4 or
better OS.
I hope this helps!
Robin.
|
Yes, it does! Thanks.
Cheers,
Andrew
|
|
| Back to top |
|
 |
|