Your filesystem / kernel module will need to provide a way to enforce the limits you want. For instance, when you mount a new tmpfs, you can specify a maximum size for the fs.
Quoting Mohan G ([email protected]): > Thanks. When i say my own file system, yes my own kernel file system written > for linux. A small yet working FS.I want to load this FS and want > applications to use them, but not consume entire cpu and memory. If i can > bring up KVM then i can set cpu and memory for this KVM and load and mount my > FS in this KVM and KVM's resource limits will directly control the FS > consumption etc. > How i can achieve the same thing without using KVM. When i mean template, i > mean the linux image used as a separate container. ( i assume i can build a > new linux distro with my FS as default) and boot it up. I am aware that > containers are user level and share the same kernel. Thank for the patience > > > On Wednesday, January 14, 2015 10:37 AM, Fajar A. Nugraha > <[email protected]> wrote: > > > You need to be more clear. More response inline > > On Wed, Jan 14, 2015 at 11:26 AM, Mohan G <[email protected]> wrote: > > > > Thanks for the reply, now i guess my specific question is. > > 1) I have my own file system which i can load to the kernel. But i want to > > restrict the file systems usage as a whole. > > Do you mean your own file system module? e.g. something like fuse? > What do you mean by "restrict the file systems usage"? Only some > container can use that type of fs? Restrict its size? > > Short version is you should set all mounts in the host (including > loading the fs module, if it's a new one), and the container can then > simply use it. Also, do NOT allow containers to mount their own > filesystem (this is already the default setting when you use ubuntu > container on ubuntu host) > > > > 2) which means if i can build a kernel template with my FS on it , then > > would i be able to set limits on memory and cpu for the FS. > > > > what "kernel template"? You DO know that containers share the same > kernel as the host, right? > Also, I see no direct connection between "memory and cpu" and the type > of filesystem. Are you perhaps confusing FS, when you mean "container" > (i.e. guest) > > > basically i am looking for ways for FS to use KVM type limit ( in terms of > > cpu and memory) without actually using KVM. > > If you mean "limit container's cpu and memory use", see earlier > response about cgroups. Again, I see no correlation between FS and > "cpu and memory". > > -- > Fajar > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users > > > _______________________________________________ > lxc-users mailing list > [email protected] > http://lists.linuxcontainers.org/listinfo/lxc-users _______________________________________________ lxc-users mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-users
