1827811 Members
1865 Online
109969 Solutions
New Discussion

HP-UX block size

 
Joseph Hoh
Frequent Advisor

HP-UX block size

I am trying to find the block size the OS uses when doing things such as coping data from memory to disk. My DBA has some Oracle settings he is trying to set and he says he needs this info. The only information I have been able to find is file system related.

Here are the Oracle parameters that we are trying to set:
db_multiblock_read_count
db_block_size

thanks
8 REPLIES 8
Christopher McCray_1
Honored Contributor

Re: HP-UX block size

I believe it is the same as most unix os, 512 bytes.

Chris
It wasn't me!!!!
Joseph C. Denman
Honored Contributor

Re: HP-UX block size

fstyp -v /dev/vg??/lvol??

f_frsize is your os block size.


Hope this helps.

...jcd...
If I had only read the instructions first??
Craig Rants
Honored Contributor

Re: HP-UX block size

Try diskinfo -v /dev/rdsk/cXtXdX

look for the bytes per sector.

Craig
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Joseph Hoh
Frequent Advisor

Re: HP-UX block size

so it is different for each filesystem?

Joseph C. Denman
Honored Contributor

Re: HP-UX block size

Yes Jeff. It is based on the options passed during fs creation (newfs). On vxfs filesystem, the default is 1024.

man newfs_vxfs #look at the -b option

...jcd...
If I had only read the instructions first??
Sanjay_6
Honored Contributor
Roger Baptiste
Honored Contributor

Re: HP-UX block size

hi,

The block size which
a filesystem uses can be
found by :
fstyp -v |grep f_frsize

or df -g |grep fragment

Yes, this size can vary
from Filesystem to Filesystem,
depending on how it was set
during the creation.

When the Filesystem is
created, we have the choice
of setting the block size
by using the -b option of
newsfs.
eg: newfs -b 8192 creates
a 8K block size filesystem.

The default for VXFS is
1Kb block size!

db_block_size should be
a multiple of the filesystem
block size. So, if your
FS block size is 4KB, then
the db_block_size can be
4KB or 8Kb.
For databases, it is preferable to create filesystems with 4KB block
size or more.

the
db_multiblock_read_count sets
the number of db_blocks which
a database will read in advance.

HTH
raj


Take it easy.
Andreas D. Skjervold
Honored Contributor

Re: HP-UX block size

Hi

I would say; set the db_block_size to 8k and don't think more about it.

This is a commonly used value that fits most needs, and is a multiple of the different used filesystem blocksizes. If designing a database for DSS /Datawarehous applications, larger values might be considered (16k, 32k).

I do not think the effect in having a matcing filesystem block to the Oracle block gives any noticeable effect on performance, as long as the Oracle block is the bigger (and a multiple).
This due to the fact that when the Oracle datafile / tablespace is created the filestructure is put in place and will not change afterwards. When Oracle does it reading, Oracle blocks that consists of contnous filesblocks, will be fetched from disk to accomodate the query.
If this is one ore more filesystem blocks makes a to small difference in normal circumstances.

What has to be though of, and this is from the DBA perspective is having Oracle fetching the correct blocks, and not to many of them (ie not performing to many tablescans).
Here comes the correct indexing and table analyze to get the optimizer running at its best.

The db_multiblock_read_count value can give more tablescans when set to high. 32 is the number I've seen most around.
Heard that in 9i this setting dosen't effect the tablescans anymore, but I'm not sure.

What is said from Oracle themself is that a out of the box installation of Oracle works well in the wast majority of appliances, and that the application tuning (ie sql statements) that gives the most tuning effect.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!