首页  

aerospike写块大小设置FAQ     所属分类 aerospike 浏览量 2167
FAQ - Write Block Size
https://discuss.aerospike.com/t/faq-write-block-size/681


write-block-size defines the size in bytes of each I/O block that is written to the disk. 
写入磁盘的每个I/O块的大小


You can increase or decrease this depending on your record size. 

根据记录大小设置该值

The default value is 1MB and the configured value of this parameter must be a power of 2, 
so the different options are: 128K, 256K, 512K, 1M (and 2M, 4M or 8M as of version 4.2). 

To identify the optimal settings, we would recommend running a benchmark tool ACT

为了确定最佳设置,建议运行基准测试工具ACT

the recommended values for write-block-size are 128K for SSD and NVMe drives 
and 1MB for Hard Disk Drives (the default value)

推荐值 
SSD 128K
HDD  1M 


Records are stored in 16 bytes increments (RBLOCK) as of version 4.2, and 128 bytes prior to that. 

从4.2版本开始,记录存储为16字节增量(RBLOCK),在此之前存储为128字节。


The i/o size on disk depends on the disk itself and Aerospike will detect the smallest possible read i/o size. 

the write-block-size  will have a general impact on performance. 

Having a smaller write-block-size causes more hits to the SSD, 
which in turn creates more I/O operations and increases the defragmentation process. 
This would also result in an increased write amplification on the SSD.

较小的写块大小会对SSD造成更多的命中,从而创建更多的I/O操作并增加碎片整理过程。这也会导致SSD上写放大的增加。

The defragmentation of larger blocks involves longer large-block reads, 
where the entire block is read, injecting latency into other operations. 

较大块的碎片整理涉及较长时间的大块读取 , 延迟会注入到其他操作中。

Configure the namespaces write-block-size to the new desired size.

This is not applicable for storage-engine memory.
这不适用于纯内存模式!!!

The write-block-size configuration is static 
but can be changed in a rolling manner across all nodes in a cluster. 

写块大小的配置是静态的,但是可以跨集群中的所有节点进行滚动更改。


Once the configuration is increased, it cannot be decreased without zeroizing the disks.
一旦增加了配置,就不能在不使磁盘归零的情况下减小配置。

This configuration upper-limits the maximum size of the record that can be written on the cluster. 
Any records with a size bigger than write-block-size  will trigger an error to the client and a write-failure.

这种配置限制了可以在集群上写入的记录的最大大小。任何大于写块大小的记录会写入失败

Version 3.16 and above
Feb 07 2018 01:16:46 GMT: INFO (info): (ticker.c:728) {test} special-errors: key-busy 1234 record-too-big 5678

The fail_record_too_big  statistic will be incremented on each occurrence.
记录大小超出写入失败统计   fail_record_too_big


AS_PROTO_RESULT_FAIL_RECORD_TOO_BIG - Error code 13


Important considerations
重要的注意事项


This configuration is on a per-namespace basic and is only configurable if the storage-engine is device for the namespace.
namespace 级别,只适用于 设备

The value of this parameter must be a power of 2, so your options to decrease are: 128K, 256K, 512K, 1M etc.

Performance characteristics of your cluster may change so careful monitor is necessary.

上一篇     下一篇
aerospike架构概述

aerospike缓冲和缓存机制

aerospike写入失败处理queue too deep

五大最佳开源java性能监控工具

轻量级web容器undertow

aerospike数据分布