LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Using postgres on kvm virtual server (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/using-postgres-on-kvm-virtual-server-856821/)

tirab 01-17-2011 07:36 AM

Using postgres on kvm virtual server
 
Hello,

I'm planning to virtualize one of my production servers. It has postgres 8.2, and I would know if someone had experience of running postgres on a virtual server.

Regards.

steve_dupuis 01-17-2011 09:43 AM

I've been using the Oracle Sun version of Virtualbox quite successfully. It allows proper allocation of USB devices, networking, video and sound - not important if you are going to create a postgres database server.

I suggest you check these sites for more information (and search their forums):

http://www.linux-kvm.org/page/Main_Page
http://www.virtualbox.org
http://www.postgresql.org

Regards,
Steve Dupuis
Ottawa, Canada

dyasny 01-18-2011 03:11 PM

1. I have been running MSSQL and MSJET (Exchange and AD) in production for a while now, on KVM machines - no problem.
2. I know of several Oracle production setups on top of KVM - again, stable all the way
3. I have seen quite a few LAMP hosts on KVM, so MySQL seems to be working OK as well
4. No personal experience with PG, but what I would do to make it work is as follows:

A stable Enterprise-class Linux distro as the platform (yes, I'd go for RHEL)
VirtIO drivers for disk and network
Virtual disk image residing on a fast and reliable storage (RAID10 LUN, on a well maintained SAN would be best, but that costs)
Virtual disk image should not be using any of QEMU's caching options, meaning use cache=none. Slightly slower, but much safer for heavily utilised v-disk
Unless you absolutely must use v-disk snapshots, stick to RAW disks, not qcow2 - there's a bit of performance penalty, if you want the extra features.
Provide the VM with multiple v-CPUs and enough RAM

Oh, and if you can stress-test the thing in a test host and VM before you go into production, that would be best.

Hope _this_ helps.

tirab 01-26-2011 05:48 AM

Quote:

Originally Posted by dyasny (Post 4229204)
1. I have been running MSSQL and MSJET (Exchange and AD) in production for a while now, on KVM machines - no problem.
2. I know of several Oracle production setups on top of KVM - again, stable all the way
3. I have seen quite a few LAMP hosts on KVM, so MySQL seems to be working OK as well
4. No personal experience with PG, but what I would do to make it work is as follows:

Thanks for you information and suggestion.

I'm working on a test server with slackware linux (this is the distro we are using for all of our servers).

Following your suggestion I'll try also using VirtIO drivers and no cache.


All times are GMT -5. The time now is 10:32 AM.