Operating System - HP-UX
1848424 Members
3235 Online
104027 Solutions
New Discussion

Recommended Number of LV's per VG

 
SOLVED
Go to solution
Tonya Underwood
Regular Advisor

Recommended Number of LV's per VG

I know max lv's per vg is 255... Is there a recommended number? Cannot seem to find recommendations.

Thanks,
Tonya Underwood
13 REPLIES 13
Sundar_7
Honored Contributor

Re: Recommended Number of LV's per VG

There is no hard and fast rule Tonya. I would be more concerned about the number of PVs in the VG than the number of LVs.

If the PVs are from an intelligent array, like a XP, I would suggest picking the luns from the different RAID Group and striping the LV across the luns.

If you dont have powerpath/securepath installed, you will need to carefully select the primary links so as to distribute the load across the cluster ports. (CL1/CL2)
Learn What to do ,How to do and more importantly When to do ?
Bill Hassell
Honored Contributor

Re: Recommended Number of LV's per VG

An lvol is just a chunk of space in the volume, so if you need a very large filesystem, then create 1 lvol that is the size of the entire volume. If you need a number of lvols for different purposes such as indexes, temp files, data files, etc, then create them as needed. There is no recommendation except to keep things reasonable simple. Having hundreds of lvols just increases your efforts as a sysadmin.


Bill Hassell, sysadmin
Patrick Wallek
Honored Contributor
Solution

Re: Recommended Number of LV's per VG

No real recommendation that I have ever heard of. Essentially it is whatever works best in your environment.

If your VG can handle the number of disks, you could have 1 large VG with a whole lot of LVs.

If you have several applications on a machine, it may make sense to split each apps data into a separate VG to make management easier.

It also depends on how large your disks are. If you have a single giant disk, then you are restricted to a single VG with multiple LVs. If you have lots of smaller disks, it may make more sense to split them up into multiples.

Whatever is easiest for you.
Geoff Wild
Honored Contributor

Re: Recommended Number of LV's per VG

There is no recommendation from a performance point of view.

So, your next question may be - why have more then 1? for flexibility.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
James R. Ferguson
Acclaimed Contributor

Re: Recommended Number of LV's per VG

Hi Tonya:

One consideration, is that the maxiumum number of logical volumes as defined at 'vgcreate' (via 'max_lv') influences the size of VGRA (Volume Group Reserved Area). Since the VGRA must fit into one physical disk extent, choosing a value that is very high in relation to your needs is potentially troublesome. It is noteworthy, though, that the 'max_lv' value has the lowest impact on the overall VGRA size, behind that of 'max_pe', 'max_pv' and 'pe_size'. Still, I try to choose "reasonable" 'max_lv' values that fit my current and my anticipated layouts.

Regards!

...JRF...
Deoncia Grayson_1
Honored Contributor

Re: Recommended Number of LV's per VG

As mentioned above, there's no real recommendation for the number of logical volumes you create but it depends upon your current environment setup. We create different logical volumes for our database or application needs, so basiclly its up to you on how you want to set up your logical volumes for your system needs.
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Devender Khatana
Honored Contributor

Re: Recommended Number of LV's per VG

Hi,

There are no suggestions for max LV's actually.
The important parameters you should be worried about while creating the VG shall be PE_Size,MAX_PE_PER_PV & MAX_PV_PER_VG.

HTH,
Devender
Impossible itself mentions "I m possible"
Tonya Underwood
Regular Advisor

Re: Recommended Number of LV's per VG

Thanks everyone... the fact is I need 500 lvols... rawspaces...

So it was more a question of if I create 10 vg's with 50 a piece, do I get better performance than creating 2 vg's with 250 a piece.

From the above recommendations, I believe the conclusion is "it just doesn't matter".

As always, thanks so much and correct me if I've come to the wrong conclusion. I will assign points when I close the question...

Tonya
Stephen Keane
Honored Contributor

Re: Recommended Number of LV's per VG

Simplistically, you'd get better performance from 10 VGs with 50 LVs apiece for the simple reason that you'd have 10 physical disks, each capable of working independently.
James R. Ferguson
Acclaimed Contributor

Re: Recommended Number of LV's per VG

Hi Tonya:

I don't think that performance is going to differ much between the case of a small number of volume groups each containing a large number of logical volumes; versus a large number of volume groups each containing a relatively few logical volumes. I think the choice is one of how you want to mangage the volume groups and their physical disk. You should consider the potential to *add* more physical disk to a volume group later. Remember that the VGRA must fit into one physical extent and once a volume group is created, it's VGRA geometry is fixed (at least in current releases).

Since you cited ten (10) volume groups as one choice, I would point out that you may need to adjust your kernel's 'maxvgs'. The default value is ten and you already have vg00 counted at the first. The maximum value is 255, but don't inflate your setting unnecessaryily. About 4-8KB of lockable physical memory is consumed for each increment in 'maxvgs'.

Regards!

...JRF...
Tonya Underwood
Regular Advisor

Re: Recommended Number of LV's per VG

Thanks everyone. I will stick with two VG's. maxvgs has been tuned...
Deoncia Grayson_1
Honored Contributor

Re: Recommended Number of LV's per VG

I'm currently in a scenario where I have to create 250 lvs for rawspaces, so I've decided they are going to be mirrored and setup PVG strict/distrubuted so my physical extents are evenly distrubuted instead of simply strict which will take up all of the physical extents on each disk in the primary group until they are completely exhausted and all my free PE are on the mirrored half. I'm creating 4 volume groups to accomplish this purpose, just because it will be easier for me to manage.

If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Tor-Arne Nostdal
Trusted Contributor

Re: Recommended Number of LV's per VG

Just a small note...

A reason for splitting in several lvols might be if you want to have different mount parameters for the lvols...

I'm trying to become President of the state I'm in...