Python Forum
How to set CPU and memory resource
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to set CPU and memory resource
#1
Hi,
I am running my python script on server, most of the time resource is distributed and occupied by other scheduled jobs. I want to minimize my program queue time by lowering the resource required, setting the number of CPUs to 2 and memory is 2GB. Is it possible how to define this in my python program.
Reply
#2
This is restricted by most operating systems, see: https://docs.python.org/3/library/os.htm...-scheduler.
I don't 'think', I might be wrong, that memory is controllable (but priority is (if scheduler is used))
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting an error while trying to process data, low memory when memory is not low? bkeith12 0 483 Dec-20-2024, 03:06 PM
Last Post: bkeith12
  Problem importing resource library ChrisM 8 5,473 Oct-23-2019, 01:40 PM
Last Post: ChrisM
  Resource Monitoring MuntyScruntfundle 1 67,199 Feb-20-2019, 10:00 PM
Last Post: Larz60+
  Paramiko resource shortage error jkey 0 4,784 Sep-17-2018, 01:18 PM
Last Post: jkey
  Py3 Data Resource file help esteel 0 2,471 May-20-2018, 10:33 PM
Last Post: esteel
  'OSError: [Errno 16] Device or resource busy' for ralationship with ds1307 gray 4 10,734 Jul-31-2017, 02:17 AM
Last Post: jackbk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020