Skip to contentSkip to conversation

limit cpu

DISCUSSION Eduardo Cortés 4 participants 6 messages Aug 16, 2001 – Aug 17, 2001

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · you
Quoted 2 lines

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?

#1 lore raw
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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.

#2 lore raw
Quoted 11 lines · you
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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.

#4 lore raw
In reply to Mark Hahn

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" <[email protected]>
To: <[email protected]>
Sent: Thursday, August 16, 2001 9:29 AM
Subject: Re: Re: limit cpu

Quoted 8 lines · you
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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?

Quoted 7 lines
Quoted 4 lines

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

Quoted 6 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#5 lore raw
In reply to Mark Hahn

If somebody want to develope it, a lot of thanks. I see scheduler could be better with this feature, opinions?

Quoted 33 lines · Hua Zhong

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" <[email protected]>
To: <[email protected]>
Sent: Thursday, August 16, 2001 9:29 AM
Subject: Re: Re: limit cpu

Quoted 8 lines · you
Quoted 7 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

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?

Quoted 7 lines
Quoted 4 lines

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

Quoted 1 line

user/group, the box is more solid.

#3 lore raw
In reply to Eduardo Cortés
Quoted 3 lines · Eduardo Cortés

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/