Re: [ckrm-tech] [RFC 3/5] sched: Add CPU rate hard caps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kirill Korotaev wrote:
Sure! You can check OpenVZ project (http://openvz.org) for example of required resource management. BTW, I must agree with other people here who noticed that per-process resource management is really useless and hard to use :(


I totally agree.


"nice" seems to be doing quite nicely :-)
I'm sorry, but nice never looked "nice" to me.
Have you ever tried to "nice" apache server which spawns 500 processes/threads on a loaded machine?
With nice you _can't_ impose limits or priority on the whole "apache".
The more apaches you have the more useless their priorites and nices are...

Nevertheless "nice" is still useful. I'd bet that just about every Linux system has at least one task with non normal nice at any time.

I think that these caps can be similarly useful.

They can be also used as the basic mechanism to implement the kind of thing you want from OUTSIDE of the scheduler.


To me this capping functionality is a similar functionality to that provided by "nice" and all that's needed to make it useful is a command (similar to "nice") that runs tasks with caps applied. To that end I've written a small script (attached) that does this. As this is something that a user might like to combine with "nice" the command has an option for setting "nice" as well as caps.

Usage:
        withcap [options] command [arguments ...]
        withcap -h
Options:
        [-c <CPU rate soft cap>]
        [-C <CPU rate hard cap>]
        [-n <nice value>]

        -c Set CPU usage rate soft cap
        -C Set CPU usage rate hard cap
        -n Set nice value
        -h Display this help

the same for this. you can't limit a _user_, only his processes.
Today I have 1 task and 20% limit is ok, tomorrow I have 10 tasks and this 20% limits changes nothing in the system.

This still doesn't make it useless.

Peter
--
Peter Williams                                   [email protected]

"Learning, n. The kind of ignorance distinguishing the studious."
 -- Ambrose Bierce
-
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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux