<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div dir="ltr" id="yui_3_16_0_1_1421209447884_66783"><span id="yui_3_16_0_1_1421209447884_66784">Also, i am hoping that all host mount point can be seen by containers. Is this assumption correct.</span></div> <div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" style="display: block;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Wednesday, January 14, 2015 1:47 PM, Mohan G <mohan_gg@yahoo.com> wrote:<br> </font> </div> <br><br> <div class="y_msg_container"><div id="yiv4125630400"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"><div dir="ltr" id="yiv4125630400yui_3_16_0_1_1421209447884_60411"><span id="yiv4125630400yui_3_16_0_1_1421209447884_60410">Thanks for the replies. My conclusions from the replies are that i am better of controlling the consumers of my FS via cgroups. If i decide to run my apps on containers, then i need to mount my FS on the host and create containers with limits of CPU and memory and use my FS via this container. Both these approaches seem fine and helps.</span></div><div dir="ltr" id="yiv4125630400yui_3_16_0_1_1421209447884_60411"><span><br clear="none"></span></div><div dir="ltr" id="yiv4125630400yui_3_16_0_1_1421209447884_60412"><span><br clear="none"></span></div><div dir="ltr" id="yiv4125630400yui_3_16_0_1_1421209447884_61027"><span><br clear="none"></span></div> <div class="yiv4125630400qtdSeparateBR"><br clear="none"><br clear="none"></div><div class="yiv4125630400yqt9947145371" id="yiv4125630400yqt21702"><div class="yiv4125630400yahoo_quoted" style="display: block;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px;"> <div dir="ltr"> <font size="2" face="Arial"> On Wednesday, January 14, 2015 12:28 PM, Fajar A. Nugraha <list@fajar.net> wrote:<br clear="none"> </font> </div> <br clear="none"><br clear="none"> <div class="yiv4125630400y_msg_container">As Serge said, some limits needs to be enforced by your filesystem.<br clear="none">Like tmpfs case for example, the size limit are set during mount,<br clear="none">which should be done by the host (e.g. as an option on lxc.mount.entry<br clear="none">in container config file).<br clear="none"><br clear="none">cgroup limits is AFAIK only apply to userland, and does not apply to<br clear="none">memory used by kernel modules.<br clear="none"><br clear="none">What is your fs like? Most fs that I know of (e.g. btrfs, ext4) does<br clear="none">not need particular amount of memory/cpu resource. In this case the<br clear="none">only cpu/memory limit you need to worry about are userland (handled by<br clear="none">cgroups).<br clear="none"><br clear="none">This is different from zfs, which requires huge amount of memory. But<br clear="none">even in this case the resource used are global, and can't be separated<br clear="none">per pool/dataset/mountpoint, so you won't be able to limit it per<br clear="none">container.<br clear="none"><br clear="none">fuse, on the otherhand, will use some cpu/memory resource per mounts<br clear="none">on its userland part. In this case, you can limit its cpu/memory usage<br clear="none">the same way you limit other userland processes, using cgroups.<br clear="none"><br clear="none">-- <br clear="none">Fajar<br clear="none"><br clear="none"><br clear="none">On Wed, Jan 14, 2015 at 12:25 PM, Mohan G <<a rel="nofollow" shape="rect" ymailto="mailto:mohan_gg@yahoo.com" target="_blank" href="mailto:mohan_gg@yahoo.com">mohan_gg@yahoo.com</a>> wrote:<br clear="none">> Thanks. When i say my own file system, yes my own kernel file system written<br clear="none">> for linux. A small yet working FS.<br clear="none">> I want to load this FS and want applications to use them, but not consume<br clear="none">> entire cpu and memory. If i can bring up KVM then i can set cpu and memory<br clear="none">> for this KVM and load and mount my FS in this KVM and KVM's resource limits<br clear="none">> will directly control the FS consumption etc.<br clear="none">><br clear="none">> How i can achieve the same thing without using KVM. When i mean template, i<br clear="none">> mean the linux image used as a separate container. ( i assume i can build a<br clear="none">> new linux distro with my FS as default) and boot it up.<br clear="none">> I am aware that containers are user level and share the same kernel. Thank<br clear="none">> for the patience<br clear="none">><br clear="none">><br clear="none">><br clear="none">> On Wednesday, January 14, 2015 10:37 AM, Fajar A. Nugraha <<a rel="nofollow" shape="rect" ymailto="mailto:list@fajar.net" target="_blank" href="mailto:list@fajar.net">list@fajar.net</a>><br clear="none">> wrote:<br clear="none">><br clear="none">><br clear="none">> You need to be more clear. More response inline<br clear="none">><br clear="none">> On Wed, Jan 14, 2015 at 11:26 AM, Mohan G <<a rel="nofollow" shape="rect" ymailto="mailto:mohan_gg@yahoo.com" target="_blank" href="mailto:mohan_gg@yahoo.com">mohan_gg@yahoo.com</a>> wrote:<br clear="none">>><br clear="none">>> Thanks for the reply, now i guess my specific question is.<br clear="none">>> 1) I have my own file system which i can load to the kernel. But i want to<br clear="none">>> restrict the file systems usage as a whole.<br clear="none">><br clear="none">> Do you mean your own file system module? e.g. something like fuse?<br clear="none">> What do you mean by "restrict the file systems usage"? Only some<br clear="none">> container can use that type of fs? Restrict its size?<br clear="none">><br clear="none">> Short version is you should set all mounts in the host (including<br clear="none">> loading the fs module, if it's a new one), and the container can then<br clear="none">> simply use it. Also, do NOT allow containers to mount their own<br clear="none">> filesystem (this is already the default setting when you use ubuntu<br clear="none">> container on ubuntu host)<br clear="none">><br clear="none">><br clear="none">>> 2) which means if i can build a kernel template with my FS on it , then<br clear="none">>> would i be able to set limits on memory and cpu for the FS.<br clear="none">>><br clear="none">><br clear="none">> what "kernel template"? You DO know that containers share the same<br clear="none">> kernel as the host, right?<br clear="none">> Also, I see no direct connection between "memory and cpu" and the type<br clear="none">> of filesystem. Are you perhaps confusing FS, when you mean "container"<br clear="none">> (i.e. guest)<br clear="none">><br clear="none">>> basically i am looking for ways for FS to use KVM type limit ( in terms of<br clear="none">>> cpu and memory) without actually using KVM.<br clear="none">><br clear="none">> If you mean "limit container's cpu and memory use", see earlier<br clear="none">> response about cgroups. Again, I see no correlation between FS and<br clear="none">><br clear="none">> "cpu and memory".<br clear="none">><br clear="none">><br clear="none">> --<br clear="none">> Fajar<br clear="none">> _______________________________________________<br clear="none">> lxc-users mailing list<br clear="none">> <a rel="nofollow" shape="rect" ymailto="mailto:lxc-users@lists.linuxcontainers.org" target="_blank" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br clear="none">><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> lxc-users mailing list<br clear="none">> <a rel="nofollow" shape="rect" ymailto="mailto:lxc-users@lists.linuxcontainers.org" target="_blank" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a><div class="yiv4125630400yqt7960431295" id="yiv4125630400yqtfd21706"><br clear="none">_______________________________________________<br clear="none">lxc-users mailing list<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:lxc-users@lists.linuxcontainers.org" target="_blank" href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br clear="none"><a rel="nofollow" shape="rect" target="_blank" href="http://lists.linuxcontainers.org/listinfo/lxc-users">http://lists.linuxcontainers.org/listinfo/lxc-users</a></div><br clear="none"><br clear="none"></div> </div> </div> </div></div> </div></div></div><br><br></div> </div> </div> </div> </div></body></html>