Hi Eric,
This isn't exactly what you're asking for, but you could limit the total
percentage of cpu usage for your processes by wrapping them in a cgroup.
Here's a link to an article that gives a decent introduction to cpu
limiting and cgroups,
http://blog.scoutapp.com/articles/2014/11/04/restricting-process-cpu-usage-using-nice-cpulimit-and-cgroups
.
-f
On Fri, May 25, 2018 at 7:21 PM, Andreas Orphanides <[log in to unmask]>
wrote:
> This is pretty naive -- I don't do a lot of multicore stuff, I know nothing
> about Spacy, and I'm a Python newbie -- but I seem to recall that there's a
> Python config variable to limit the max cores used? You could set up an
> environment for your project with the config set to appropriately limit,
> and I imagine that would do the trick, unless you need even more cores in
> the same session.
>
> On Fri, May 25, 2018 at 5:50 PM, Eric Lease Morgan <[log in to unmask]> wrote:
>
> > On Stack exchange I asked "How do I limit the number of CPU's used by
> > Spacy?", a set of Python-based natural language processing modules. [1]
> And
> > I thought I might ask it here as well. Any ideas?
> >
> > [1] https://stackoverflow.com/q/50537146/7691778
> >
> > --
> > Eric Morgan
> >
>
|