GC Blocks Lost等待事件

Oracle RAC环境下,大量GC Blocks Lost可能表明内联网络问题或网络包处理效率低下。该问题可能导致性能下降,伴随等待事件如gc cr multiblock waits。错误配置的内联网络通常是主要原因,表现为等待事件增多、网络错误、应用性能下降等。解决方法需结合OS和网络层面分析,如ifconfig、netstat等工具。参考链接:http://www.oracledatabase12g.com/archives/tag/interconnect

 在Oracle RAC环境中,无论我们从AWR自动负载性能报告、Statspack或者Grid Control中都可以找到Oracle数据库软件所收集的全局缓存工作负载统计信息(global cache work load statistics);其中就包含了全局缓存块丢失(Global cache lost blocks)的统计信息(这些丢失的全局缓存块可能是gc cr block lost或者gc current block lost),若集群中的任意节点出现大量的全局缓存块丢失(下文简写为gc blocks lost),则可能意味着内联(private)网络存在问题或者packet网络包处理低效。通过监控和评估这些全局缓存的相关统计信息,可以有效保证内联全局缓存(interconnect Global Cache)和全局队列服务(Global Enqueue Service)(GCS/GES)以及整个集群的正常工作。全局缓存块丢失一般预示着网络包处理存在问题并需要进一步勘察。另外全局缓存块丢失(gc blocks lost)的问题常会伴随着gc cr multiblock waits等待发生(传输多个连续的数据块全局缓存)。

就目前来看最有嫌疑造成或加速gc blocks lost的”元凶”往往是因为错误地或者不当的配置了内联网络(interconnects)。


主要症状:

‘gc cr block lost’或’gc current block lost’成为实例中Top 5的主要等待事件


次要症状:

1.SQL trace报告显示多次出现gc cr requests,gc current request等待事件

2.出现长时间的gc cr multiblock requests等待

3.糟糕的应用性能与吞吐量

4.ifconfig或其他网络工具显示存在大量的网络包packet发送接收(send/receive)错误

5.netstat报告显示存

// Configuration provided during initialization of the littlefs struct lfs_config { // Opaque user provided context that can be used to pass // information to the block device operations void *context; // Read a region in a block. Negative error codes are propagated // to the user. int (*read)(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, void *buffer, lfs_size_t size); // Program a region in a block. The block must have previously // been erased. Negative error codes are propagated to the user. // May return LFS_ERR_CORRUPT if the block should be considered bad. int (*prog)(const struct lfs_config *c, lfs_block_t block, lfs_off_t off, const void *buffer, lfs_size_t size); // Erase a block. A block must be erased before being programmed. // The state of an erased block is undefined. Negative error codes // are propagated to the user. // May return LFS_ERR_CORRUPT if the block should be considered bad. int (*erase)(const struct lfs_config *c, lfs_block_t block); // Sync the state of the underlying block device. Negative error codes // are propagated to the user. int (*sync)(const struct lfs_config *c); #ifdef LFS_THREADSAFE // Lock the underlying block device. Negative error codes // are propagated to the user. int (*lock)(const struct lfs_config *c); // Unlock the underlying block device. Negative error codes // are propagated to the user. int (*unlock)(const struct lfs_config *c); #endif // Minimum size of a block read in bytes. All read operations will be a // multiple of this value. lfs_size_t read_size; // Minimum size of a block program in bytes. All program operations will be // a multiple of this value. lfs_size_t prog_size; // Size of an erasable block in bytes. This does not impact ram consumption // and may be larger than the physical erase size. However, non-inlined // files take up at minimum one block. Must be a multiple of the read and // program sizes. lfs_size_t block_size; // Number of erasable blocks on the device. Defaults to block_count stored // on disk when zero. lfs_size_t block_count; // Number of erase cycles before littlefs evicts metadata logs and moves // the metadata to another block. Suggested values are in the // range 100-1000, with large values having better performance at the cost // of less consistent wear distribution. // // Set to -1 to disable block-level wear-leveling. int32_t block_cycles; // Size of block caches in bytes. Each cache buffers a portion of a block in // RAM. The littlefs needs a read cache, a program cache, and one additional // cache per file. Larger caches can improve performance by storing more // data and reducing the number of disk accesses. Must be a multiple of the // read and program sizes, and a factor of the block size. lfs_size_t cache_size; // Size of the lookahead buffer in bytes. A larger lookahead buffer // increases the number of blocks found during an allocation pass. The // lookahead buffer is stored as a compact bitmap, so each byte of RAM // can track 8 blocks. lfs_size_t lookahead_size; // Threshold for metadata compaction during lfs_fs_gc in bytes. Metadata // pairs that exceed this threshold will be compacted during lfs_fs_gc. // Defaults to ~88% block_size when zero, though the default may change // in the future. // // Note this only affects lfs_fs_gc. Normal compactions still only occur // when full. // // Set to -1 to disable metadata compaction during lfs_fs_gc. lfs_size_t compact_thresh; // Optional statically allocated read buffer. Must be cache_size. // By default lfs_malloc is used to allocate this buffer. void *read_buffer; // Optional statically allocated program buffer. Must be cache_size. // By default lfs_malloc is used to allocate this buffer. void *prog_buffer; // Optional statically allocated lookahead buffer. Must be lookahead_size. // By default lfs_malloc is used to allocate this buffer. void *lookahead_buffer; // Optional upper limit on length of file names in bytes. No downside for // larger names except the size of the info struct which is controlled by // the LFS_NAME_MAX define. Defaults to LFS_NAME_MAX or name_max stored on // disk when zero. lfs_size_t name_max; // Optional upper limit on files in bytes. No downside for larger files // but must be <= LFS_FILE_MAX. Defaults to LFS_FILE_MAX or file_max stored // on disk when zero. lfs_size_t file_max; // Optional upper limit on custom attributes in bytes. No downside for // larger attributes size but must be <= LFS_ATTR_MAX. Defaults to // LFS_ATTR_MAX or attr_max stored on disk when zero. lfs_size_t attr_max; // Optional upper limit on total space given to metadata pairs in bytes. On // devices with large blocks (e.g. 128kB) setting this to a low size (2-8kB) // can help bound the metadata compaction time. Must be <= block_size. // Defaults to block_size when zero. lfs_size_t metadata_max; // Optional upper limit on inlined files in bytes. Inlined files live in // metadata and decrease storage requirements, but may be limited to // improve metadata-related performance. Must be <= cache_size, <= // attr_max, and <= block_size/8. Defaults to the largest possible // inline_max when zero. // // Set to -1 to disable inlined files. lfs_size_t inline_max; #ifdef LFS_MULTIVERSION // On-disk version to use when writing in the form of 16-bit major version // + 16-bit minor version. This limiting metadata to what is supported by // older minor versions. Note that some features will be lost. Defaults to // to the most recent minor version when zero. uint32_t disk_version; #endif }; litterfs的这个context有什么用 目前litterfs的代码中没有看到有使用到的地方
06-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值