Re: limiting the number of cpu's used by spacy

From: Flannon Jackson <flannon_at_nyob>
Date: Tue, 29 May 2018 08:56:11 -0400
To: CODE4LIB_at_LISTS.CLIR.ORG
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 <akorphan_at_ncsu.edu>
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 <emorgan_at_nd.edu> 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
> >
>
Received on Tue May 29 2018 - 08:58:29 EDT