Being a hardware-level hypervisor, the techniques used by Bhyve aren't relevant to OS-virtualized containers.
>From what I can tell about LXC, it supports mechanisms such as CPU sets and assigning CPU shares. While CPU sets _would_ solve the issue of visible CPUs matching expectations for function inside a zone, it's very unattractive for achieving good economics in a multi-tenant environment. The latter mechanism, assigning CPU shares, closely resembles how SmartOS does CPU resource control today (limiting the amount of CPU time that can be used, but not the CPUs on which one can spend it). On 6 December 2016 at 12:30, Len Weincier <[email protected]> wrote: > > > On 6 December 2016 at 17:42, Patrick Mooney <[email protected]> > wrote: > >> >> On 6 December 2016 at 08:41, Nahum Shalman <[email protected]> wrote >> >>> Additional thoughts: >>> I wonder how bad it would be to allow the LX brand to alter how many >>> CPUs the Linux system calls see based on a zone property (probably a new >>> one...) >>> My first instinct is "not that bad", though my second instinct is "the >>> consequences of doing so are subtle and it's probably much worse than I >>> would think". >>> >> >> This topic comes up fairly often. It's very difficult to tell a >> convincing "lie" about how many CPUs are available on the system. If you >> were to report only 0-7 cores out of 24, for example, software querying the >> CPU ID may still see higher identifiers if it's scheduled onto the other >> socket. It's also possible that total CPU time enforced by the cap would >> exceed what would be theoretically possible on the virtual CPUs which have >> been presented. (If 8.5 seconds of CPU time were consumed on those "8 >> cores" in 1 second, tools like 'top' might be grumpy.) >> >> All in all, "subtle consequences" is an accurate description of why the >> task is difficult accomplish correctly. >> > > I wonder if its worth looking at LXC / bhyve to see if they have any ideas > on this ? > > Subtle consequences indeed ! > *smartos-discuss* | Archives > <https://www.listbox.com/member/archive/184463/=now> > <https://www.listbox.com/member/archive/rss/184463/26937779-40cf8a10> | > Modify > <https://www.listbox.com/member/?&> > Your Subscription <http://www.listbox.com> > ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
