Thread: taking advantage of hyperthreading?

  1. #1
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459

    taking advantage of hyperthreading?

    Hi folks,

    My research involves processes that take upto 6 days to complete on one machine with a 1.7 ghz chip and a gig and a half of ram, and it's CPU bound. So, I don't like waiting that long when you have weekly research meetings, and I split up the job to run amongst a few machines of roughly the same caliber.

    I have a 3 ghz p4 with hyperthreading and I'm all using java for this. So to take advantage of it, I suppose I would have to make my program multithreaded? Does anyone know where I can get some info on this? Or have any suggestions? Thanks.

    -da
    hasafraggin shizigishin oppashigger...

  2. #2
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    499
    Quote Originally Posted by doubleanti
    Hi folks,

    My research involves processes that take upto 6 days to complete on one machine with a 1.7 ghz chip and a gig and a half of ram, and it's CPU bound. So, I don't like waiting that long when you have weekly research meetings, and I split up the job to run amongst a few machines of roughly the same caliber.

    I have a 3 ghz p4 with hyperthreading and I'm all using java for this. So to take advantage of it, I suppose I would have to make my program multithreaded? Does anyone know where I can get some info on this? Or have any suggestions? Thanks.

    -da
    Yes -- if it's only one program that you use. If it's several programs, the OS will do the multithreading. Java mutlthreading? http://www-128.ibm.com/developerwork.../j-thread.html

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > I split up the job to run amongst a few machines of roughly the same caliber.
    Running two instances of this program on your HT machine should take advantage of the processor features.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    It's worth pointing out that, in some circumstances, hyperthreading can result in a performance hit rather than a boost.

    http://blogs.msdn.com/oldnewthing/ar...16/504659.aspx (in comments)
    http://msdn.microsoft.com/msdnmag/is...g/default.aspx

  5. #5
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    Alright great, that explains why it sped up (almost roughly double, which makes me wonder...) when I ran two in parallel, and also relieves me that I won't have to actually multithread it, for now... Thanks guys!
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Speed/size advantage to SQL?
    By MK27 in forum Tech Board
    Replies: 15
    Last Post: 06-26-2009, 11:28 AM
  2. taking Function's address
    By arjunajay in forum C++ Programming
    Replies: 2
    Last Post: 09-12-2005, 05:55 AM
  3. Hyperthreading
    By melmo in forum Tech Board
    Replies: 9
    Last Post: 04-29-2004, 09:01 PM
  4. q-Analysis - worth taking a course over?
    By Captain Penguin in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 11-04-2002, 05:09 PM
  5. Please help me
    By teedee46 in forum C++ Programming
    Replies: 9
    Last Post: 05-06-2002, 11:28 PM