LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-03-2010, 12:43 AM   #1
klabacita
Member
 
Registered: Dec 2009
Posts: 33

Rep: Reputation: 16
Question LVM vs No-LVM?


Hi people.

I would setup soon a mysql server+php+apache, this server will run inside a vm with xen.

Normally mysql run inside /var, this vm will have:

8GB RAM
64GB for this vm.

The host will have Raid-10 with md.

My question is, is better(disk speed) to setup this vm using the default layout lvm:
Code:
/
swap
Or LVM+ext4 with manual layout:
Code:
/
swap
var
usr
tmp
Or no LVM and manual setup ext4:
Code:
/
swap
var
usr
tmp
I meant disk speed, using this layouts do I have to receive better performance using one of this layouts, I know that I have to check my self, hw, etc, but my point is, which one is better for a DB server with a lot of writes and reads or doesn't matter if I use LVM or not LVM with manual or auto partitions.

Hope u could understand my point, thanks!!!
 
Old 06-03-2010, 01:48 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
HI -

If you're running this thing in a VM, clearly a simple filesystem (eg. ext3 or ext4) should give you the better performance!

IMHO .. PSM
 
Old 06-03-2010, 02:43 AM   #3
klabacita
Member
 
Registered: Dec 2009
Posts: 33

Original Poster
Rep: Reputation: 16
Smile

Thanks paulsm4 for your quick answer.

Last thing, went u say:

Quote:
simple filesystem (eg. ext3 or ext4)
Do u meant that I better make a manual layout or auto layout?

Code:
 /
 swap
or
Code:
/
swap
/var
/tmp 
/usr
Thanks again
 
Old 06-03-2010, 08:33 AM   #4
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
I would use logical volumes, personally. I've never heard of LVMs causing a noticeable drop in performance.
 
Old 06-03-2010, 10:22 AM   #5
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
In the real world, with physical drives, sure.

In a VM, with an apparently I/O intensive application - no. I'd definitely recommend a simple filesystem.
 
Old 06-03-2010, 12:13 PM   #6
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
Quote:
Originally Posted by paulsm4 View Post
In the real world, with physical drives, sure.

In a VM, with an apparently I/O intensive application - no. I'd definitely recommend a simple filesystem.
What kind of performance hit have you seen using logical volumes inside of a virtual machine? I haven't worked on a lot of database servers so I could be wrong.
 
Old 06-05-2010, 10:25 PM   #7
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
So this really made me curious. I ran bonnie++ in two virtual machines, one used logical volumes and one just used a filesystem and regular partitioning. Here's the results.

Virtual Machine using LVM

Code:
Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
localhost.locald 2G 33702  54 43904   9 25366  10 43617  69 340213  93 +++++ +++
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
               1024 19801  30 64095  56   524   1 16236  25 76682  73   231   0
Virtual Machine not using LVM

Code:
Version  1.03       ------Sequential Output------ --Sequential Input- --Random-
                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
localhost.locald 2G 41457  67 40447   9 16199   5 55152  87 338124  89 +++++ +++
                    ------Sequential Create------ --------Random Create--------
                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
               1024 24548  38 73572  66   495   1 15871  25 75818  76   213   0

The first section (top portion of each test) is what we're interested in when talking about database performance, and the import part of that section is the block read/write section. The VM using logical volumes seemed to actually perform a little better, surprisingly. The VM using logical volumes had a block write speed of 43.9/MBs while the VM not using logical volumes had a block write speed of 40.4/MBs. With regards to block reads, the VM using logical volumes had a block read speed of 340/MBs while the VM not using logical volumes had a block read speed of 338/MBs.

So it seems that the difference is negligible, but when you take into account the convenience of logical volumes I'd go that route. If anyone has any input and conflicting opinions or tests I'd love to see it.
 
Old 06-06-2010, 12:23 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by JD50 View Post
So this really made me curious. I ran bonnie++ in two virtual machines, one used logical volumes and one just used a filesystem and regular partitioning. Here's the results.
Thanks for sharing

Could the difference be explained by physical location on disk? Tracks located toward the outside of the platters would perform better than tracks nearer the centre.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LVM: reading the contents of just a part of the LVM... s2cuts Linux - General 4 03-18-2010 01:19 PM
lvm ontop of raid10 or combine two raid1 via lvm? okar Linux - Server 3 09-11-2009 02:37 PM
LVM and multiple iSCSI disks performance of LVM xxx_anuj_xxx Linux - Server 4 05-01-2008 12:26 PM
LXer: Managing LVM with the LVM Manager LXer Syndicated Linux News 0 03-16-2008 11:10 AM
LXer: Back Up (And Restore) LVM Partitions With LVM Snapshots LXer Syndicated Linux News 0 04-17-2007 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration