Results 1 to 6 of 6

Thread: Any way to get application to utilize more than one core in multi-core setup?

  1. #1

    Default Any way to get application to utilize more than one core in multi-core setup?

    Hi,

    I have a command line OCR program called OCR Shop XTR (Vividata corp) that I am using on a system with a 6-core AMD chip. I changed the bios so that the 6-cores were activated, but htop shows me that while the program is running, I am only getting activity on one core (the program maxes out the one core with consistent usage between 97% and 100%).

    I have read that many programs are not written to take advantage of multiple core cpu's. However, I am just hoping that there is some way to get this program to take advantage of the extra cores. Does anyone know of a way to invoke programs from the command line which would spread the workload out among additional cores?

    Here is the output of uname -a:
    Linux linux 2.6.37.1-1.2-desktop #1 SMP PREEMPT 2011-02-21 10:34:10 +0100 i686 athlon i386 GNU/Linux

    And here is the output for one of the cores from cat /proc/cpuinfo:
    processor : 5
    vendor_id : AuthenticAMD
    cpu family : 16
    model : 10
    model name : AMD Phenom(tm) II X6 1100T Processor
    stepping : 0
    cpu MHz : 3300.000
    cache size : 512 KB
    physical id : 0
    siblings : 6
    core id : 5
    cpu cores : 6
    apicid : 5
    initial apicid : 5
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 6
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb npt lbrv svm_lock nrip_save pausefilter
    bogomips : 6629.36
    clflush size : 64
    cache_alignment : 64
    address sizes : 48 bits physical, 48 bits virtual
    power management: ts ttp tm stc 100mhzsteps hwpstate [9]

    Will I get much of a performance boost on a process like this if I install 64-bit instead of 32-bit openSUSE?

    Thanks in advance,
    Andy

  2. #2

    Default Re: Any way to get application to utilize more than one core in multi-core setup?

    hi
    If the program is not multithreaded I don't know if it is possible. If you have several images that needs to be OCR:ed I would simply divide the files i batches and start a new instances of the program. I think that should do it, but I'm not sure.

    When it comes to 2.6.37.1-1.2-desktop I'm not sure if it has PAE or not (check that). If you have a lot of memory over 4GB and your current kernel does not have PAE I would go 64bit.
    _________
    OpenSuse 11.4 x86_64. 2.6.37.1-1.2-desktop. Thinkpad T400 running KDE4

  3. #3

    Default Re: Any way to get application to utilize more than one core in multi-core setup?

    Hi Boldie,

    Thanks for the advice - I am burning 64-bit DVD right now, and will install and see if this speeds things up a bit. I am running with 8GB of ram, so I will probably get a better overall experience. However, with OCR, the process is extremely CPU intensive, but seems to use very little internal memory. htop shows that the ocrxtr process is using between 97% to 100% of the one processor core, but consistently using only about 0.2% to 1.1% of available memory. Clearly, memory is not the bottleneck for this program.

    Regarding PAE, the cat /proc/cpuinfo command returns with flags that indicate PAE is available:

    flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc extd_apicid aperfmperf pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt cpb npt lbrv svm_lock nrip_save pausefilter

    Also, YaST2 states that this version of the kernel comes with support for up to 64GB of main memory through PAE.

    I tried running multiple instances of the program in parallel, per your suggestion, but this is a proprietary program that requires a license for each running instance. I would rather not have to pay for multiple instances, but would be very grateful for any tips on how to squeeze more speed out of it.



    Thanks,
    Andy

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Any way to get application to utilize more than one core in multi-coresetup?

    On 2011-03-27 22:36, andyprough wrote:

    > I have read that many programs are not written to take advantage of
    > multiple core cpu's. However, I am just hoping that there is some way to
    > get this program to take advantage of the extra cores. Does anyone know
    > of a way to invoke programs from the command line which would spread the
    > workload out among additional cores?


    No, there is not.

    Actually, the search for such a feature would be like searching for the
    mitic "philosopher's stone".

    You could make such a task run for a time on one core, then jump to
    another, then jump to another, so that all cores seem busy. But never they
    will be simultaneously busy. Simply distributing heat.


    Programming for parallel processing is an art still, not much of an
    science. Can't be done automatically.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

  5. #5

    Default Re: Any way to get application to utilize more than one core in multi-coresetup?

    Hi Carlos,

    Ahh - just as I figured. Too bad -- this is a bit of an older program, and its proprietary and the company does not make the source available, so I am stuck with trying to get a binary to operate in the way I would like. Even so, I am finding I can get this OCR Shop XTR to complete the ocr process in about half the time of other software packages, so I'll stick with it. I was just hoping to squeeze a lot more speed out of my new 6-core processor.

    Thanks!
    Andy

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Any way to get application to utilize more than one core in multi-coresetup?

    On 2011-03-28 02:06, andyprough wrote:
    >
    > Hi Carlos,
    >
    > Ahh - just as I figured. Too bad -- this is a bit of an older program,
    > and its proprietary and the company does not make the source available,
    > so I am stuck with trying to get a binary to operate in the way I would
    > like.


    That company should provide a binary tailored for multicore computers.

    > Even so, I am finding I can get this OCR Shop XTR to complete the
    > ocr process in about half the time of other software packages, so I'll
    > stick with it. I was just hoping to squeeze a lot more speed out of my
    > new 6-core processor.


    I know opensource OCR is not, er... how can I say... not very good, but
    perhaps you can find an alternative.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.2 x86_64 "Emerald" at Telcontar)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •