Skip to content
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

0.1.34 OCR hangs with 100% CPU usage #72

Open
nodesocket opened this issue Mar 22, 2025 · 3 comments
Open

0.1.34 OCR hangs with 100% CPU usage #72

nodesocket opened this issue Mar 22, 2025 · 3 comments

Comments

@nodesocket
Copy link

nodesocket commented Mar 22, 2025

Few things I noticed @DonTizi upgrading to the latest version today 0.1.34.

On startup, appear to be a foreign language notification?

⚠️ Avertissement: la bibliothèque FlagEmbedding n'est pas installée. Exécutez 'rlama install-dependencies' pour l'installer
Pour installer les dépendances, exécutez: rlama install-dependencies
⚠️ Avertissement: la bibliothèque FlagEmbedding n'est pas installée. Exécutez 'rlama install-dependencies' pour l'installer
Pour installer les dépendances, exécutez: rlama install-dependencies

After rlama setup and just a few OCR conversations all my CPU cores go to 100% and seems to hang. No further processing happens, just CPU at 100%.

@nodesocket
Copy link
Author

@DonTizi here is a screenshot, not sure if it's helpful. rlama seems to be stuck doing OCR using 100% of my cpus. Look at the system load. 😆

Image

@nodesocket
Copy link
Author

nodesocket commented Mar 24, 2025

After waiting around 15 minutes, it finally moved on to the next PDF file. I'm thinking tesseract using n(cpu cores) + 1 might have been a bit aggressive and actually massively slowing down the process due to resource starvation. Perhaps n(cpu cores) - 1 is a better default for concurrency for tesseract and OCR operations?

@nodesocket
Copy link
Author

Confirmed, resource starvation indeed seems to be the problem. A document with 2,3,4 pages processes almost instantly, but as soon as documents that uses all 9 threads starts grinds to a halt. Just curious, why is each worker process of tesseract spawning 3 threads each itself?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant