Operating System - HP-UX
1748288 Members
3322 Online
108761 Solutions
New Discussion юеВ

Re: How to find OS block Size

 
SOLVED
Go to solution
Sushil Singh_1
Advisor

How to find OS block Size

Hi All,
Trying to create database on HP-UX. It been long I worked on HP. I needed to know how to find the Operating System Block Size and can I increase or decrease it as needed ?

Thanks you all
Sushil
9 REPLIES 9
Brian Bergstrand
Honored Contributor
Solution

Re: How to find OS block Size

Depends on the filesystem. HFS uses an 8K block by default, and JFS uses a 1K block (but allocates in multiple blocks called extents).

Using 'fstyp -v' on the filesystem device will give some superblock info that contains the block size.

eg:

fstype /dev/vg00/lvol1

HTH.
James A. Donovan
Honored Contributor

Re: How to find OS block Size

fstyp -v /dev/vgXX/lvolY

f_bsize will show you the block size of the filesystem in bytes. To change the block size would require rebuilding the filesystem.
Remember, wherever you go, there you are...
Jeff Schussele
Honored Contributor

Re: How to find OS block Size

Hi Sushil,

If you mean disk block size, the default is 1K. But this *could* be overriden with the -b parm of the mkfs command at FS creation time.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
prasad_15
Advisor

Re: How to find OS block Size


df -g
Jeff Schussele
Honored Contributor

Re: How to find OS block Size

Let me refine that answer - defaults are as follows:

FS size < 8GB = 1024
FS size > 8 & < 16 = 2048
FS size > 16 & < 32 = 4096
FS size > 32 GB = 8192

But again this can be overriden.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: How to find OS block Size

Surprisingly, if you are using vxfs filesystems (and you certainly should be), and in spite of what has been beaten into your head by Oracle, filesystem block size does not matter. Vxfs filesystems are extent-based, so that unlike hfs filesystems, it really doesn't matter. Things like LVOL stripe size matter much more and for that 64K is a rather good value for LVOL's which host vxfs filesystems.
If it ain't broke, I can fix that.
Con O'Kelly
Honored Contributor

Re: How to find OS block Size

Hi Sushil

I'd point out that if you use fstyp -v to determine block size you need to look at the 'f_frsize' parameter not as you would assume 'f_bsize' parameter. The f_bsize parameter doesn't report the correct block size.

You can also use the following command:
# mkfs -m
(eg mkfs -m /dev/vg01/lvol3)
This will show you all the parameters used to create the filesystem including block size (look for bsize value which is in bytes).

Also have a look at the JFS Fileyststem Admin Guide:
http://docs.hp.com/hpux/pdf/B3929-90011.pdf

Cheers
Con
Con O'Kelly
Honored Contributor

Re: How to find OS block Size

Hi (again)

I found a thread to confirm what I said in the previous post about fstyp -v command:
http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0x22307b8d1de3d5118ff40090279cd0f9%2C00.html&admit=716493758+1066968007792+28353475

To summarise:
For vxfs filesystems the 'f_bsize' parameter shows the maximum block size, while the 'f_frsize' parameter shows the actual block size.

Cheers
Con