Limiting cpu usage per process

Kenneth Goodwin kgoodwin at datamarktech.com
Tue Mar 1 16:50:36 UTC 2005


>  -----Original Message-----
>  From: redhat-list-bounces at redhat.com
>  [mailto:redhat-list-bounces at redhat.com]On Behalf Of
>  McDougall, Marshall
>  (FSH)
>  Sent: Tuesday, March 01, 2005 11:21 AM
>  To: 'General Red Hat Linux discussion list'
>  Subject: RE: Limiting cpu usage per process
>
>
>  Thanks for the reply Manuel.  It looks like this file
will
>  do everything
>  except what I am looking for.  I want to be able to limit
>  the % of cpu for
>  this application, not how long it can run.  Thanks,
anyway.
>  I wasn't aware
>  of this file before and I may be able to use it in other
areas.
>
>  Regards, Marshall
>


What you really need to do in this situation is auto-kill
that VIM process.
The reason it is undoubtedly running at high cpu is that it
has become disconnected from it's controlling TTY
and is now is a tight "READ command from terminal Loop". The
READ call will be getting a 0 for the byte count
and returning an error presumably. It really is a bug in VIM
(or the kernel) (i have seen the same thing with other
programs)
since it is not detecting the close (or zero byte return) on
the controlling TTY.
I have seen it with VI on Solaris systems when
a telnet session running VI suddenly disconnects because of
network or PC issues. Telnet and other programs exit on the
server
but VI does not and exhibits the behaviour you are seeing
with VIM (A VI Clone)

I have also seen similar issues when people pipe stuff into
VI and something goes wrong with the pipe close and detect
sequence
(STDIN no longer valid  (EPIPE))




More information about the redhat-list mailing list