question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Limit the number of threads used when fitting a model

See original GitHub issue

Background and Context Recently, I got an email from my local sysadmin asking why I was creating ~300 threads for every script I was running. Apparently the load was slowing down other users, which was not considered a very nice thing to do 😃.

It would be nice if there was a way to limit the number of threads that ampligraph (or tensorflow?) uses when fitting a model. I already tried setting the tensorflow intra_op_parallelism_threads and inter_op_parallelism_threads settings, but that did not make a difference.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wradstokcommented, Jun 16, 2020

Seems to be working, made the modification you listed and now CPU usage stays pegged at 100% as expected.

Thanks for the help!

0reactions
sumitpaicommented, Jun 16, 2020

sorry for the delay in answering.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The right way to limit maximum number of threads running at ...
This way you can easily limit the number of threads that will be ... can be used to define an upper limit on...
Read more >
Limit the Number of Threads Used by Parallel Frameworks - Intel
This document provides a detailed overview of the Intel® Advisor functionality and workflows.
Read more >
Maximum threads limit per process in windows 10? - Super User
32-bit processes can only address 4 GB of memory, which will fit about 2,000 threads with the default 1 MB stack allocation per...
Read more >
Threading config settings - .NET - Microsoft Learn
Specifies the minimum number of threads for the worker thread pool. ... this value specifies the max delay to use before each new...
Read more >
Limit the number of threads used for simulation
A thread is a single flow of operations within a program. Programs use multiple threads concurrently to speed up the time to solution....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found