Installing MySQL inside Virtualbox VM or on the host

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Installing MySQL inside Virtualbox VM or on the host

Post by LesD » 2014-11-02 19:37

Can anyone comment on the advisability of installing MySQL inside a Virtualbox VM running hMS.

When I set up my hMS in an XP based VM (1024 MB memory) I decided

1. The mail data folder would reside on the host server

2. That it would be ill advised to install MySQL inside the VM

So the VM contains hMS and ASSP while MySQL runs on the host server.

Following an other thread (on desirable long term developments of hMS) the topic of recovery keeps coming up and I have given some though as to whether I should change my methodology.

Using a VM has many advantages but having MySQL on the server does complicate backup and recovery.

I was wondering whether I should now include MySQL inside the VM. I think that would make recovery much simpler and much more portable.

The main question is whether the VM with some additional memory would be able to run MySQL. How much extra memory?

A dump of the database currently takes sub second on my server so even in the VM I do not see that being an issue - to dump the database often onto the server for live backup.

User avatar
mattg
Moderator
Moderator
Posts: 20799
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Installing MySQL inside Virtualbox VM or on the host

Post by mattg » 2014-11-03 03:05

LesD wrote:The main question is whether the VM with some additional memory would be able to run MySQL. How much extra memory?
Yes.

MySQL is very memory conservative.

Another 1 Gig should be heaps.
Mine is currently at 240 MB, but has peaked at 1.5 Gb (during a backup I'd guess)
I currently have 7 domains and about 100 accounts, with about 18 Gb of Messages.
My MySQL also drives my web sites (mostly Word Press sites) and a few other things like my invoicing etc.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

percepts
Senior user
Senior user
Posts: 5282
Joined: 2009-10-20 16:33
Location: Sceptred Isle

Re: Installing MySQL inside Virtualbox VM or on the host

Post by percepts » 2014-11-03 05:40

INNODB table type seems to use a lot more memory.
And whilst MySQL can be installed on your VM you can specify elsewhere for the schemas to be stored and you could have MySQL installed outside of the VM and have you schemas installed inside your VM for covinience of backup.
But I rekon for overall best performance INNODB and lots of memory inside your your VM will probably be best. If you have limited memory then use MYISAM tables and switch INNODB off.
With INNODB switched OFF on my system and using all MYISAM tables, MYSQLD.exe uses only 30MB of memory when its not doing anything.

LesD
Senior user
Senior user
Posts: 343
Joined: 2009-01-15 20:22
Location: London, UK.

Re: Installing MySQL inside Virtualbox VM or on the host

Post by LesD » 2014-11-03 08:34

Thanks to you both. I will give it a go.

Post Reply