Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: How to limit resources ?

by broquaint (Abbot)
on Oct 24, 2001 at 14:17 UTC ( [id://121063]=note: print w/replies, xml ) Need Help??


in reply to How to limit resources ?

Well if you're fortunate enough to be running this on a Unix system then you can re-schedule the priority of a process by being 'nice' to the process. If you have permissions you can use the renice command (man renice(8)) which should lower it's CPU usage significantly (assuming you give it a positive value). This isn't part of perl's functionality, so you'll probably have to run the command through system() or something of that ilk, as I don't think there's a CPAN module for it (now would be a good time to write one though ;o)
HTH

broquaint

Replies are listed 'Best First'.
Re:{2} How to limit resources ?
by jeroenes (Priest) on Oct 24, 2001 at 14:29 UTC
    There is also the perl function setpriority to renice a process. From the docs, it might cause a fatal error on a system that doesn't support setpriority. Maybe WinNT or siblings support it? I can't check right now.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://121063]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2024-04-23 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found