[Dovecot] Virtual Servers
Phil Turmel
philip at turmel.org
Mon Jun 27 22:48:17 EEST 2011
Hi Daniel,
On 06/27/2011 02:40 PM, Daniel L. Miller wrote:
> Maybe a little off-topic - but I hope not too much.
>
> Looking for some insight on setting up Dovecot under a virtual server. In particular, I use VirtualBox - and at the moment, Ubuntu Linux.
>
> Initial questions on configuration:
>
> Caching. It seems to me - and I'm probably wrong - that running a Linux in a VM on a Linux host, there would be a duplication of caching. That is, the host server has a file cache - and the VM, which is otherwise a standard Linux installation, is also going to try to cache its files. This strikes me as a duplication of effort and waste of RAM. Is this something I should devote any time to thinking about and trying to minimize? If so, how?
In the storage configuration of your VM, where you select the type of interface to emulate, there's a checkbox for using the Host's I/O cache.
> Mail storage. My current mail store is a RAID-10, using the mdbox format. I wish to continue storing the mail on "raw" disks - not place the mail inside a virtual disk. Accordingly, the VM needs to reach the mail outside the VM environment - which according to conventional wisdom means NFS. My initial testing shows NFS results in a dramatically reduced performance for Dovecot. Given that this NFS access is going to be exclusively for Dovecot, and I'm only running a single server, are there any NFS or Dovecot tweaks I should implement? Is there an alternative connectivity for the VirtualBox environment I should explore?
If you can set aside entire block devices for use in the VM, you can create a vmdk that performs a 1:1 mapping from the virtualized disk to the given block device. The block device will be partitionable inside the VM, even if it is a partition itself. If you need to, you can access those partitions from the host with the "partx" or "kpartx" utilities (with the VM shut down, of course).
The command you want is "VBoxManage internalcommands createrawvmdk"
On the other hand, if the host and the guest need simultaneous access, you will need some form of network filesystem.
HTH,
Phil
More information about the dovecot
mailing list