-
Notifications
You must be signed in to change notification settings - Fork 9.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--disable-openmp improves performance? #961
Comments
engtest was built with --fontlist "Arial" . command on non-debug build, under WSL on Windows 10
|
on as of 42066ce
|
on as of 5a06417
|
on as of b86b4fa
|
If it does not add too much overhead, I would suggest adding some kind of regression testing as part of continuous integration. Also, will be helpful for others to test to confirm, since I ran this under WSL on windows 10. |
According to your report the problem started with commit 6dd871b The commits after that commit are just documentation fixes. |
Shree, did you run those tests with WSL? |
Yes. |
I did not set anything special for OPENMP though my PC probably supports it. |
Same test on Linux with git master, debug build:
Test machine: Intel(R) Xeon(R) CPU E3-1240 v5 @ 3.50GHz. |
I currently think that the timing regression is related to bug #644. @Shreeshrii, could you please try git master with the patch shown there? |
on with git master
|
on reset hard to 5a06417 shree@sanskrit:~/tesseract$ tesseract -v
|
Closing as problem not reproducable on other systems. |
FYI I built with --disable-openmp under WSL. Now it is taking less time.
|
I am reopening the issue, because there is some impact on By disabling openmp, the from
to
Maybe, need to add some recommendation in wiki to |
The fact that the 'user' time is a few times longer than the 'real' time is expected with multi core CPU and OpenMP enabled. However, the fact that the real time with or without OpenMP is roughly the same is not expected. |
See also my comment in the RFC on performance. Even on Linux, OpenMP requires a large percentage of additional CPU time. That's why Tesseract with OpenMP is not much faster in the "real" time, but uses much more "user" and "sys" time. On Windows the situation gets worse because thread switching for OpenMP seems to be slower than on Linux. |
I think it would he helpful to mention on the 'Compiling' pages to build with @stweil IS it ok to do so? Are there any particular conditions under which it should be recommended? |
on
It has been taking 92-98% CPU. @stweil Any recommendation on how to reduce cpu usage? |
A dual core CPU will produce a very high overhead when OpenMP with four or more threads is used, so yes, disabling OpenMP might help. The Tesseract code could also be improved with OpenMP enabled: it could set the number of threads at run time, either based on user's choice (command line parameter) or based on the number of available CPU cores. |
--disable-openmp improved performance of tesseract in recognizing images. But lstmtraining still taking 99% cpu. |
Set a higher "nice factor" for Tesseract, in this situation? |
I use that machine remotely. I am now running the command as Is there a valgrind or other debugging command which will help isolate what is causing this high cpu usage? |
It's normal that programs like |
Using the latest code from master branch seems to be slower than from commits a few days back. Training seems to hang at times. I am trying to get an objective measure by running sample training against different builds and will post results here.
The text was updated successfully, but these errors were encountered: