Operating System - HP-UX
1751910 Members
5139 Online
108783 Solutions
New Discussion юеВ

Re: PE size, is 4Mb better or 8Mb?

 
SOLVED
Go to solution
M Zubair_1
Advisor

PE size, is 4Mb better or 8Mb?

I am setting up few new VGs and need to know the best practice of creating them.
By default PE size per VG is 4Mb. I was told that using a size of 8Mb gives more flexibility. Can someone describes advantages one over another?
6 REPLIES 6
Mark Grant
Honored Contributor

Re: PE size, is 4Mb better or 8Mb?

Well one of the advantages is that, given the maximum number of physical extents you can have in a volume group is 65535, you are limited to 256GB in the volume group with 4MB PE size. With 8MB PE size you can have double the number of physical extents.

However, the larger the extent size, the less fine grained can your logical volume sizes be.

Some application recommend at least 8MB PE size so I imagine there is more to it than this.
Never preceed any demonstration with anything more predictive than "watch this"
Steven E. Protter
Exalted Contributor

Re: PE size, is 4Mb better or 8Mb?

That depends how much data you want in the VG.

If you want a lot of data, say over 100 GB you need a bigger PE size to fit all that nice data in one volume group.

There are LVM limitations that have to be dealt with.

I generally go default except for large(relative term) Oracle data volume groups.

There is not much performance benefit from large PE sizes according to threads I have asked others on this topic.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
M Zubair_1
Advisor

Re: PE size, is 4Mb better or 8Mb?

does Alternate link has anything to do w/ PE?
I came across a situation where I wasn't able to add alternate links to a VG only because my PE was set to 4Mb. Can someone explain that?
Thx
MANOJ SRIVASTAVA
Honored Contributor
Solution

Re: PE size, is 4Mb better or 8Mb?

Alternate Link doesnt have anyhting to do with the PE size , it is just the path for the second HBA going to the same device , it is always better to create a volume group with PE set to 8 and not 4 as genrally you will have bulky data now or in future and that time you may like to destroy the VG and recreate it just becasue it was built with this limitation.


Manoj
Bill Hassell
Honored Contributor

Re: PE size, is 4Mb better or 8Mb?

Recommendations by vendors about block sizes are not related to LVM PE sizes. This is an internal allocation unit that is completely transparent to applications. As mentioned, the granularity of an lvol must be in whole PE's so if you want a 25meg lvol but your PE size is 16meg, the lvol will be rounded up to 32meg. A 16meg PE size is required to handle a terabyte of disk space since the maximum number of PE's is always 65k. When you're talking about 1000megs of space, you probably won't be creating 25meg lvols...

Look to the future! You CANNOT add more disks to a volume group if it will require more than 65k PE's--the volume group must be destroyed and recreated. If the application could possibly grow to more than 1Tb, then choose a PE size of 32meg.


Bill Hassell, sysadmin
Gary Powell_1
Occasional Contributor

Re: PE size, is 4Mb better or 8Mb?

You are probably allocating from a SAN or some other array and don't care about disk sizes so much. But if you are like me and still have some systems with 9 GB disk you may want to use a smaller PE to reduce the amount of space lost on each disk because the last PE is larger than the space remaining on the disk. Typically you lose about half of the PE size per disk.

Cheers,
Gary