I did a little research on this and found cpulimit, you can also use nice and renice, and (on fedora core 21 at least) you can do 'cat /proc/###/status' where ### is the process ID which will give you memory stats on a process. Not ideal but you can wrap all of these in some python to make it easier to manage.
François
> On Apr 20, 2015, at 1:58 PM, Tim Chase <django.users@tim.thechases.com> wrote:
>
> On 2015-04-20 13:54, François Schiettecatte wrote:
>> Peter, why do you want to limit memory and CPU usage? To prevent
>> someone from killing the machine ?
>
> I know I've wanted it to help prevent malicious data that could suck
> up my RAM and push things into swap. Absent "ulimit -a", I've had to
> work around it with extra care to ensure that huge files or pessimal
> instructions don't drag my machine to the ground.
>
> -tkc
>
>
> --
> You received this message because you are subscribed to the Google Groups "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/20150420125834.3faf7102%40bigbox.christie.dr.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/47D4DCD3-F55D-41A2-A4D9-4B6746C7BEA9%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment