Re: rctl limit cpu



On Wed, Jul 27, 2011 at 09:32:49PM +0200, Edward Tomasz Napiera?a wrote:

Wiadomo?? napisana przez Alexander Pyhalov w dniu 26 lip 2011, o godz. 15:32:
Hello.
I see in rctl man page, that I can limit cpu time in milliseconds, e.g., for jail. But I can't deny allocation of the resource (according to man page).
In Solaris I can assign different amount of cpu shares to different projects. How can I achieve this with rctl? For example, I'd like to give jail:www 40% CPU, jail:db - 50% CPU and leave 10% to the base system...

The cputime resource (it got renamed shortly before the code freeze to match
resource names in login.conf(5)) defines amount of CPU time used, not the percentage.
That's why you cannot deny it - if you could, it would just make the offending process
(jail, login class, user) hang indefinitely.

The %CPU limit is not implemented yet. I plan to do this before sometime
after 9.0 is out.

Any progress yet?
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: rctl limit cpu
    ... I see in rctl man page, that I can limit cpu time in milliseconds, e.g., for jail. ... But I can't deny allocation of the resource. ...
    (freebsd-current)
  • Re: rctl limit cpu
    ... I see in rctl man page, that I can limit cpu time in milliseconds, e.g., for jail. ... But I can't deny allocation of the resource. ...
    (freebsd-current)
  • Re: Explain this about threads
    ... There are a variety of things that can cause a thread to block, but they generally fall into two categories: waiting for some resource; and waiting explicitly ). ... If a thread doesn't become unrunnable, either because it explicitly sleeps or because it makes some function call that involves having to wait on some resource, it will continue to execute for as long as its timeslice. ... This results in the one thread that's not actually doing anything useful winding up getting the lion's share of the CPU time, which is exactly the opposite of what you normally would want. ... So if you need a particular thread to be very responsive AND you know for sure it won't have to wait longer than the timeslice, spinning can work well. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Explain this about threads
    ... resource, it ... So, in the quote, they appear to be explaining that polling a resource is ... So blocking is something done on the thread side? ... share the CPU without having thread B using any CPU time. ...
    (microsoft.public.dotnet.languages.csharp)
  • [SoC] Jail Resource Limits
    ... folks: I've completed the Summer of Code work on the jail resource limits; jails can now have soft-ish limits placed on their memory and CPU usage. ... Briefly, when a jail uses more memory than its limit, pages are clawed back by a new kernel process, jpager. ... When a jail uses more CPU time in proportion to total CPU time used than the number of its CPU usage shares to the total CPU usage shares, its processes are dropped in priority until it's had its fair share of the total CPU time; if there are no other processes that want to run, they'll use up as much CPU time as they otherwise would. ...
    (freebsd-hackers)