ZIL或称SLOG, 被用于提升ZFS系统的离散fsync性能.
类似数据库的redo log或wal.
注意
1. 每个dataset对应一个zil, 也就是说一个zpool有多个zfs的话, 如果有log设备, 那么在log设备中实际上包含了多个ZIL entry.
数据写入ZIL后(fsync), 即使服务器异常, 也可以用于恢复文件系统.
2. 并不是每一笔FSYNC都会用到ZIL, 只有小于2*zil_slog_limit 的commit操作才会用到. 如果你的zil 块设备够强的话, 可以调大伙调到UINT64_MAX,  那么就不检测了, 所有的commit都用上zil设备. 一般不需要调整

/** The zfs intent log (ZIL) saves transaction records of system calls* that change the file system in memory with enough information* to be able to replay them. These are stored in memory until* either the DMU transaction group (txg) commits them to the stable pool* and they can be discarded, or they are flushed to the stable log* (also in the pool) due to a fsync, O_DSYNC or other synchronous* requirement. In the event of a panic or power fail then those log* records (transactions) are replayed.** There is one ZIL per file system. Its on-disk (pool) format consists* of 3 parts:**      - ZIL header*      - ZIL blocks*      - ZIL records** A log record holds a system call transaction. Log blocks can* hold many log records and the blocks are chained together.* Each ZIL block contains a block pointer (blkptr_t) to the next* ZIL block in the chain. The ZIL header points to the first* block in the chain. Note there is not a fixed place in the pool* to hold blocks. They are dynamically allocated and freed as* needed from the blocks available. Figure X shows the ZIL structure:*/可调参数,
/** This global ZIL switch affects all pools*/
int zil_replay_disable = 0;    /* disable intent logging replay *//** Tunable parameter for debugging or performance analysis.  Setting* zfs_nocacheflush will cause corruption on power loss if a volatile* out-of-order write cache is enabled.*/
int zfs_nocacheflush = 0;/** Define a limited set of intent log block sizes.* These must be a multiple of 4KB. Note only the amount used (again* aligned to 4KB) actually gets written. However, we can't always just* allocate SPA_MAXBLOCKSIZE as the slog space could be exhausted.*/
uint64_t zil_block_buckets[] = {4096,               /* non TX_WRITE */8192+4096,          /* data base */32*1024 + 4096,     /* NFS writes */UINT64_MAX
};/** Use the slog as long as the current commit size is less than the* limit or the total list size is less than 2X the limit.  Limit* checking is disabled by setting zil_slog_limit to UINT64_MAX.*/
unsigned long zil_slog_limit = 1024 * 1024;
#define USE_SLOG(zilog) (((zilog)->zl_cur_used < zil_slog_limit) || \((zilog)->zl_itx_list_sz < (zil_slog_limit << 1)))#if defined(_KERNEL) && defined(HAVE_SPL)
module_param(zil_replay_disable, int, 0644);
MODULE_PARM_DESC(zil_replay_disable, "Disable intent logging replay");module_param(zfs_nocacheflush, int, 0644);
MODULE_PARM_DESC(zfs_nocacheflush, "Disable cache flushes");module_param(zil_slog_limit, ulong, 0644);
MODULE_PARM_DESC(zil_slog_limit, "Max commit bytes to separate log device");
#endif

