* udev in containers @ 2011-01-28 14:48 Serge E. Hallyn 2011-01-28 20:18 ` Eric W. Biederman 0 siblings, 1 reply; 4+ messages in thread From: Serge E. Hallyn @ 2011-01-28 14:48 UTC (permalink / raw) To: Eric W. Biederman, Oren Laadan, Daniel Lezcano, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Tej Hi, Now that we are allowing udev to run in containers, Daniel has noticed that updates to sysfs uevent files will trigger a flurry of activity in all containers on the host. While not a problem with just a few containers, this can severaly impact performance with hundreds or more containers. (Daniel, would it be possible for you to get some measurements on host and in a container versus # of active containers, with and without udev? Do you have a otehrwise unused machien you could try that on?) Is there anything we can/should do about this? Two approaches, neither sufficiently thought out yet, would be to generalize the directory tagging currently used for /sys/class/net, and full-fledged implementation of a device namespace. The directory tagging would probably only work if we can assign multiple tags to a device, but we could for instance make /sys/block tagged, and really no container probably needs to see /sys/block/sda. The device namespace would be similar, except I suspect it would not only hide certain devices from certain namespaces, but it would actually virtualize the device major:minor mapping, for checkpoint/restart, so that /dev/sda could be redirected to another device more completely than simply fudging the nodes under /dev. Comments? Designs? Plans? thanks, -serge ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev in containers 2011-01-28 14:48 udev in containers Serge E. Hallyn @ 2011-01-28 20:18 ` Eric W. Biederman [not found] ` <m1pqrgvl20.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: Eric W. Biederman @ 2011-01-28 20:18 UTC (permalink / raw) To: Serge E. Hallyn Cc: Tejun Heo, Daniel Lezcano, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA "Serge E. Hallyn" <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> writes: > Hi, > > Now that we are allowing udev to run in containers, Daniel has > noticed that updates to sysfs uevent files will trigger a flurry > of activity in all containers on the host. While not a problem > with just a few containers, this can severaly impact performance > with hundreds or more containers. > > (Daniel, would it be possible for you to get some measurements > on host and in a container versus # of active containers, with > and without udev? Do you have a otehrwise unused machien you > could try that on?) > > Is there anything we can/should do about this? > > Two approaches, neither sufficiently thought out yet, would be > to generalize the directory tagging currently used for > /sys/class/net, and full-fledged implementation of a device > namespace. > > The directory tagging would probably only work if we can assign > multiple tags to a device, but we could for instance make > /sys/block tagged, and really no container probably needs to see > /sys/block/sda. > > The device namespace would be similar, except I suspect it > would not only hide certain devices from certain namespaces, > but it would actually virtualize the device major:minor > mapping, for checkpoint/restart, so that /dev/sda could be > redirected to another device more completely than simply > fudging the nodes under /dev. > > Comments? Designs? Plans? To answer you earlier question: What did I expect the device namespace to look like. - Only purely virtual devices like /dev/pts, /dev/null, /dev/nbd and /dev/loop0 present. - Fully virtualized major/minor look up preventing us from even talking about devices in other namespaces. - Support from the user/security namespace so that mknod and mount are safe. I get a certain uncomfortable feeling about mknod and mount running free in a container without restrictions that make container without restrictions... Eric ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <m1pqrgvl20.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>]
* Re: udev in containers [not found] ` <m1pqrgvl20.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org> @ 2011-01-28 20:46 ` Serge E. Hallyn 2011-01-28 22:11 ` Oren Laadan 1 sibling, 0 replies; 4+ messages in thread From: Serge E. Hallyn @ 2011-01-28 20:46 UTC (permalink / raw) To: Eric W. Biederman Cc: Tejun Heo, Daniel Lezcano, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA Quoting Eric W. Biederman (ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org): > "Serge E. Hallyn" <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> writes: > > > Hi, > > > > Now that we are allowing udev to run in containers, Daniel has > > noticed that updates to sysfs uevent files will trigger a flurry > > of activity in all containers on the host. While not a problem > > with just a few containers, this can severaly impact performance > > with hundreds or more containers. > > > > (Daniel, would it be possible for you to get some measurements > > on host and in a container versus # of active containers, with > > and without udev? Do you have a otehrwise unused machien you > > could try that on?) > > > > Is there anything we can/should do about this? > > > > Two approaches, neither sufficiently thought out yet, would be > > to generalize the directory tagging currently used for > > /sys/class/net, and full-fledged implementation of a device > > namespace. > > > > The directory tagging would probably only work if we can assign > > multiple tags to a device, but we could for instance make > > /sys/block tagged, and really no container probably needs to see > > /sys/block/sda. > > > > The device namespace would be similar, except I suspect it > > would not only hide certain devices from certain namespaces, > > but it would actually virtualize the device major:minor > > mapping, for checkpoint/restart, so that /dev/sda could be > > redirected to another device more completely than simply > > fudging the nodes under /dev. > > > > Comments? Designs? Plans? > > To answer you earlier question: What did I expect the device namespace > to look like. > > - Only purely virtual devices like /dev/pts, /dev/null, /dev/nbd and /dev/loop0 present. > - Fully virtualized major/minor look up preventing us from even talking > about devices in other namespaces. What does an interface look like for hooking up /dev/sdc on the host to 'b 8:0' in a container? > - Support from the user/security namespace so that mknod and mount are safe. > > I get a certain uncomfortable feeling about mknod and mount running free > in a container without restrictions that make container without restrictions... -serge ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: udev in containers [not found] ` <m1pqrgvl20.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org> 2011-01-28 20:46 ` Serge E. Hallyn @ 2011-01-28 22:11 ` Oren Laadan 1 sibling, 0 replies; 4+ messages in thread From: Oren Laadan @ 2011-01-28 22:11 UTC (permalink / raw) To: Eric W. Biederman Cc: Tejun Heo, Daniel Lezcano, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA On 01/28/2011 03:18 PM, Eric W. Biederman wrote: > "Serge E. Hallyn" <serge.hallyn-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> writes: > >> Hi, >> >> Now that we are allowing udev to run in containers, Daniel has >> noticed that updates to sysfs uevent files will trigger a flurry >> of activity in all containers on the host. While not a problem >> with just a few containers, this can severaly impact performance >> with hundreds or more containers. >> >> (Daniel, would it be possible for you to get some measurements >> on host and in a container versus # of active containers, with >> and without udev? Do you have a otehrwise unused machien you >> could try that on?) >> >> Is there anything we can/should do about this? >> >> Two approaches, neither sufficiently thought out yet, would be >> to generalize the directory tagging currently used for >> /sys/class/net, and full-fledged implementation of a device >> namespace. >> >> The directory tagging would probably only work if we can assign >> multiple tags to a device, but we could for instance make >> /sys/block tagged, and really no container probably needs to see >> /sys/block/sda. >> >> The device namespace would be similar, except I suspect it >> would not only hide certain devices from certain namespaces, >> but it would actually virtualize the device major:minor >> mapping, for checkpoint/restart, so that /dev/sda could be >> redirected to another device more completely than simply >> fudging the nodes under /dev. >> >> Comments? Designs? Plans? > > To answer you earlier question: What did I expect the device namespace > to look like. > > - Only purely virtual devices like /dev/pts, /dev/null, /dev/nbd and /dev/loop0 present. I'd also want to see virtualized physical devices here - for example, containers for virtual desktops will require /dev/rtc. And I can also think of use-cases in which we'd like to let containers direct access to physical devices. For example, consider a system with 10 physical disk partitions, that we'd like to provision to containers that are allocated dynamically. We want the disk to always look like e.g. /dev/sda in all containers, but (from the "host") map a different partition to each container. > - Fully virtualized major/minor look up preventing us from even talking > about devices in other namespaces. > - Support from the user/security namespace so that mknod and mount are safe. > > I get a certain uncomfortable feeling about mknod and mount running free > in a container without restrictions that make container without restrictions... I agree. Oren ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-01-28 22:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-28 14:48 udev in containers Serge E. Hallyn
2011-01-28 20:18 ` Eric W. Biederman
[not found] ` <m1pqrgvl20.fsf-+imSwln9KH6u2/kzUuoCbdi2O/JbrIOy@public.gmane.org>
2011-01-28 20:46 ` Serge E. Hallyn
2011-01-28 22:11 ` Oren Laadan
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.