Multiple Block Size Support

本文介绍了Oracle 9i数据库中数据块和高速缓冲区的设置。支持同一数据库使用不同大小的数据块,可在表空间一级定义。创建数据库时需指定DB_BLOCK_SIZE参数,且之后除非重建数据库否则不能更改。在Oracle 9i中,DB_CACHE_SIZE替代了DB_BLOCK_BUFFERS参数,使用多块设置时需指定相关参数。

 

 

Oracle 9i数据库中支持同一个数据库使用不同大小的Oracle 数据块,可以在表空间一级定义数据块的大小,例如:

CREATE TABLESPACE TBS1 ... BLOCKSIZE 16K;

CREATE TABLESPACE TBS2 ... BLOCKSIZE 8192;

其中,BLOCKSIZE可以取2K4K8K16K,如果操作系统支持,甚至可以取32K。可以通过DBA_TABLESPACES视图中的BLOCK_SIZE列值查看表空间的块尺寸。

 

Oracle 9i 以前的版本一样,在创建数据库的时候还是需要在参数文件中指定DB_BLOCK_SIZE参数(缺省数据库数据块尺寸,也成为标准块尺寸,standard block size)的值。这个参数的值将作为创建表空间时的缺省块尺寸(如果不指定新表空间的块尺寸的话),并且DB_BLOCK_SIZE参数的值仍然是在创建数据库的时候指定以后,除非重建数据库,否则不能更改。

 

需要注意的是:

·          当使用分区时,一个分区表的所有分区必须在相同的BLOCKSIZE的表空间中。

·          索引和相应的表可以放在不同的BLOCKSIZE的表空间中。

·          系统表空间的块尺寸只能是DB_BLOCK_SIZE参数的值

 

Oracle 9i中参数DB_CACHE_SIZE 替代了以前的 DB_BLOCK_BUFFERS参数,并使用字节为单位表示高速缓冲区的大小(而不是以块为单位)。

当我们在一个数据库中使用多块设置的时候,必须指定DB_CACHE_SIZE参数,并且为不同块设置的表空间设置DB_nK_CACHE_SIZE参数(至少指定一个DB_nK_CACHE_SIZE参数),其中,n可以是2481632,即:

DB_2K_CACHE_SIZE 的缓冲区是为了存取2k数据块尺寸的表空间对象而指定的高速缓存;

DB_4K_CACHE_SIZE的缓冲区是为了存取4k数据块尺寸的表空间对象而指定的高速缓存;

DB_8K_CACHE_SIZE的缓冲区是为了存取8k数据块尺寸的表空间对象而指定的高速缓存;

DB_16K_CACHE_SIZE的缓冲区是为了存取16k数据块尺寸的表空间对象而指定的高速缓存;

DB_32K_CACHE_SIZE的缓冲区是为了存取32k数据块尺寸的表空间对象而指定的高速缓存;

 

注意,n不能指定为和缺省数据块尺寸大小相同的数值,例如,如果DB_BLOCK_SIZE = 8192(8KB),那么就不能设置DB_8K_CACHE_SIZE参数。

 

例如:

     MAX_SGA_SIZE = 700M

     SHARE_POOL_SIZE = 80M

     DB_BLOCK_SIZE = 8192

     DB_CACHE_SIZE = 290M

     DB_2K_CACHE_SIZE = 4M

     DB_16K_CACHE_SIZE = 16M

 

上面的设置说明了,在SGA中,SGA动态增长最多可以达到700M,其中实例启动时SHARE POOL的大小为80M,数据库标准块尺寸(缺省数据块大小)是8KB,如果用标准数据块(即,8KB)的对象时,将使用290M的高速缓存(DATA BUFFER),如果使用2K数据块尺寸的表空间内的对象时,可以使用4M的高速缓存,如果使用16K数据块尺寸的表空间内的对象时,可以使用16M的高速缓存。