ZIL (ZFS intent log) zil.c相关推荐

  1. solaris oracle zfs 调优,使用闪存存储时调优 ZFS

    使用闪存存储时调优 ZFS 以下信息适用于闪存 SSD.F20 PCIe 加速卡.F40 PCIe 加速卡和 F5100 闪存存储阵列. 将 ZFS 用于闪存存储时请查看以下一般注释: 针对 ZIL( ...

  2. Linux学习之文件系统zfs文件系统

    ZFS(Zettabyte File System)一个打破过去思维的文件系统,是 Sun Microsystems这家公司所开发出来的全新型态文件系统,因为License的问题所以目前只有在Sola ...

  3. Linux学习之文件系统zfs文件系统之zpool命令详解

    ZPOOL(8) System Manager's Manual ZPOOL(8)NAMEzpool - configure ZFS storage poolsSYNOPSISzpool -?zpoo ...

  4. 开源企业虚拟化Proxmox VE(PVE)6.3 安装

    文章目录 1. 安装环境 2. 安装 (1)写入安装介质 (2)安装 3. 测试 安装程序的ISO镜像包括以下内容: 完整的操作系统(Debian Linux, 64位) Proxmox VE安装程序 ...

  5. ZFS管理手册:第三章ZIL

    ZFS管理手册:第三章ZIL 术语 在开始之前,我们需要了解一些在论坛.博客帖子.邮件列表和一般性讨论中似乎令人困惑的术语.它把我搞糊涂了,直到我写这篇文章的时候,我才真正的明白.所以,让我们开始吧: ...

  6. linux zfs raid,ZFS创建raidz1(RAID5)

    一.VDEVs简介 首先,我们需要了解虚拟设备或VDEV的概念.如果你已经熟悉RAID,那么这个概念对你来说并不陌生,尽管你可能没有将其称为"VDEVs".基本上,我们有一个代表一 ...

  7. Android系统中标准Intent的使用

    2019独角兽企业重金招聘Python工程师标准>>> 一 Android系统用于Activity的标准Intent 1 根据联系人ID显示联系人信息 Intent intent = ...

  8. Android开发笔记(四十)组件通讯工具Intent

    Intent的用途与组成 Intent用于处理Android各组件之间的通讯.Intent完成的工作主要有三部分: 1.Intent需标明本次通讯请求是从哪里来,到哪里去,要怎么走: 2.发起方携带上 ...

  9. 安卓intent发起广播事件给系统或当前app,并从系统或当前app中接收广播

    全栈工程师开发手册 (作者:栾鹏) python教程全解 定义广播接收器 这里定义了一个广播接收一个系统屏幕选装的广播事件和一个自定义事件 import android.content.Intent; ...

最新文章

  1. SpringBoot中整合freemarker时配置文件application.properties示例代码
  2. Zstd 压缩性能分析(含比较)
  3. CSS3 box-sizing(content-box:width指内容 border-box:width指border+padding+content)
  4. 《构建之法》 读书笔记(4)
  5. mybatis中resultType取出数据顺序不一致解决方法
  6. 蒙了吗?offsetLeft、offsetWidth、scrollTop、scrollWidth、event.pageX
  7. 全国计算机一级考试试题大题,2016年全国计算机一级考试试题汇集
  8. .net core 使用X509 私钥加密请求
  9. 淘宝、飞猪、闲鱼都挂了,阿里云却正常?!
  10. Windows与Linux下查看占用端口的进程
  11. 阿里云服务器新手选型指南
  12. sqlserver一些对象的创建
  13. BPT(Business Process Testing)
  14. ElasticJob
  15. U盘中毒后被隐藏的文件夹无法隐藏选项无法取消
  16. Qt+OpenCV在arm板上运行实现思路
  17. [估值-001] 净资产收益率和现值的关系
  18. unity 安卓端输出日志神器--Reporter插件
  19. 那些好玩的生成器网站
  20. 用电预付费系统在工业园区物业管理中的应用

热门文章

  1. springcloud搭建篇
  2. 2018年全国多校算法寒假训练营练习比赛(第五场)题解
  3. (转)如何禁用Windows 10系统的触摸屏
  4. 网宿科技实控人刚公布减持计划 机构席位蜂拥砸盘
  5. CentOS7.3 安装配置 Nginx、MariaDB、PHP
  6. jQuery图片自动添加水印插件
  7. 《NoSQL For Mere Mortals》书评与作者问答录
  8. CS0016: 未能写入输出文件的解决方法
  9. Ajax弹出式无刷新城市选择特效
  10. Windows 7 开发系列汇总