Operating System - HP-UX
1752726 Members
5515 Online
108789 Solutions
New Discussion юеВ

What value to use for max_pv & pe_size

 
Dave Johnson_1
Super Advisor

What value to use for max_pv & pe_size

I am going to be rebuilding all the volume groups, except vg00, on all 4 servers connected to my large disk array. The default value for max_pv is 16 & pe_size=4MB. I have several volumes already at 15 pv's and want to change that value. What is the impact of changing this value to 255 (the max value) instead of only 32?
If the pe_size is 4MB, does the OS read/allocate space to a file based on this 4MB or the old 512 byte size?

Thanks
-Dave
5 REPLIES 5
Martin Johnson
Honored Contributor

Re: What value to use for max_pv & pe_size

Space allocation is based on pe_size. More inmportantly, pe_size will determine whether you can use all the space on a disk. A pe_size=4MB will not be able to access all of a 73GB drive.

With today's need for more disk space and the use of bigger drives, the max_pv and pe_size defaults are too small.

Assigning the max values increases overhead a little, but it cannot be changed after the volume group is created. I'd go with the max values rather than get into a situation where I need to recreate the volume group (which can be a time consuming process).

HTH
Marty
A. Clay Stephenson
Acclaimed Contributor

Re: What value to use for max_pv & pe_size

No real problem with changing the max_pc although I can't imagine a VG needing more than
64 -- and that would be a nightmare.

The PE size does not affect how space is allocated within a filesystem --- remember the LVOL is way below the filesystem. The major impact of PE size is the ultimate size of the VG. A secondary impact is the "stripe" size if you are doing extent-based striping but in that case you would want the smallest possible stripe -- a PE of 1MB and that's still far too large to be a good stripe.

I suggest that when you recreate the VG, you start with the largest LUN or drive or specify a -e max_pe that will accomodate your largest anticipated physical volume.
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: What value to use for max_pv & pe_size

Hi Dave:

The values for 'max_pv', 'pe_size', 'max_pe' and 'max_lv' all factor into the size of the LVM header which then *must* fit into one physical disk extent.

'pe_size' is usually adjusted upwards to accomodate larger LVM headers. I would think about your long term storage needs carefully. As physical disks become larger (i.e. with more physical extents) you would want to be able to support a larger 'max_pe' value than perhaps you do today. Thus I would tend to trade 'max_pv' toward a lower value and 'max_pe' to a larger one as I plan for adding disks over time.

The 'pe_size' is the mininum size for allocatiing disk extents. It is the granule at which LVM mirrors extents but it does not enter into file space allocation. Remember, a filesystem resides *within* the logical volume "container".

Regards!

...JRF...
Dave Johnson_1
Super Advisor

Re: What value to use for max_pv & pe_size

Thank you for the comments so far.

Lets add to the mix, this all resides on an XP512 using RAID-5 and OPEN-9 resulting in 7040MB LUN's presented to the OS. Max_pe is per physical volume so that number will not change as all LUN's are a maximum of 7040MB (I can use VSC to create smaller ones from the left overs, but lets ignore that for now) and I intend to use the same pe_size for all volumes. It would be easier (to remember) if I left pe_size at the default of 4MB. That means max_pe will always be 1760.
Given that all LUN's from the XP will be 7GB, it is not that hard to believe that some day I will double from 15 LUN's in a vg (the value of 2 VG's at 96% utilization) to 32. At that time I would have to repeat this exercise and rebuild that VG.
Does anyone really know the overhead cost of different values for max_pv? Why not set it to 255 and never worry about it again?

-Dave
James R. Ferguson
Acclaimed Contributor

Re: What value to use for max_pv & pe_size

Hi Dave:

If you want to set the 'max_pv' value to 255 then you can. This parameter has fairly little impact on the LVM header (VGDA) size and hence its required fit into one physical disk extent. The values of 'pe_size' and 'max_pe' have the most effect on the LVM table size.

Regards!

...JRF...