#[argh(option, short = 'b', arg_name = "PATH[,key=value[,key=value[,...]]]")] #[serde(default)] #[merge(strategy = append)] /// parameters for setting up a block device. /// Valid keys: /// path=PATH - Path to the disk image. Can be specified /// without the key as the first argument. /// ro=BOOL - Whether the block should be read-only. /// (default: false) /// root=BOOL - Whether the block device should be mounted /// as the root filesystem. This will add the required /// parameters to the kernel command-line. Can only be /// specified once. (default: false) /// sparse=BOOL - Indicates whether the disk should support /// the discard operation. (default: true) /// block-size=BYTES - Set the reported block size of the /// disk. (default: 512) /// id=STRING - Set the block device identifier to an ASCII /// string, up to 20 characters. (default: no ID) /// direct=BOOL - Use O_DIRECT mode to bypass page cache. /// (default: false) /// async-executor=epoll|uring - set the async executor kind /// to simulate the block device with. This takes /// precedence over the global --async-executor option. /// multiple-workers=BOOL - (Experimental) run multiple /// worker threads in parallel. this option is not /// effective for vhost-user blk device. /// (default: false) /// packed-queue=BOOL - Use packed virtqueue /// in block device. If false, use split virtqueue. /// (default: false) /// bootindex=NUM - An index dictating the order that the /// firmware will consider devices to boot from. /// For example, if bootindex=2, then the BIOS /// will attempt to boot from the current device /// after failing to boot from the device with /// bootindex=1. /// pci-address=ADDR - Preferred PCI address, e.g. "00:01.0". block: Vec<DiskOptionWithId>,
07-25
linux-5.10.117/drivers/mtd/Kconfig这个文件作用是什么 menuconfig MTD tristate "Memory Technology Device (MTD) support" imply NVMEM help Memory Technology Devices are flash, RAM and similar chips, often used for solid state file systems on embedded devices. This option will provide the generic support for MTD drivers to register themselves with the kernel and for potential users of MTD devices to enumerate the devices which are present and obtain a handle on them. It will also allow you to select individual drivers for particular hardware and users of MTD devices. If unsure, say N. if MTD config MTD_TESTS tristate "MTD tests support (DANGEROUS)" depends on m help This option includes various MTD tests into compilation. The tests should normally be compiled as kernel modules. The modules perform various checks and verifications when loaded. WARNING: some of the tests will ERASE entire MTD device which they test. Do not use these tests unless you really know what you do. menu "Partition parsers" source "drivers/mtd/parsers/Kconfig" endmenu comment "User Modules And Translation Layers" # # MTD block device support is select'ed if needed # config MTD_BLKDEVS tristate config MTD_BLOCK tristate "Caching block device access to MTD devices" depends on BLOCK select MTD_BLKDEVS help Although most flash chips have an erase size too large to be useful as block devices, it is possible to use MTD devices which are based on RAM chips in this manner. This block device is a user of MTD devices performing that function. At the moment, it is also required for the Journalling Flash File System(s) to obtain a handle on the MTD device when it's mounted (although JFFS and JFFS2 don't actually use any of the functionality of the mtdblock device). Later, it may be extended to perform read/erase/modify/write cycles on flash chips to emulate a smaller block size. Needless to say, this is very unsafe, but could be useful for file systems which are almost never written to. You do not need this option for use with the DiskOnChip devices. For those, enable NFTL support (CONFIG_NFTL) instead. config MTD_BLOCK_RO tristate "Readonly block device access to MTD devices" depends on MTD_BLOCK!=y && BLOCK select MTD_BLKDEVS help This allows you to mount read-only file systems (such as cramfs) from an MTD device, without the overhead (and danger) of the caching driver. You do not need this option for use with the DiskOnChip devices. For those, enable NFTL support (CONFIG_NFTL) instead. config FTL tristate "FTL (Flash Translation Layer) support" depends on BLOCK select MTD_BLKDEVS help This provides support for the original Flash Translation Layer which is part of the PCMCIA specification. It uses a kind of pseudo- file system on a flash device to emulate a block device with 512-byte sectors, on top of which you put a 'normal' file system. You may find that the algorithms used in this code are patented unless you live in the Free World where software patents aren't legal - in the USA you are only permitted to use this on PCMCIA hardware, although under the terms of the GPL you're obviously permitted to copy, modify and distribute the code as you wish. Just not use it. config NFTL tristate "NFTL (NAND Flash Translation Layer) support" depends on BLOCK select MTD_BLKDEVS help This provides support for the NAND Flash Translation Layer which is used on M-Systems' DiskOnChip devices. It uses a kind of pseudo- file system on a flash device to emulate a block device with 512-byte sectors, on top of which you put a 'normal' file system. You may find that the algorithms used in this code are patented unless you live in the Free World where software patents aren't legal - in the USA you are only permitted to use this on DiskOnChip hardware, although under the terms of the GPL you're obviously permitted to copy, modify and distribute the code as you wish. Just not use it. config NFTL_RW bool "Write support for NFTL" depends on NFTL help Support for writing to the NAND Flash Translation Layer, as used on the DiskOnChip. config INFTL tristate "INFTL (Inverse NAND Flash Translation Layer) support" depends on BLOCK select MTD_BLKDEVS help This provides support for the Inverse NAND Flash Translation Layer which is used on M-Systems' newer DiskOnChip devices. It uses a kind of pseudo-file system on a flash device to emulate a block device with 512-byte sectors, on top of which you put a 'normal' file system. You may find that the algorithms used in this code are patented unless you live in the Free World where software patents aren't legal - in the USA you are only permitted to use this on DiskOnChip hardware, although under the terms of the GPL you're obviously permitted to copy, modify and distribute the code as you wish. Just not use it. config RFD_FTL tristate "Resident Flash Disk (Flash Translation Layer) support" depends on BLOCK select MTD_BLKDEVS help This provides support for the flash translation layer known as the Resident Flash Disk (RFD), as used by the Embedded BIOS of General Software. There is a blurb at: http://www.gensw.com/pages/prod/bios/rfd.htm config SSFDC tristate "NAND SSFDC (SmartMedia) read only translation layer" depends on BLOCK select MTD_BLKDEVS help This enables read only access to SmartMedia formatted NAND flash. You can mount it with FAT file system. config SM_FTL tristate "SmartMedia/xD new translation layer" depends on BLOCK select MTD_BLKDEVS select MTD_NAND_ECC_SW_HAMMING help This enables EXPERIMENTAL R/W support for SmartMedia/xD FTL (Flash translation layer). Write support is only lightly tested, therefore this driver isn't recommended to use with valuable data (anyway if you have valuable data, do backups regardless of software/hardware you use, because you never know what will eat your data...) If you only need R/O access, you can use older R/O driver (CONFIG_SSFDC) config MTD_OOPS tristate "Log panic/oops to an MTD buffer" help This enables panic and oops messages to be logged to a circular buffer in a flash partition where it can be read back at some later point. config MTD_PSTORE tristate "Log panic/oops to an MTD buffer based on pstore" depends on PSTORE_BLK help This enables panic and oops messages to be logged to a circular buffer in a flash partition where it can be read back as files after mounting pstore filesystem. If unsure, say N. config MTD_SWAP tristate "Swap on MTD device support" depends on MTD && SWAP select MTD_BLKDEVS help Provides volatile block device driver on top of mtd partition suitable for swapping. The mapping of written blocks is not saved. The driver provides wear leveling by storing erase counter into the OOB. config MTD_PARTITIONED_MASTER bool "Retain master device when partitioned" default n depends on MTD help For historical reasons, by default, either a master is present or several partitions are present, but not both. The concern was that data listed in multiple partitions was dangerous; however, SCSI does this and it is frequently useful for applications. This config option leaves the master in even if the device is partitioned. It also makes the parent of the partition device be the master device, rather than what lies behind the master. config VIGI_USR_DEF_AUDIO_ALARM bool "Enable custom define audio alarm" default n help This enables custom define audio alarm to a flash mtd buffer in a flash partition where it can be read/write back at some config TP_TAPO_SPMINIOS bool "Enable split partition minios" default y help Enable split partition minios if SSTAR_DRIVERS config SKIP_SQUASHFS_BAD_BLOCK bool "SUPPORT SKIP SQUASHFS PARTITION BAD BLOCK" default y depends on SS_NAND_ONEBIN endif source "drivers/mtd/chips/Kconfig" source "drivers/mtd/maps/Kconfig" source "drivers/mtd/devices/Kconfig" source "drivers/mtd/nand/Kconfig" source "drivers/mtd/lpddr/Kconfig" source "drivers/mtd/spi-nor/Kconfig" source "drivers/mtd/ubi/Kconfig" source "drivers/mtd/hyperbus/Kconfig" endif # MTD
09-20
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值