Date: Wed, 24 Jun 2009 07:16:13 +1000 From: Andrew Snow <andrew@modulus.org> To: Tom Haapanen <tomh@motorsport.com> Cc: freebsd-jail@freebsd.org Subject: Re: Memory usage across multiple jails Message-ID: <4A41461D.4000009@modulus.org> In-Reply-To: <0c1201c9f43e$166c8450$43458cf0$@com> References: <0c1201c9f43e$166c8450$43458cf0$@com>
next in thread | previous in thread | raw e-mail | index | archive | help
Tom Haapanen wrote: > I am wondering whether there are any comparative > efficiencies in memory utilization. Will the jails share the disk cache, > for example, or does each jail allocate its own? Will other kernel > structures (and code!) be shared across jails, or allocated multiple times? > And what about userland applications, like httpd, for example? (I suspect > userland would not be able to benefit, but that's just a guess.) It is extremely efficient. It is as if the host system sees a single system with the processes of all the jails running. * the jails share disk cache * jails don't have any reserved memory so any unused memory returns to the free pool of the kernel, available for disk cache * there is a single kernel shared across all jails * userland code can also be shared across jails *if* you run the code from the same set of on-disk binaries (which is not the way most people set up jails) * since there is only a single kernel all network and disk I/O from the jails goes at the same speed as the host However, VMware installations are now able to achieve the same level of efficiency using the following measures: * "transparent page sharing" stores only a single copy of shared memory pages * free and unused memory in each guest can be used by installing the vmmemctl driver (part of VMware-tools) * disk cache can be "shared" by using shared storage (NAS) * paravirtualisation drivers for disk and networking in the guest can achieve full host speed & efficiency - Andrew
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A41461D.4000009>