* Re: Re: limit cpu
@ 2001-08-16 16:08 Eduardo Cortés
2001-08-16 16:13 ` Mark Hahn
0 siblings, 1 reply; 8+ messages in thread
From: Eduardo Cortés @ 2001-08-16 16:08 UTC (permalink / raw)
To: linux-kernel
On Thursday 16 August 2001 04:08, you wrote:
> > i want to know if linux can limit the max cpu usage (not cpu time) per
> > user,
>
> no. doing so would inherently slow down the scheduler.
but *BSD has this feature, what's the problem in linux?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: limit cpu
2001-08-16 16:08 Re: limit cpu Eduardo Cortés
@ 2001-08-16 16:13 ` Mark Hahn
2001-08-16 16:29 ` Eduardo Cortés
0 siblings, 1 reply; 8+ messages in thread
From: Mark Hahn @ 2001-08-16 16:13 UTC (permalink / raw)
To: Eduardo Cortés ; +Cc: linux-kernel
> > > i want to know if linux can limit the max cpu usage (not cpu time) per
> > > user,
> >
> > no. doing so would inherently slow down the scheduler.
>
> but *BSD has this feature, what's the problem in linux?
I said that, thinking that it would require another test along
the scheduler's fast path. but if we only test when a process
has exhausted its quantum (or perhaps at counter-recalc),
the overhead would be minor.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: limit cpu
2001-08-16 16:13 ` Mark Hahn
@ 2001-08-16 16:29 ` Eduardo Cortés
2001-08-16 17:53 ` Hua Zhong
2001-08-17 17:34 ` Rik van Riel
0 siblings, 2 replies; 8+ messages in thread
From: Eduardo Cortés @ 2001-08-16 16:29 UTC (permalink / raw)
To: linux-kernel
On Thursday 16 August 2001 18:13, you wrote:
> > > > i want to know if linux can limit the max cpu usage (not cpu time)
> > > > per user,
> > >
> > > no. doing so would inherently slow down the scheduler.
> >
> > but *BSD has this feature, what's the problem in linux?
>
> I said that, thinking that it would require another test along
> the scheduler's fast path. but if we only test when a process
> has exhausted its quantum (or perhaps at counter-recalc),
> the overhead would be minor.
I think that it's a good feature for linux, but I don't know if is very
complex to develope in linux. If I can limit the max cpu usage (in %) for an
user/group, the box is more solid.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: limit cpu
2001-08-16 16:29 ` Eduardo Cortés
@ 2001-08-16 17:53 ` Hua Zhong
2001-08-16 18:28 ` Eduardo Cortés
2001-08-17 17:34 ` Rik van Riel
1 sibling, 1 reply; 8+ messages in thread
From: Hua Zhong @ 2001-08-16 17:53 UTC (permalink / raw)
To: Eduardo Cortés, linux-kernel
Current Linux scheduler doesn't seem to be able to support this nicely. You
can set their priorities..but the values are not very intuitive. And if you
sleep, the result could become very inaccurate.
A new scheduler (sth like weighted round robin) is a more natural solution.
You just assign weights to processes and they will be scheduled accordingly.
----- Original Message -----
From: "Eduardo Cortés" <the_beast@softhome.net>
To: <linux-kernel@vger.kernel.org>
Sent: Thursday, August 16, 2001 9:29 AM
Subject: Re: Re: limit cpu
> On Thursday 16 August 2001 18:13, you wrote:
> > > > > i want to know if linux can limit the max cpu usage (not cpu time)
> > > > > per user,
> > > >
> > > > no. doing so would inherently slow down the scheduler.
> > >
> > > but *BSD has this feature, what's the problem in linux?
> >
> > I said that, thinking that it would require another test along
> > the scheduler's fast path. but if we only test when a process
> > has exhausted its quantum (or perhaps at counter-recalc),
> > the overhead would be minor.
>
> I think that it's a good feature for linux, but I don't know if is very
> complex to develope in linux. If I can limit the max cpu usage (in %) for
an
> user/group, the box is more solid.
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: limit cpu
2001-08-16 17:53 ` Hua Zhong
@ 2001-08-16 18:28 ` Eduardo Cortés
0 siblings, 0 replies; 8+ messages in thread
From: Eduardo Cortés @ 2001-08-16 18:28 UTC (permalink / raw)
To: linux-kernel
If somebody want to develope it, a lot of thanks. I see scheduler could be
better with this feature, opinions?
On Thursday 16 August 2001 19:53, Hua Zhong wrote:
> Current Linux scheduler doesn't seem to be able to support this nicely.
> You can set their priorities..but the values are not very intuitive. And
> if you sleep, the result could become very inaccurate.
>
> A new scheduler (sth like weighted round robin) is a more natural solution.
> You just assign weights to processes and they will be scheduled
> accordingly.
>
> ----- Original Message -----
> From: "Eduardo Cortés" <the_beast@softhome.net>
> To: <linux-kernel@vger.kernel.org>
> Sent: Thursday, August 16, 2001 9:29 AM
> Subject: Re: Re: limit cpu
>
> > On Thursday 16 August 2001 18:13, you wrote:
> > > > > > i want to know if linux can limit the max cpu usage (not cpu
> > > > > > time) per user,
> > > > >
> > > > > no. doing so would inherently slow down the scheduler.
> > > >
> > > > but *BSD has this feature, what's the problem in linux?
> > >
> > > I said that, thinking that it would require another test along
> > > the scheduler's fast path. but if we only test when a process
> > > has exhausted its quantum (or perhaps at counter-recalc),
> > > the overhead would be minor.
> >
> > I think that it's a good feature for linux, but I don't know if is very
> > complex to develope in linux. If I can limit the max cpu usage (in %) for
>
> an
>
> > user/group, the box is more solid.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: limit cpu
[not found] <Pine.LNX.4.10.10108161853020.19342-100000@coffee.psychology.mcmaster.ca>
@ 2001-08-16 19:22 ` Eduardo Cortés
0 siblings, 0 replies; 8+ messages in thread
From: Eduardo Cortés @ 2001-08-16 19:22 UTC (permalink / raw)
To: linux-kernel
On Thursday 16 August 2001 20:54, you wrote:
> > If somebody want to develope it, a lot of thanks. I see scheduler could
> > be better with this feature, opinions?
>
> one excellent reason noone has bothered with it is that hardware
> is dirt cheap. it's extremely unusual these days to find a machine
> where hostile users are given shell accounts. for non-hostile
> situations (my lab, for instance), or for servers, the feature is
> useless.
at server level, this feature will be used for virtual hosts (a lot of
ISP's). Could be used at home for security reason limitting any user 95-97%,
and box will be more secure. A lot of people use applications (for XFree)
that could crash the box for this reason.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: limit cpu
@ 2001-08-16 20:46 Shailabh Nagar
0 siblings, 0 replies; 8+ messages in thread
From: Shailabh Nagar @ 2001-08-16 20:46 UTC (permalink / raw)
To: Eduardo Cortés; +Cc: linux-kernel
Restricting CPU usage alone can be done relatively easily during
recalculate . Before renewing the counter for a task, a quick check could
be made against a newly added user-specific limit. If very precise
accounting is not needed, the check could be done by one of the periodic
daemons.....
But a bigger question remains : will doing this achieve the objective of
isolating a malicious/errant process ? There are a number of other system
resources that the process/user could overuse to the detriment of other
users/processes.
Shailabh
Eduardo Cortés <the_beast@softhome.net>@vger.kernel.org on 08/16/2001
03:22:55 PM
Sent by: linux-kernel-owner@vger.kernel.org
To: linux-kernel@vger.kernel.org
cc:
Subject: Re: Re: limit cpu
On Thursday 16 August 2001 20:54, you wrote:
> > If somebody want to develope it, a lot of thanks. I see scheduler could
> > be better with this feature, opinions?
>
> one excellent reason noone has bothered with it is that hardware
> is dirt cheap. it's extremely unusual these days to find a machine
> where hostile users are given shell accounts. for non-hostile
> situations (my lab, for instance), or for servers, the feature is
> useless.
at server level, this feature will be used for virtual hosts (a lot of
ISP's). Could be used at home for security reason limitting any user
95-97%,
and box will be more secure. A lot of people use applications (for XFree)
that could crash the box for this reason.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Re: limit cpu
2001-08-16 16:29 ` Eduardo Cortés
2001-08-16 17:53 ` Hua Zhong
@ 2001-08-17 17:34 ` Rik van Riel
1 sibling, 0 replies; 8+ messages in thread
From: Rik van Riel @ 2001-08-17 17:34 UTC (permalink / raw)
To: Eduardo Cortés ; +Cc: linux-kernel
On Thu, 16 Aug 2001, Eduardo Cortés wrote:
> I think that it's a good feature for linux, but I don't know if
> is very complex to develope in linux. If I can limit the max cpu
> usage (in %) for an user/group, the box is more solid.
Conectiva has been shipping a patch to limit CPU usage
on a per-user basis in their 2.2 kernel RPM for quite
a while now.
Unfortunately I ran into problems with ksoftirqd while
porting the patch to 2.4 and have been tied up in the
memory management and other projects since.
Oh, the patch also doesn't have any effect on the scheduler
fast-path. Only the recalculation is changed...
regards,
Rik
--
IA64: a worthy successor to the i860.
http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com/
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-08-17 17:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-16 16:08 Re: limit cpu Eduardo Cortés
2001-08-16 16:13 ` Mark Hahn
2001-08-16 16:29 ` Eduardo Cortés
2001-08-16 17:53 ` Hua Zhong
2001-08-16 18:28 ` Eduardo Cortés
2001-08-17 17:34 ` Rik van Riel
[not found] <Pine.LNX.4.10.10108161853020.19342-100000@coffee.psychology.mcmaster.ca>
2001-08-16 19:22 ` Eduardo Cortés
-- strict thread matches above, loose matches on Subject: below --
2001-08-16 20:46 Shailabh Nagar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.