Community

FREngine12 configure max CPU usage

Hello Abbyy community,

we are using the CommandLineInterface inside Kubernetes and I can observe that only one CPU core is currently used, even though the container has multiple CPU cores available. I assume there is a setting/variable to configure multithreading for the CommandLineInterface binary?

As an example, such a command is executed when the container is running inside Kubernetes:/opt/ABBYY/FREngine12/Samples/CommandLineInterface/CommandLineInterface -rl German,English,Dutch,Swedish -pi -if /opt/ABBYY/FREngine12/Samples/SampleImages/Demo.tif -f PDF -of ./Demo.pdf

Can someone give me a hint where to configure multithreading for the FREngine12 ?

Many thanks in advance!
BR

Was this article helpful?

0 out of 0 found this helpful

Comments

4 comments

  • Avatar
    Nikolai Kromm

    Hello René,

    CommandLineInterface is built by default with the IsSharedCPUCoresMode = false option of the InitializeEngine Function.

    IsSharedCPUCoresMode specifies whether the CPU cores should be used in shared mode. There are two modes of CPU cores usage: separate and shared. In separate mode ABBYY FineReader Engine uses no more processes than it is allowed by the license. In shared mode any number of processes can be run, but all these processes will use only the CPU cores specified by the IMultiProcessingParams::SharedCPUCoresMask property.

    You can try to set IsSharedCPUCoresMode option to true and rebuild the application. To change this option, please modify the FREngineLoader.cpp file located in the /Samples/SharedTools directory of your FineReader Engine 12 installation.

       CheckResult( InitializeEngine( CBstr( GetFreProjectId() ), CBstr( GetLicensePath() ),
            CBstr( GetLicensePassword() ), CBstr( L"" ), CBstr( L"" ), true, Engine.GetBuffer() ) );
    0
  • Avatar
    René Saß

    Hi Nikolai,

    thank you for your quick feedback. We will try this approach. 

    Best Regards
    René 

    0
  • Avatar
    René Saß

    Hi Nikolai Kromm, 

    we found and changed the InitializeEngine function and set IsSharedCPUCoresMode to "true".  Then we went to the folder "ABBYY/FREngine12/Samples/CommandLineInterface" and executed the command "make clean all".

    Running the commandLineInterface again is still showing just one cpu core at 100% usage.

    How can I set the property "SharedCPUCoresMask" exactly after the rebuild when just using the CommandLineInterface binary?

    Thanks in advance! 

    rebuild with "make clean all"
    CPU Usage






    0
  • Avatar
    Nikolai Kromm

    Hi René,

    It appears that your question might require additional investigation. Let us discuss the current question in the newly created ticket.

    0

Please sign in to leave a comment.