zpool performance optimal property vdev's ashift or sector at create time

只能在创建zpool时指定的唯一参数ashift, 用于指定zpool的扇区大小(2^ashift bytes).

比较优化的选择是大于等于底层设备的sector.

查看块设备的sector. 例如

fdisk -l /dev/sdb

看到如下一行.

Sector size (logical/physical): 512 bytes / 512 bytes

但是有些系统可能将4K的sector认为是512字节的, 所以如果要强制使用4K sector的话, 建议在创建zpool时指定ashift=12.

例如 : 

# zpool create -o ashift=12 zp1 raidz2 sdb sdc sdd sde sdf sdg sdh sdi sdj sdk spare sdl sdm

[参考]

1. man zpool

       ashift

           Pool  sector  size exponent, to the power of 2 (internally referred to as "ashift"). I/O operations will be

           aligned to the specified size boundaries. Additionally, the minimum (disk) write size will be  set  to  the

           specified  size,  so  this  represents a space vs. performance trade-off. The typical case for setting this

           property is when performance is important and the underlying disks use 4KiB sectors but report 512B sectors

           to the OS (for compatibility reasons); in that case, set ashift=12 (which is 1<<12 = 4096).

           For  optimal  performance,  the  pool sector size should be greater than or equal to the sector size of the

           underlying disks. Since the property cannot be changed after pool creation, if in a given  pool,  you  ever

           want to use drives that report 4KiB sectors, you must set ashift=12 at pool creation time.

           Keep in mind is that the ashift is vdev specific and is not a pool global.  This means that when adding new

           vdevs to an existing pool you may need to specify the ashift.

时间: 2024-10-20 13:22:24

zpool performance optimal property vdev's ashift or sector at create time的相关文章

ZFS (sync, async) R/W IOPS / throughput performance tuning

本文讨论一下zfs读写IOPS或吞吐量的优化技巧, (读写操作分同步和异步两种情况). 影响性能的因素 1. 底层设备的性能直接影响同步读写 iops, throughput. 异步读写和cache(arc, l2arc) 设备或配置有关. 2. vdev 的冗余选择影响iops, through. 因为ZPOOL的IO是均分到各vdevs的, 所以vdev越多, IO和吞吐能力越好. vdev本身的话, 写性能 mirror > raidz1 > raidz2 > raidz3 , 

zpool use 4KiB sector

默认情况下, 创建top-level dev如果不指定扇区大小, 那么使用vdevs中最小的扇区大小作为zpool的扇区大小. 但是某些设备虽然是4K的扇区, 但是可能内核读到的扇区大小可能是512字节. 这样的话, 将对影响有比较大的影响, 所以在这种情况下, 创建zpool时可以指定扇区的大小. 添加top-devel时也可以指定扇区的大小, 尽量使用扇区大小一致的设备. zpool创建完后不允许修改扇区的大小. [root@db-172-16-3-150 man8]# zpool set

use export and import move ZPOOL&#039;s underdev from one machine to another OR upgrade a zfs version OR recover destroyed pools

前面我们介绍了zfs的pool, 类似LVM. 由多个块设备组成. 如果这些块设备要从一个机器转移到另一台机器的话, 怎么实现呢? zfs通过export和import来实现底层块设备的转移. 在已有POOL的主机上, 先将会读写POOL或dataset的正在运行的程序停止掉, 然后执行export. 执行export会把cache flush到底层的块设备, 同时卸载dataset和pool. import时, 可能需要指定块设备的目录, 但是并不需要指定顺序. 例如 : [root@spar

zpool use vdevs distribute

zpool并不限制根vdev的数量, 并且也不限制他们的属性(如mirror or raidz), 但是属性不同会有提示.例如 [root@db-172-16-3-150 ~]# zpool create zpp mirror /ssd1/zfs.1 /ssd1/zfs.2 [root@db-172-16-3-150 ~]# zpool status zpp pool: zpp state: ONLINE scan: none requested config: NAME STATE READ

介绍VB.NET的线程(英文)

One of the most notable new features in VB.NET is the ability to create threads in your application. Visual C++ developers have been able to write multithreaded code for years, but achieving the same effect in VB6 was fraught with difficulty. Althoug

TensorFlow教程之API DOC 6.3.5. FRAMEWORK

本文档为TensorFlow参考文档,本转载已得到TensorFlow中文社区授权. Building Graphs Contents Building Graphs Core graph data structures class tf.Graph class tf.Operation class tf.Tensor Tensor types class tf.DType tf.as_dtype(type_value) Utility functions tf.device(dev) tf.n

NHibernate.Search:基于Lucene.NET的全文索引

NHibernate.Search现在是NHiberante Contrilb下面的一个还没有发布的项目,也是从 Hibernate.Search移植而来,把NHibernate和Lucene.NET结合在一起,ORM持久化对象到数据库 中,Lucene.NET提供索引及查询支持. 下面在实际使用一下NHibernate.Search的使用: 由于这个项目还没有发布,它的很多特性也是一直在变化,所以现在只是以我下载的版本为准,如果你想 尝试此项目,请下载最下面的代码,里面包括自己编译生成的NHi

【SQL】Using Oracle&#039;s Parallel Execution Features

The full list of Oracle parallel execution features currently includes the following Parallel Query Parallel DML Parallel DDL Parallel Data Loading Parallel Recovery Parallel Replication How Parallel Execution Works Operations That Can Be Parallelize

PostgreSQL 9.5 新特性汇总 [转]

PostgreSQL 9.5快发布了,很多给力的功能. 原文 https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.5 (This page is currently under development ahead of the release of PostgreSQL 9.5) This page contains an overview of PostgreSQL Version 9.5's features, incl