You are not logged in.

#1 2010-01-17 19:55:10

Vegita
Member
Registered: 2009-10-06
Posts: 111

Starter script, that blocks "rememleak" and 100%cpu on 1 process

I only have one problem, that seems really sadly unsolved to me in the linux kernel. On Suse i could experience it with an older version of Konqueror, and on Arch, I could experience it with the f-prot antivirus software (it's a commadn-line(!) tool), and on Facebook's geochallenge flash application.

This catastrophical problem is: Once a program starts to fill up its RAM usage as high as it can and as fast as it can. This one's basic version is the memory leak, so after a card game (Ulti) I named it rememleak, coz it does it anything you do and you have not even time even to react (I'm an "old time's man", coz I use 2 GB swap with my 1.5GB DDR2 RAM, and hard drive will never write faster then 100MB/sec, so I have 20 secs to kill this process)

The single memory leak with plasma and X is not that catastrophe, I restart it every 3 days, when palsma's memory usage is over 200MB RAM.

My question is: Is there a possible way to automatically limit ALL processes' memory usage to for example 300MB ram (afterwards autokill, or first try only fulfilling swap instead)? And can I limit ALL processes' cpu usage to 90 or 95% total? (I heard about something called cpulimit I think, but I need it for even newly created processes) That 5% would be enough for kde to even open ctrl+esc (ksysguard), but in this case my computers start to lagg annoyingly, and a clean shutdown takes 5 minutes this time.

I hope I won't have to make a custom kernel, and it would be enough to write an sh script for startup.)

Offline

#2 2010-01-17 20:44:05

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Starter script, that blocks "rememleak" and 100%cpu on 1 process

You can use ulimit to restrict on a per process basis. See also the setrlimit system call.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2010-01-17 20:49:49

Vegita
Member
Registered: 2009-10-06
Posts: 111

Re: Starter script, that blocks "rememleak" and 100%cpu on 1 process

thanks, that will be good as I'll have time to read those manuals tongue If anyone used one of these for all processes, please answer here! Thanks!

Offline

Board footer

Powered by FluxBB