OpenVZ Forum


Home » Mailing lists » Users » Sharing pages between VMs
Sharing pages between VMs [message #6571] Wed, 20 September 2006 11:36 Go to next message
Enrico Weigelt is currently offline  Enrico Weigelt
Messages: 31
Registered: July 2006
Member
Hi folks,

is it possible to share pages between several VMs if they use
the same filesystem ?

This would have the advantage that, for example, processes on
several VMs mmap the files (ie. text segments),
much memory would be saved.


thx
--
------------------------------------------------------------ ---------
Enrico Weigelt == metux IT service - http://www.metux.de/
------------------------------------------------------------ ---------
Please visit the OpenSource QM Taskforce:
http://wiki.metux.de/public/OpenSource_QM_Taskforce
Patches / Fixes for a lot dozens of packages in dozens of versions:
http://patches.metux.de/
------------------------------------------------------------ ---------
Re: Sharing pages between VMs [message #6572 is a reply to message #6571] Wed, 20 September 2006 14:06 Go to previous messageGo to next message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Enrico Weigelt wrote:
> Hi folks,
>
> is it possible to share pages between several VMs if they use
> the same filesystem ?

This is done "autmatically" :)
When two VEs open/mmap the same file it's pages
are shared between them.

>
> This would have the advantage that, for example, processes on
> several VMs mmap the files (ie. text segments),
> much memory would be saved.
>
>
> thx
Re: Re: Sharing pages between VMs [message #6573 is a reply to message #6572] Wed, 20 September 2006 14:09 Go to previous messageGo to next message
Cranky is currently offline  Cranky
Messages: 14
Registered: September 2005
Location: Manchester, UK
Junior Member

I am out of the office until Tuesday 26th September 2006.

Please contact our team via the following for any issues relating to a hosting account:

Billing - billing[at]transnexis.com
Domain Renewals/Transfers/Registrations - domains[at]transnexis.com
Sales - sales[at]transnexis.com
Support - support[at]transnexis.com (24/7)

If you have any queries please contact Damien Ransome via damien@transnexis.com, and for problems with technical support please email Daniel Pop via daniel@transnexis.com.

For anything else I will get back to you as quickly as possible when I return.

Regards,

Andrew Cranson
Transnexis Hosting
www.transnexis.com
Re: Sharing pages between VMs [message #6860 is a reply to message #6572] Mon, 25 September 2006 19:38 Go to previous messageGo to next message
Enrico Weigelt is currently offline  Enrico Weigelt
Messages: 31
Registered: July 2006
Member
* Pavel Emelianov <xemul@openvz.org> wrote:
> Enrico Weigelt wrote:
> > Hi folks,
> >
> > is it possible to share pages between several VMs if they use
> > the same filesystem ?
>
> This is done "autmatically" :)
> When two VEs open/mmap the same file it's pages
> are shared between them.

Cool :)
Now the interesting question: how can I mount several dirs in
away that one VE cannot hurth another and mmap'ing is possible
(AFAIK network filesystems are not mmap-capable).
Does simfs handle all that properly ?


cu
--
------------------------------------------------------------ ---------
Enrico Weigelt == metux IT service - http://www.metux.de/
------------------------------------------------------------ ---------
Please visit the OpenSource QM Taskforce:
http://wiki.metux.de/public/OpenSource_QM_Taskforce
Patches / Fixes for a lot dozens of packages in dozens of versions:
http://patches.metux.de/
------------------------------------------------------------ ---------
Re: Sharing pages between VMs [message #6949 is a reply to message #6860] Thu, 28 September 2006 12:32 Go to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Enrico Weigelt wrote:
> * Pavel Emelianov <xemul@openvz.org> wrote:
>
>> Enrico Weigelt wrote:
>>
>>> Hi folks,
>>>
>>> is it possible to share pages between several VMs if they use
>>> the same filesystem ?
>>>
>> This is done "autmatically" :)
>> When two VEs open/mmap the same file it's pages
>> are shared between them.
>>
>
> Cool :)
> Now the interesting question: how can I mount several dirs in
> away that one VE cannot hurth another and mmap'ing is possible
> (AFAIK network filesystems are not mmap-capable).
> Does simfs handle all that properly ?
>

Unfortunately no. Simfs doesn't have any builtin sharing/protection.

You may bind-mount some subtree into several VEs for needed
shared subdirs, but you must make some write-protection manually.
This is usefull for "/bin" for example.

>
> cu
>
Previous Topic: OS Versions
Next Topic: kernel: TCP: time wait bucket table overflow
Goto Forum:
  


Current Time: Fri Nov 15 16:17:14 GMT 2024

Total time taken to generate the page: 0.03244 seconds