当前位置:  数据库>oracle

OS block size和Oracle block size,查找OS Blocksize的方法

    来源: 互联网  发布时间:2017-06-16

    本文导语: 看过类似的文章,多数是讲的文件系统的blocksize,不知道这是否和Oracle block size有啥关系,我试着发现,即使是文件系统blocksize,Oracle blocksize 也可以比这个filesystem block size 小的。 SQL> select * from v$version; BANNER---------------------------...

看过类似的文章,多数是讲的文件系统的blocksize,不知道这是否和Oracle block size有啥关系,我试着发现,即使是文件系统blocksize,Oracle blocksize 也可以比这个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 2m blocksize 2k;

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
Reserved GDT 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

从这里是不是可以说oracle block size 和 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 1k, and tru64 has blocksize of 2k if my memory serves me well.

===========================================================

Oracle给出的查找OS Block size的方法:

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 should 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


    
 
 
 
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • java命名空间java.lang类character.unicodeblock的类成员方法: block_elements定义及介绍
  • 请教以下错误:EXT2-fs error (device ide0(3,6)): ext2_new_block: Allocating block in system zone - block = 24593,怎么老出来这样的
  • java命名空间java.lang枚举thread.state的类成员方法: blocked定义及介绍
  • A try block must always be followed by a catch block ? 对么???
  • java命名空间java.awt.event类adjustmentevent的类成员方法: block_decrement定义及介绍
  • C++集成开发环境 Code::Blocks
  • java命名空间java.awt.event类adjustmentevent的类成员方法: block_increment定义及介绍
  • Code::Blocks的问题
  • java命名空间java.io接口objectstreamconstants的类成员方法: sc_block_data定义及介绍
  • socket的block和nonblock到底有什么区别?
  • java命名空间java.awt.event类mousewheelevent的类成员方法: wheel_block_scroll定义及介绍
  • unable to read inode block - inode
  • 关于使用code::blocks新建项目的向导问题
  • jquery控制display属性为none或block
  • code::blocks调试问题
  • 网络磁盘设备 Network Block Device
  • Thread中的Blocking是什么意思?有什么作用?并举个例子说明
  • block等于多少byte
  • 【求教】FreeBSD 8.0 中怎么启动Code::Blocks ?
  • 关于code::blocks 运行出错
  • code::blocks如何在哪里打开 最下面的调试对话框


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3