LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-06-2012, 03:39 PM   #1
humbry
LQ Newbie
 
Registered: Feb 2012
Posts: 21

Rep: Reputation: Disabled
LVM performance costs v. benefits?


Hi,

I am installing a server on a KVM-virtualized cloud server.

I only have a handful of websites and things being hosted on it, and won't need too much out of my disks. I'll probably be using two drives, one for O/S and one for user data. I don't expect in the short term that I will need to change or re-size them once I make my initial decisions.

BUT, in the long term, there is a chance the server could get more heavy use and the storage needs could change. From what I understand, that's where LVM fits in, allowing for easy re-sizing and changes on the fly.

Right now my feeling is if it comes to that, I wouldn't mind installing LVM at that time instead of now (if I had to temporarily move my data and mounts at that time, add a third drive and put LVM on top, I don't think that'd be too much of a problem).

--- Main Question---

Am I correct to assume LVM incurs at least a small performance hit? Keep in mind, I'm already taking a disk performance hit by being in a virtualized environment (actually, I wonder, are my "drives" likely to already be LVM volumes, so I'd be doing LVM on LVM?).

I'm also considering that I may use the encryption option that my provider uses for my drives, so that may be yet another performance hit to add up, so you can see, if LVM is even a small hit, it might be good to avoid unless I really need it.

If my short-to-medium term projections that I won't need to do any dynamic resizing, is there any reason at all that I'd want to use LVM?

Does it offer me any other benefits? (I already get "snapshot" capability of my drives from my cloud provider, so that one's already taken care of)

Is fdisk and mkfs going to be sufficient for me?

Last edited by humbry; 02-06-2012 at 03:42 PM.
 
Old 02-06-2012, 07:50 PM   #2
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
LVM gives you the flexibility to manage the file system, I finally got an understanding of it after a Red Hat week long course a few years ago.

I am not sure of the performance hit if any, as you can adjust the extent sizes for better performance. I use the defaults as I use other mount options like 'noatime' and such to help control endless file accessing email/web servers.

In a SAN environment LVM would really need to be mandatory, since it would give you the file system flexibility and you can create larger volumes and use (thin-provisioning) to over subscribe your LUNs.

http://docs.redhat.com/docs/en-US/Re...ion/index.html

I would not worry about LVM on LVM as you are getting flexibility of your file system. I always use a separate /, /home, /tmp, /var and /opt (on email servers) and /swap. All within the LVM itself, it is easier to manage and make more sense longterm.

As far as fdisk I still use it, I had to expand the file systems on Oracle Unbreakable servers. I carved out the storage out of the fiber channel san, assigned it to the correct servers. Ran fdisk -l discovered the storage, formatted it, and expanded the physical volumes can't remember which ones it was.

There is another command called diskpart I have used it a little but mostly fdisk it is up to the end user.

Last edited by rhbegin; 02-06-2012 at 08:08 PM. Reason: added doc link
 
Old 02-06-2012, 08:25 PM   #3
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
I prefer cfdisk
 
Old 02-07-2012, 04:32 AM   #4
humbry
LQ Newbie
 
Registered: Feb 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Thanks very much for the replies.

@rhbegin I agree that LVM is versatile in more complex environments (sounds like your answer has that in mind). However, I'm only working with a server instance hosted at a cloud provider that, if it does grow, still won't grow into anything too complex. Again, I value your answer a lot, but I'm getting the feeling that LVM is more than I need in a simple environment.

(but YES! definitely noatime on the web and email mounts!)

Last edited by humbry; 02-07-2012 at 04:33 AM.
 
Old 02-07-2012, 12:00 PM   #5
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
The 'noatime' option is by far the best thing since sliced bread.

 
Old 02-07-2012, 12:02 PM   #6
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
Quote:
Originally Posted by catkin View Post
I prefer cfdisk
What package includes this?
 
Old 02-07-2012, 03:41 PM   #7
humbry
LQ Newbie
 
Registered: Feb 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
Actually, relatime is preferrable to noatime in most cases if your kernel supports it.

cfdisk in some systems is available as its own package, but is also included in util-linux
 
Old 02-07-2012, 09:11 PM   #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 humbry View Post
Actually, relatime is preferrable to noatime in most cases if your kernel supports it.
That's interesting. Can you post an explanation or reference?
 
Old 02-07-2012, 09:28 PM   #9
humbry
LQ Newbie
 
Registered: Feb 2012
Posts: 21

Original Poster
Rep: Reputation: Disabled
IIRC, relatime updates the atime on files only if the current atime is older than the last mtime. This allows certain applications that rely on the atime attribute to still work yet still eliminates the same performance loss (unless something is constantly modifying your files).

I think a quick google should verify this. I think newer versions of Debian might even default to relatime on its mounts.
 
Old 02-08-2012, 01:04 AM   #10
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
Thanks Humbry

There's good information about relatime vs. noatime here and more detail in the pages linked from that page. Nothing new and I don't use the softwares that need atime so I'll continue with noatime.
 
  


Reply



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
Server drive partitioning for best performance (LVM vs .. ?) rollyah Linux - Server 6 01-14-2011 01:40 AM
LXer: Avoided Costs and Competitive Benefits: Estimating the Value of Linux LXer Syndicated Linux News 0 10-23-2008 07:51 AM
LVM and multiple iSCSI disks performance of LVM xxx_anuj_xxx Linux - Server 4 05-01-2008 12:26 PM
LXer: How Red Hat Linux can help you boost performance and shrink IT costs LXer Syndicated Linux News 0 11-22-2007 03:51 PM
LVM performance haimeltjnfg Linux - Hardware 1 05-27-2005 10:19 PM

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

All times are GMT -5. The time now is 05:05 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