Operating System - HP-UX
1833588 Members
4161 Online
110061 Solutions
New Discussion

Unix Block Size to be set in relation with Oracle Block Size

 
SAMIR SHAH_1
Contributor

Unix Block Size to be set in relation with Oracle Block Size

Hi,

Can someone pl. tell me that how one can change the block size of Unix.

Oracle documentation recommends that Unix block size should be >= Oracle block size which is 4K.

Thanks.

Samir.
6 REPLIES 6
James A. Donovan
Honored Contributor

Re: Unix Block Size to be set in relation with Oracle Block Size

Set the bsize=4096 (4K), or whatever size you want, when running your mkfs command. Do a man on mkfs_vxfs or mkfs_hfs for more info.

Below is an example of the command that would be used to make the filesystem on my /dev/vg00/lvol5 logical volume

mkfs -F vxfs -o ninode=unlimited,bsize=1024,version=3,inosize=256,logsize=1024,nolargefiles /dev/vg00/lvol5
Remember, wherever you go, there you are...
Steven Sim Kok Leong
Honored Contributor

Re: Unix Block Size to be set in relation with Oracle Block Size

Hi,

You cannot change the block size of an existing filesystem unless you remove it and recreate it with the blocksize specified:

For creating a new HFS filesystem with blocksize 32 kb with >2GB support :

# newfs -F hfs -b 32768 -o largefiles /dev/vgXX/rlvYY

For creating a new JFS filesystem with blocksize 32 kb with >2GB support:

# newfs -F vxfs -b 32768 -o largefiles /dev/vgXX/rlvYY

After recreating your filesystems, you can subsequently restore all your files from backup.

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
SAMIR SHAH_1
Contributor

Re: Unix Block Size to be set in relation with Oracle Block Size

Thanks,

What is the command to see the current block size?

Samir.
Steven Sim Kok Leong
Honored Contributor

Re: Unix Block Size to be set in relation with Oracle Block Size

Hi,

fstyp -v /dev/vgXX/rlvYY. Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Andreas D. Skjervold
Honored Contributor

Re: Unix Block Size to be set in relation with Oracle Block Size

Hi Samir!

Hope you have have misspelled your question;
stating that an Unix(OS) block should be >= the Oracle block...

This should infact be the other way around, as one Oracle block should consist of one or more OS blocks. ie the Oracle blocksize should be equal to or a multiple of the OS block size.
This way Oracle reads multiple OS blocks for each Oracle block that is needed in a transaction.
Using a OS blocksize that is bigger than the Oracle block just leaves the empty space of the remaining OS block unused.

Setting the Oracle blocksize to the right size when creating a new database depends on the application use:
We are developing OLTP databases for telecom and are using 8k Oracleblocks, while Datawarehouse or DSS system should have larger Oracleblocks.

Andreas
Only by ignoring what everyone think is important, can you be aware of what everyone ignores!
Josee Bourget-Thuma
Frequent Advisor

Re: Unix Block Size to be set in relation with Oracle Block Size

Hello Samir,

I want to second Andreas's comment about the O/S block size vs Oracle block size. I couldn't have explained it better.

I just want to add that once you create your database with a certain block size, it is IMPOSSIBLE for you to change it without RE-creating the entire database. Something to keep in mind if you are running a major production.

Take care,
Josee
Failure is not an option.