OS block size and Oracle block size to find the OS Blocksize
I have read similar articles, most of which are about the blocksize of the file system. I don't know if it is related to the Oracle block size. I tried to find that, even if it is a file system blocksize, the Oracle blocksize can be smaller than the filesystem block size.
SQL> select * from v $ version;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-Prod
PL/SQL Release 10.2.0.4.0-Production
CORE 10.2.0.4.0 Production
TNS for Linux: Version 10.2.0.4.0-Production
NLSRTL Version 10.2.0.4.0-Production
SQL> create tablespace test datafile '/install/test_tbs1.ora' size 2 m blocksize 2 k;
Tablespace created.
[Root @ rhel4a ~] # Tune2fs-l/dev/sdc1 | grep-I block
Block count: 1048233
Reserved block count: 52411
Free blocks: 828704
First block: 0
Block size: 4096
Reservedgdt blocks: 255
Blocks per group: 32768
Inode blocks per group: 512
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
Journal backup: inode blocks
[Root @ rhel4a ~] # Mount-l
/Dev/sda2 on/type ext3 (rw) [/]
None on/proc type proc (rw)
None on/sys type sysfs (rw)
None on/dev/pts type devpts (rw, gid = 5, mode = 620)
/Dev/sda1 on/boot type ext3 (rw) [/boot]
None on/dev/shm type tmpfs (rw)
/Dev/sdb1 on/oracle10g type ext3 (rw) []
/Dev/sdc1 on/install type ext3 (rw) []
None on/proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Sunrpc on/var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
Configfs on/config type configfs (rw)
Ocfs2_dlmfs on/dlm type ocfs2_dlmfs (rw)
/Dev/sdd1 on/oracle10g/oradata/orcl type ocfs2 (rw, _ netdev, datavolume, heartbeat = local) [oradatafiles]
Oracleasmfs on/dev/oracleasm type oracleasmfs (rw)
[Root @ rhel4a ~] # Stat-f/install
File: "/install"
ID: 0 Namelen: 255 Type: ext2/ext3
Blocks: Total: 1031769 Free: 828190 Available: 775779 Size: 4096
Inodes: Total: 524288 Free: 521290
[Root @ rhel4a ~] # Dumpe2fs/dev/sdc1 | grep 'block size'
Dumpe2fs 1.35 (28-Feb-2004)
Block size: 4096
Can it be said that there is no direct relationship between oracle block size and filesystem blocksize?
Linux: file Block size is selected at the time of high-level formatting.
========================================================== ============================
The log block size is platform. specific, and can be found out using the following query: (size in bytes)
Select max (lebsz) from x $ kccle
Most platforms have log block size of 512, but HPUX has 1 k, and tru64 has blocksize of 2 k if my memory serves me well.
========================================================== ==============================
How to find the OS Block size provided by Oracle:
To find the OS Block size in windows.
Kindly run the below SQL statement
Select lebsz from x $ kccle;
Which gives the OS Block size.
In Unix:
Goto the directory $ ORACLE_HOME/bin/and run the command dbfsize. (is available on UNIX only)
Example: $ ORACLE_HOME/bin/dbfsize
You can find your log block size in bytes with the following query (connected as SYS or internal ):
Select distinct lebsz from x $ kccle;
This is the unit in which you shoshould set the log_checkpoint_interval parameter (otherwise known as the operating system block size). Some sample sizes are:
O/S Log Block Size
==================================
Solaris 512 bytes
HP-UX 1024 bytes
NT 512 bytes
OpenVMS 512 bytes
Digital UNIX 1024 bytes
To get it from the operating system, try grep DEV_BSIZE/usr/include/sys/param. h