1836617 Members
2078 Online
110102 Solutions
New Discussion

block size default

 
SOLVED
Go to solution
lastgreatone
Regular Advisor

block size default

Hi, our Oracle dba set the instances block size to 2Kb, he tells me that the hpux 11/64 L-class server default block size. I thought 8Kb was the default, how do I find this out?
7 REPLIES 7
Christopher Caldwell
Honored Contributor
Solution

Re: block size default

Should be 8192 on vxfs by default.

#fstyp -v /dev/vg[yourvgname]/[yourlvolname]

# fstyp -v /dev/vg00/lvol6
vxfs
version: 3
f_bsize: 8192
f_frsize: 1024
f_blocks: 1228800
f_bfree: 659286
f_bavail: 659286
f_files: 19712
f_ffree: 1073792296
f_favail: 1073792296
f_fsid: 1073741830
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 6
f_size: 1228800
Sanjay_6
Honored Contributor

Re: block size default

Hi,

In the above example "f_bsize" (which is 8k)is the one you are looking for.

Hope this helps.

Regds
Uday_S_Ankolekar
Honored Contributor

Re: block size default

Hi,

block size is default 8192 bytes.

Try fstyp command for detailed info.

-USA


Good Luck..
Darrell Allen
Honored Contributor

Re: block size default

Hi Frankie,

This is a very confusing topic. Hope the following helps.

Man newfs_vxfs will tell you that the default block size used when creating a vxfs filesystem is 1024 bytes. Look at the info below (particularly the last part) from knowledge base document number 1100330242:
http://us-support3.external.hp.com/cki/bin/doc.pl/sid=2405c118092bb1dd03/screen=ckiDisplayDocument?docId=200000054230626

<>
To determine the current block size for the vxfs file system:

fstyp -v /dev/vg00/lvol#

For example:

# fstyp -v /dev/vg00/lvol1

f_bsize: 8192

Note: The f_bsize parameter reports the block size for the vxfs file system.


To determine the current block size for the hfs file system:

tunefs -v /dev/vg00/rlvol# | grep bsize

For example:

# tunefs -v /dev/vg00/rlvol4 | grep bsize

sbsize 2048 cgsize 2048 cgoffset 24 cgmask 0xfffffff8
bsize 8192 bshift 13 bmask 0xffffe000

Here is an example of how HFS and VxFS actually interpret these fields:

Field HFS Value for VxFS
----- --- --------------
f_bsize block size (8K) largest possible block size (8K)
f_frsize fragment size (1K) actual block size (usually 1K)

<>


Here's an excerpt from document number S3100000884:
http://us-support3.external.hp.com/cki/bin/doc.pl/sid=c0a298f011fbef7f72/screen=ckiDisplayDocument?docId=200000046860490

<>
Use the following information to determine Oracle's optimal filesystem block size.

Execute the following command for the HFS environment:

df -g

Notice the value in the 'file system block size' field. The default value is 8192. Assign 8192 for Oracle in the init.ora file as the db_block_size parameter.


Execute the following command for the JFS environment:

echo "8192B.p S" | fsdb -F vxfs /dev/vg00/rlvol9

This command assumes that the Oracle database resides on lvol9. Use the logical volume that describes your environment.

Also, notice the 'r' before lvol9. The 'echo' command needs to execute against the raw device.

Once you execute this command, look for the number after 'bsize'. The default is 1024. Assign 1024 for Oracle in the init.ora file as the db_block_size parameter.

<>


From the docs above (and personally verified by creating a vxfs filesystem with the default block size) you will find that for vxfs filesystems f_frsize will correspond to the block size used to create the filesystem. You can easily find f_frsize using df -g /filesystem. Or use fstyp -v /dev/vg##/lvol and look for fragment size.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James R. Ferguson
Acclaimed Contributor

Re: block size default

Hi Frankie:

I agree with Darrell that the 'f_frsize' represents the block size you seek, not the value of 'f_bsize'.

Have a look too at the man pages for 'statfs(2)'. You will note:

f_bsize /* preferred file system block size */

f_frsize /* fundamental file system block size */

Regards!

...JRF...
Christopher Caldwell
Honored Contributor

Re: block size default

The two previous posts are correct, from man mkfs_vxfs, 1024 is default, and the filesystem in my earlier post was built with defaults.

I recall making a call to the response center - they conceded that the documentation on block size for vxfs was ambiguous at best.
Frank Slootweg
Honored Contributor

Re: block size default

Please note that *for* vxfs/JFS fstype(1M) is 'lying' (confusing), because it is a utility which has its origin in the HFS world:

f_frsize is the vxfs/JFS *block* size. vxfs/JFS has no fragments like HFS has, but the vxfs/JFS block size is (somewhat) comparable, so that is reported.

f_bsize is just a dummy number because the 'logical' number would be the vxfs/JFS *extent* size, but, because the extent size is *variable*, fstyp(1M) just 'invents' a number which 1) looks 'nice' and 2) is the same as it (by default) is for HFS.