8

I am new to using Jupyter notebook. I have installed Jupyter using Anaconda and have set up a jupyter server. I wanted to control the cpu and memory available for Jupyter. Is there any configuration for doing that? What is the best way to achieve this.

Thanks

Midhun Mathew Sunny
  • 1,271
  • 4
  • 17
  • 30
  • There's no native config no - since a Jupyter server is usually assumed to be run by a trusted user it makes no sense to limit the resources available to it. If you do want to though - you might consider external ways of managing CPU/memory - I can suggest Docker as a good start as Docker allows for setting resource limits on its containers and a lto of the Jupyter community (via Jupyterhub) are familiar with Docker. – Louise Davies Mar 24 '17 at 13:05
  • 2
    Huh. I trust myself to make mistakes and use too much memory in my notebooks, so I guess I'll have to fire up some ulimit commands. – Greg Lindahl Nov 23 '18 at 21:54

1 Answers1

1

You can specify CPU limit to Jupyter notebook process using

sudo cpulimit -l 100 -p <PID>

where PID is ID of your process, -l is for limit, you can read man page to learn how to use it.

evaleria
  • 1,281
  • 6
  • 23
  • 30