当前位置:首页>Linux>Linux下的VDO技术

Linux下的VDO技术

  • 2026-04-19 07:26:40
Linux下的VDO技术

1.VDO简介和使用说明

1.1.VDO简介

Virtual Data Optimizer(VDO)以重复数据删除(deduplication)、压缩和精简置备的形式为 Linux 提供内联数据降低。当您设置 VDO 卷时,您可以指定一个块设备来构建 VDO 卷以及您要存在的逻辑存储量。当托管活动的虚拟机或容器时,红帽建议按 10:1 的逻辑与物理比例配置存储:也就是说,如果您使用 1TB 的物理存储,则将其显示为 10TB 的逻辑存储。对于对象存储,如 Ceph 提供的类型,红帽建议使用 3:1 的逻辑与物理比例:1TB 的物理存储将显示为 3TB 的逻辑存储。在这两种情况下,您只需将文件系统放在 VDO 提供的逻辑设备之上,然后直接使用它,或将其作为分布式云存储架构的一部分。由于 VDO 是迅速置备的,所以文件系统和应用程序只会看到使用中的逻辑空间,且不知道可用的实际物理空间。使用脚本来监控实际的可用空间,并在使用超过阈值时产生一个报警:例如,当 VDO 卷已满 80% 时。VDO 是一个精简配置的块存储目标。因此,您必须主动监控和管理 VDO 卷中的空间使用情况。

1.2.VDO部署场景

您可以使用各种方法部署 VDO,来为以下情况提供去除重复数据的存储块和文件的访问本地和远程存储KVM文件系统在 iSCSI 上放置 VDOLVM加密#VDO部署在物理磁盘之上,文件系统之下,可以在物理磁盘上创建VDO再创建lvm卷VDO层放置在现有块存储设备例如RAID设备或本地磁盘的顶部。这些块设备也可以是加密设备。存储层(如LVM logic卷和文件系统放置在VDO层的顶部。

1.3.VDO支持的系统

rhel 7.0或者以上的版本

2.部署和使用VDO

2.1.安装VDO

yum install lvm2 kmod-kvdo vdo -y

2.2.创建VDO卷

vdo create \--name=vdo-name \--device=block-device \--vdoLogicalSize=logical-size释义:--name=vdo的名称--device=设备名称--vdoLogicalSize=vdo逻辑卷的大小例如[root@localhost ~]# lsblkNAME                             MAJ:MIN RM  SIZE RO TYPE    MOUNTPOINTsda                                8:0    0   20G  0 disk    sr0                               11:0    1 1024M  0 rom     nvme0n1                          259:0    0  100G  0 disk    ├─nvme0n1p1                      259:1    0  600M  0 part    /boot/efi├─nvme0n1p2                      259:2    0    1G  0 part    /boot└─nvme0n1p3                      259:3    098.4G  0 part      ├─cl-root                      253:0    060.9G  0 lvm     /  ├─cl-swap                      253:1    07.9G  0 lvm     [SWAP]  └─cl-home                      253:2    029.7G  0 lvm     /homenvme0n2                          259:4    0    2G  0 disk    [root@localhost ~]# vdo create --name=vdo1 --device=/dev/sda  --vdoLogicalSize=30GCreating VDO vdo1      The VDO volume can address 16 GB in8 data slabs, each 2 GB.      It can grow to address at most 16 TB of physical storage in8192 slabs.      If a larger maximum size might be needed, use bigger slabs.Starting VDO vdo1Starting compression on VDO vdo1VDO instance 0 volume is ready at /dev/mapper/vdo1#可以通过在 vdo create 命令中添加 --activate=disabled 选项来创建不自动启动的 VDO 卷。#重要:VDO 卷的最小磁盘使用量大约需要 4.7GB

2.4.在VDO卷上创建文件系统

#对于 XFS 文件系统mkfs.xfs -K /dev/mapper/vdo-name#对于 ext4 文件系统mkfs.ext4 -E nodiscard /dev/mapper/vdo-name在新创建的 VDO 卷上使用 -K 和 -E nodiscard 选项的目的是不在发送请求上花费时间,因为它对未分配的块没有影响。新 VDO 卷从 100% 未分配开始。

2.5.注册新设备节点

#使用以下命令等待系统注册新设备节点udevadm settle

2.6.挂载VDO卷

#手动挂载mount /dev/mapper/vdo-name mount-point#自动挂载#rhel 7[root@localhost ~]# blkid | grep vdo1/dev/mapper/vdo1: UUID="875e2037-bae8-4687-9908-3d1d4542b65f"BLOCK_SIZE="4096"TYPE="xfs"[root@localhost ~]# vim /etc/fstabUUID=875e2037-bae8-4687-9908-3d1d4542b65f /data xfs defaults,x-systemd.requires=vdo.service 00#rhel8/dev/mapper/vdo-name mount-point xfs defaults 00/dev/mapper/vdo-name mount-point ext4 defaults 00#如果 VDO 卷位于需要网络的块设备上,如 iSCSI,请添加 _netdev 挂载选项

2.7.监控和维护VDO卷 

查看状态#查看VDO卷的属性与状态vdo status --name=vdo1#显示VDO卷列表vdo list启动和停止#停止和启动VDO卷vdo stop-n vdo1vdo start-n vdo1#要启动特定的VDO卷vdo start--name=my-vdo#要启动所有的VDO卷vdo start--all#要停止特定的VDO卷vdo stop--name=my-vdo#要停止所有VDO卷vdo stop--all激活和取消激活#激活一个特定卷vdo activate --name=my-vdo#激活所有卷vdo activate --all#取消激活一个特定卷vdo deactivate --name=my-vdo#取消激活所有卷vdo deactivate --all

3.VDO回收空间

3.1.在文件系统中为 VDO 回收空间

除非文件系统使用 DISCARD、TRIM 或 UNMAP 命令告知块是空闲的,否则 VDO 无法回收空间。对于不使用 DISCARD、TRIM 或 UNMAP 的文件系统,您可以手动回收空闲空间。保存由二进制 0 组成的文件,以便占据空闲空间,然后删除该文件。

3.2.在没有文件系统的情况下为 VDO 回收空间

回收 VDO 卷上的存储空间,该卷用作没有文件系统的块存储目标。使用 blkdiscard 工具。例如,可以通过在其上部署 LVM ,可以将单个 VDO 卷划分为多个子卷。在取消配置的逻辑卷前,请使用 blkdiscard 工具释放该逻辑卷之前使用的空间。LVM 支持 REQ_DISCARD 命令,并在适当的逻辑块地址上将请求转发到 VDO,以便释放空间。如果您使用其他卷管理器,则它们也需要支持 REQ_DISCARD,或者等效地支持用于 SCSI 设备的 UNMAP 或用于 ATA 设备的 TRIM。

3.3.在光纤通道或以太网网络中为 VDO 回收空间

回收配置到光纤通道存储结构上的主机的 VDO 卷(或部分卷)上的存储空间,或使用 SCSI 目标框架的以太网空间,如 LIO 或 SCST。SCSI 启动器可以使用 UNMAP 命令在精简配置的存储目标上释放空间,但需要配置 SCSI 目标框架来公布对此命令的支持。这通常是通过在这些卷上启用精简置备来完成的。通过运行以下命令,来在基于 Linux 的 SCSI 启动器上验证对 UNMAP 的支持:sg_vpd --page=0xb0 /dev/device在输出中,验证 Maximum unmap LBA count 的值大于零。

4.VDO 写入模式

4.1.VDO 支持的写入模式

#可以根据基础块设备的要求,为 VDO 卷配置写入模式。默认情况下,VDO 选择自动写入模式。VDO 支持以下写入模式:sync当 VDO 处于 sync 模式时,其上的层会假定写入命令将数据写入持久性存储。因此,文件系统或应用程序不需要发出 FLUSH 或强制单元访问(FUA)请求来使数据在关键点上变为持久。只有在底层的存储保证数据在写命令完成后写入持久性存储时,才必须将 VDO 设为 sync 模式。也就是说,存储必须没有易变的写缓存,或者不通过缓存进行写入操作。async当 VDO 处于 async 模式时,VDO 不能保证在确认写命令时数据会被写入持久性存储。文件系统或应用程序必须发出 FLUSH 或 FUA 请求,来确保每次事务中数据在关键点上的持久性。如果底层存储不能保证在写命令完成后数据被写入到持久性存储,必须将 VDO 设为 async 模式;也就是说当存储具有易失性写回缓存时。async-unsafe这个模式与 async 具有同样的属性,但它与原子性、一致性、隔离、持久性(ACID)不兼容。与 async 相比,async-unsafe 具有更好的性能。autoauto 模式根据每个设备的特性自动选择 sync 或 async。这是默认选项。#警告:当假设 ACID 合规的应用程序或文件系统在VDO卷上运行时,sync-unsafe 模式可能会导致意外的数据丢失。

4.2.查看VDO的写入模式

[root@localhost ~]# vdo status --name=vdo1 | grep pol    Configured write policy: autowrite policy: sync配置的写入策略,它是从 sync、async 或 auto 中选择的选项写入策略,其是 VDO 应用的特定的写模式,即 sync 或 async

4.3.检查易变的缓存

使用以下方法之一确定某个设备是否有写回缓存1.阅读 /sys/block/block-device /device/scsi_disk/标识符/cache_type sysfs 文件cat'/sys/block/sda/device/scsi_disk/7:0:0:0/cache_type'write backcat'/sys/block/sdb/device/scsi_disk/1:2:0:0/cache_type'None2.在内核引导日志中找到上述设备是否有写缓存sd 7:0:0:0: [sda] Write cache: enabled, read cache: enabled, does not support DPO or FUAsd 1:2:0:0: [sdb] Write cache: disabled, read cache: disabled, supports DPO and FUA例如:[root@localhost ~]# cat /sys/block/sda/device/scsi_disk/2\:0\:0\:0/cache_type write through#配置设备 sda 表示它有一个回写缓存。对其使用 async 模式。设备 sdb 表示它没有一个回写缓存。对其使用 sync 模式。如果 cache_type 的值是 None 或 writethrough,您应该将 VDO 配置为使用 sync 写模式。

4.4.设置 VDO 写入模式

#警告:使用不正确的写模式可能会在电源故障、系统崩溃或与磁盘意外失去联系后导致数据丢失。要修改现有的VDO卷vdo changeWritePolicy --writePolicy=sync|async|async-unsafe|auto \--name=vdo-name要在创建 VDO 卷时指定写模式,请在 vdo create 命令中添加 --writePolicy=sync|async|async-unsafe|auto 选项。

5.设置VDO删除重复数据和压缩功能

5.1.在 VDO 中启用或禁用删除重复数据

删除重复数据(Deduplication)是通过删除重复块的多个副本来减少存储资源消耗的技术#VDO卷默认启用 deduplication要在 VDO 卷上重启 deduplication,请使用以下命令vdo enableDeduplication --name=my-vdo要在 VDO 卷上停止 deduplication,请使用以下命令vdo disableDeduplication --name=my-vdo在创建新卷时 vdo create 命令中添加 --deduplication=disabled 选项,在创建新 VDO 卷时禁用 deduplication

5.2.在 VDO 中启用或禁用压缩

VDO 提供数据压缩。禁用它可最大化性能并加快了不太可能压缩的数据处理。重新启用它可增加空间节省。除了块级 deduplication 外,VDO 还提供使用 HIOPS 压缩™ 技术的内联块级压缩。#VDO卷默认启用压缩功能 要再次启动它,请使用以下命令vdo enableCompression --name=my-vdo要停止在现有 VDO 卷中压缩,请使用以下命令vdo disableCompression --name=my-vdo在创建新卷时 vdo create 命令中添加 --compression=disabled 选项来禁用压缩,在创建新 VDO 卷时禁用 compression

5.3.默认状态

#查看VDO卷上是否启用了压缩(Compression)和重复数据(Deduplication)删除功能,默认是开启状态[root@localhost ~]# vdo status --name=vdo1 | grep Dedu    Deduplication: enabled[root@localhost ~]#  vdo status --name=vdo1 | grep Com    Compression: enabled

6.增大 VDO 卷的大小

6.1.VDO 卷的物理和逻辑大小

VDO 通过以下方法使用物理、可用物理和逻辑大小:#物理大小这与底层块设备的大小相同。VDO 使用这个存储用于:用户数据,这些数据可能会进行重复数据删除和压缩 VDO 元数据,如 UDS 索引#可用物理大小这是 VDO 可用于用户数据的物理大小的一部分,它等同于物理大小减去元数据的大小,再减去将卷根据指定的 slab 的大小分为 slab 后剩余的值。#逻辑大小这是 VDO 卷在应用程序中的置备大小。它通常大于可用的物理大小。如果没有指定 --vdoLogicalSize 选项,则逻辑卷的调配现在被配置为 1:1 的比率。例如,如果将 VDO 卷放在 20GB 块设备之上,则为 UDS 索引保留 2.5 GB(如果使用默认索引大小)。剩余的 17.5 GB 为 VDO 元数据和用户数据提供。因此,要消耗的可用存储不超过 17.5 GB,且可能会因为组成实际 VDO 卷的元数据而减少。VDO 目前支持任意逻辑卷大小最多为物理卷的 254 倍,但不能超过 4PB。

6.2.VDO中的精简置备

VDO 是一个精简配置的块存储目标。VDO 卷使用的物理空间量可能与为存储用户显示的卷大小有所不同。您可以使用它来节约存储成本。没有可用空间的条件如果写入的数据没有达到预期的性能率,请小心会意外出现存储空间耗尽的问题。每当逻辑块(虚拟存储)的数量超过物理块(实际存储)的数量时,文件系统和应用程序可能会意外地遇到空间耗尽的问题。因此,使用 VDO 的存储系统必须为您提供一个监控 VDO 卷中空闲池大小的方法。您可以使用 vdostats 工具来确定此空闲池的大小。这个工具的默认输出会列出所有运行 VDO 卷的信息,其格式与 Linux df 工具列出的格式类似。例如:[root@localhost ~]# vdostats vdo1Device               1K-blocks      Used Available Use% Space saving%vdo1                  2097152042059881676553220%           98%#查看卷初始信息[root@localhost ~]# vdostats --human-readableDevice                    Size      Used Available Use% Space saving%/dev/mapper/vdo1         20.0G      4.0G     16.0G  20%           98%当 VDO 卷的物理存储容量接近满时,VDO 在系统日志中报告警告,如下所示:Oct  217:13:39 system lvm[13863]: Monitoring VDO pool vdo-name.Oct  217:27:39 system lvm[13863]: WARNING: VDO pool vdo-name is now 80.69% full.Oct  217:28:19 system lvm[13863]: WARNING: VDO pool vdo-name is now 85.25% full.Oct  217:29:39 system lvm[13863]: WARNING: VDO pool vdo-name is now 90.64% full.Oct  217:30:29 system lvm[13863]: WARNING: VDO pool vdo-name is now 96.07% full.#注意:这些警告消息只有在 lvm2-monitor 服务运行时才会出现。它会被默认启用。

6.3.增大 VDO 卷的逻辑卷大小

要增大逻辑大小,请使用:vdo growLogical --name=my-vdo \--vdoLogicalSize=new-logical-size当逻辑卷增大时,VDO 会报告有新的大小卷上的任何设备或文件系统。

6.4.增加 VDO 卷的物理大小

#先决条件:基础块设备的容量大于 VDO 卷的当前物理大小为 VDO 卷添加新物理存储空间vdo growPhysical --name=my-vdo

6.5.缩小VDO卷空间

#无论是增加逻辑卷还是物理卷,都不支持缩容不可能缩小 VDO 卷的逻辑卷大小。不可能以这种方式缩小 VDO 卷

7.删除 VDO 卷

7.1.删除一个有效的 VDO 卷

此步骤移除 VDO 卷及其关联的 UDS 索引vdo remove --name=my-vdo

7.2.删除创建失败的 VDO 卷

此流程清理处于中间状态的 VDO 卷。如果在创建卷时发生故障,则卷处于中间状态。这可能会在以下情况发生,例如:1.系统崩溃2.电源失败3.管理员中断了运行的 vdo create 命令vdo remove --force--name=my-vdo需要 --force 选项,由于卷创建失败,管理员可能会由于更改了系统配置而导致冲突。如果没有 --force 选项,vdo remove 命令会失败,并显示以下信息:[...略...]A previous operation failed.Recovery from the failure either failed or was interrupted.Add '--force' to 'remove' to perform the following cleanup.Steps to clean up VDO my-vdo:umount -f /dev/mapper/my-vdoudevadm settledmsetup remove my-vdovdo: ERROR - VDO volume my-vdo previous operation (create) is incomplete

8.在未清除关闭后恢复 VDO 卷

8.1.英文原文定义

Recovering a VDO volume after an unclean shutdownYou can recover a VDO volume after an unclean shutdown to enable it to continue operating. The task is mostly automated. Additionally, you can clean up after a VDO volume was unsuccessfully created because of a failure in the process.在不干净的关机后恢复 VDO 卷,使其可以继续运行。任务通常是自动的。另外,由于过程中的故障,您可以在 VDO 卷创建失败后进行清理。

8.2.VDO 卷恢复

#VDO卷恢复分两种:自动和手动恢复当在一个非干净的关闭后重启一个 VDO 卷时,VDO 会执行以下操作:1.验证卷元数据的一致性。2.重建一部分元数据以便在需要时进行修复。3.重建是自动的,不需要用户干预。VDO 可能会重建不同的写入模式,具体取决于活跃的写入模式:VDO 可能会重建不同的写入模式,具体取决于活跃的写入模式:如果 VDO 无法成功恢复 VDO 卷,它会将卷置于只读 操作模式下,该模式在卷重新启动时仍然有效。您需要强制重新构建来手动解决这个问题。

8.3.VDO 操作模式

本节描述了 VDO 卷是否在正常运行或者正在从错误中恢复的模式。[root@localhost ~]# vdostats --verbose vdo1 | grep oper  operating mode                      : normalnormal这是默认的操作模式。VDO 卷始终处于 normal 模式。recovering当 VDO 卷在关闭前没有保存其所有元数据时,它会在下次启动时自动进入 recovering 模式。read-only当 VDO 卷遇到严重的内部错误时,它会进入 read-only 模式。这个模式是一个错误状态。

8.4.强制 VDO 卷元数据离线重建

流程:1.检查卷是否处于只读模式。查看命令输出中的 操作模式 属性:[root@localhost ~]# vdo status --name=vdo1 | grep oper        operating mode: normal   #此处处于recovering模式如果卷不处于只读模式,则不需要强制离线重建。2.如果卷正在运行,请停止它:vdo stop--name=vdo13.使用 --forceRebuild 选项重启卷vdo start--name=vdo1 --forceRebuild

9.测试VDO空间节省

9.1.测试 VDO 空间节省的先决条件

执行一系列测试来确定可以使用 VDO 保存多少数据存储空间。#先决条件一个或多个物理块设备可用。目标块设备大于 512 GiB。已安装 VDO

9.2.测试 VDO 的目的和结果

测试结果可帮助您了解特定存储环境中的 VDO 行为。#目标识别来自测试设备的优化响应的配置设置。解释基本调优参数,以帮助避免产品错误配置。创建性能结果参考与实际使用案例进行比较。识别不同的工作负载对性能和数据效率的影响。缩短了实施 VDO 的时间。#测试计划和测试条件VDO 测试提供了可最大程度评估 VDO 的条件。更改测试步骤或参数可能会导致结果无效。高负载环境中的性能用于性能调优终端用户应用程序的 VDO 的可配置属性VDO 的影响是一个原生 4 KiB 块设备对 deduplication 和压缩的访问模式和发行的响应特定应用程序的成本和容量值和性能

9.3.创建 VDO 测试卷

在 512 GiB 物理卷中创建了大小为 1 TiB 的 VDO 卷,用于测试目的。1.创建 VDO 卷:vdo create --name=vdo-test \--device=/dev/sdb \--vdoLogicalSize=1T \--writePolicy=policy \--verbose要在异步存储之上测试 VDO async 模式,请使用 --writePolicy=async 选项创建一个异步卷。要在同步存储之上测试 VDO sync 模式,请使用 --writePolicy=sync 选项创建一个同步卷。2.使用 XFS 或者 ext4 文件系统格式化新卷。mkfs.xfs -K /dev/mapper/vdo-testmkfs.ext4 -E nodiscard /dev/mapper/vdo-test3.挂载格式化的卷:mkdir /mnt/vdo-testmount /dev/mapper/vdo-test /mnt/vdo-test && \chmod a+rwx /mnt/vdo-test

9.4.测试 VDO 测试卷

此流程测试 VDO 测试卷的读取和写入是否正常工作。1.将随机数据的 32 GiB 写入 VDO 卷:dd if=/dev/urandom of=/mnt/vdo-test/testfile bs=4096count=83886082.从 VDO 卷中读取数据并将其写入另一个卷:dd if=/mnt/vdo-test/testfile of=another-location/testfile bs=4096使用您在 VDO 测试卷上有写权限的任何目录替换 another-location。3.比较这两个文件:diff--report-identical-files /mnt/vdo-test/testfile another-location/testfile4.将文件复制到 VDO 卷中的新位置:dd if=another-location/testfile of=/mnt/vdo-test/testfile2 bs=40965.将第三个文件与第二个文件进行比较:diff--report-identical-files /mnt/vdo-test/testfile2 another-location/testfile#命令应该报告这些文件是相同的

9.5.测试VDO 复制

此流程测试 VDO 数据重复在 VDO 测试卷中的效率。1.准备可记录测试结果的表:统计               裸机文件系统         seed后         10 个副本后文件系统使用大小使用 VDO 数据使用 VDO 逻辑2.在 VDO 卷中创建 10 个目录存放测试数据集的 10 个副本:mkdir /mnt/vdo-test/vdo{01..10}3.检查文件系统报告的磁盘用量:df --human-readable /mnt/vdo-test4.记录以下值:vdostats --verbose | grep"blocks used"data blocks used 的值是在 VDO 下运行的物理设备优化后用户数据所使用的块数。logical blocks used 的值是优化前使用的块数。它将作为测量的起点。5.在 VDO 卷中创建数据源文件:dd if=/dev/urandom of=/mnt/vdo-test/sourcefile bs=4096count=10485766.重新定义已使用的物理磁盘空间量:df --human-readable /mnt/vdo-test7.将文件复制到 10 个子目录中的每个子目录中:for i in {01..10}; docp /mnt/vdo-test/sourcefile /mnt/vdo-test/vdo$idone8.重新定义已使用的物理磁盘空间量:df -h /mnt/vdo-testvdostats --verbose | grep"blocks used"9.从写测试数据之前找到的值中减去文件系统所使用的空间的新值。从文件系统的角度来看,这是此测试所使用的空间量。10.观察您记录统计中的空间节约:

9.5.测试VDO 压缩

流程在 VDO 测试卷中测试 VDO 数据压缩的效率。1.禁用 deduplication 并在 VDO 测试卷中启用压缩:vdo disableDeduplication --name=vdo-testvdo enableCompression --name=vdo-test2.同步 VDO 卷以完成所有未完成压缩:sync && dmsetup message vdo-test 0 sync-dedupe3.在传输前检查 VDO 统计:vdostats --verbose | grep"blocks used"记下 data blocks used 和 logical blocks used 的值。4.VDO 优化文件系统开销以及实际的用户数据。计算为空文件系统压缩而节省的 4 KiB 块的数量,来作为 logical blocks used 减去 data blocks used。5.将 /lib 目录的内容复制到 VDO 卷中:cp--verbose--recursive /lib /mnt/vdo-test记录复制数据的总大小。6.同步 Linux 缓存和 VDO 卷:sync && dmsetup message vdo-test 0 sync-dedupe7.再次检查 VDO 统计:vdostats --verbose | grep"blocks used"观察 logical blocks used 和 data blocks used 的值。8.使用以下公式计算压缩保存的字节数:saved_bytes = (logical_blocks_used - data_blocks_used) * 4096

9.6.测试 VDO 空间总耗

此流程测试 VDO 数据变异以及在 VDO 测试卷中压缩的效率。流程创建并挂载 VDO 卷,如 第9.3节 “创建 VDO 测试卷” 中所述。在同一卷上执行测试,如 测量 VDO 去除重复数据 和 测量 VDO 压缩 中所述,而不删除它。观察 vdostats 输出中空间节省的变化。

9.7.测试 TRIM 和 DISCARD 对 VDO 的影响

此流程测试 TRIM 和 DISCARD 命令是否能正确地从 VDO 测试卷上已删除的文件中释放块。它演示了,丢弃告知 VDO 不再使用空间。流程1.准备可记录测试结果的表:步骤             已使用的文件空间(MB)已使用的数据块使用的逻辑块初始空间 添加 1 GiB 文件运行 fstrim删除 1 GiB 文件 运行 fstrim2.清理文件系统来删除不需要的块:fstrim /mnt/vdo-test#该命令可能需要很长时间3.记录文件系统中初始空间的使用情况:df -m /mnt/vdo-test4.请查看 VDO 卷使用的物理和逻辑数据块数:vdostats --verbose | grep"blocks used"5.使用 VDO 卷上的非重复数据创建一个 1 GiB 文件:dd if=/dev/urandom of=/mnt/vdo-test/file bs=1M count=1K6.再次记录空间使用量:df -m /mnt/vdo-testvdostats --verbose | grep"blocks used"文件系统应使用额外的 1 GiB。data blocks used 和 logical blocks used 的值应该同样增加。7.再次执行文件系统:fstrim /mnt/vdo-test8.再次检查空间用量,确认清除操作不会影响物理卷的使用:df -m /mnt/vdo-testvdostats --verbose | grep"blocks used"9.删除 1 GiB 文件:rm /mnt/vdo-test/file10.检查并记录空间使用情况:df -m /mnt/vdo-testvdostats --verbose | grep"blocks used"文件系统知道已删除了某个文件,但是由于没有指向底层存储,物理或逻辑块的数量不会改变。11.再次执行文件系统:fstrim /mnt/vdo-test12.检查并记录空间使用情况:df -m /mnt/vdo-testvdostats --verbose | grep"blocks used"fstrim 工具在文件系统中查找空闲的块,并为未使用的地址向 VDO 卷发送 TRIM 命令,这会释放相关的逻辑块。VDO 处理 TRIM 命令以释放底层物理块。

9.8.删除 VDO 测试卷

此流程移除了用于从系统中测试 VDO 效率的 VDO 卷。1.卸载在 VDO 卷中创建的文件系统:umount /mnt/vdo-test2.从系统中删除 VDO 测试卷:vdo remove --name=vdo-test3.验证卷是否已被删除:vdo list --all | grep vdo-test

10.测试VDO性能

10.1.测试 VDO 性能的先决条件

一个或多个 Linux 物理块设备可用。#先决条件目标块设备(如 /dev/sdb)大于 512 GiB。灵活的 I/O 测试器(fio)已安装。已安装 VDO。确定您的 CPU 在最高级别的性能设置中运行。如果可能,使用 BIOS 配置或 Linux cpupower 工具禁用 CPU 频率扩展。如果可能,请为 CPU 启用动态处理器频率调整(Turbo Boost 或者 Turbo Core)。此功能在测试结果中引入了一些变化,但提高了整体性能。文件系统可能会对性能有唯一影响。它们通常会扭曲性能测量,使其更难隔离 VDO 对结果的影响。

10.2.创建用于性能测试的 VDO 卷

在 512 GiB 物理卷中创建一个 VDO 卷,逻辑卷大小为 1 TiB,用于测试 VDO 性能。1.创建 VDO 卷:vdo create --name=vdo-test \--device=/dev/sdb \--vdoLogicalSize=1T \--writePolicy=policy \--verbose要在异步存储之上测试 VDO async 模式,请使用 --writePolicy=async 选项创建一个异步卷。要在同步存储之上测试 VDO sync 模式,请使用 --writePolicy=sync 选项创建一个同步卷。2.使用 XFS 或者 ext4 文件系统格式化新卷。mkfs.xfs -K /dev/mapper/vdo-testmkfs.ext4 -E nodiscard /dev/mapper/vdo-test3.挂载格式化的卷:mkdir /mnt/vdo-testmount /dev/mapper/vdo-test /mnt/vdo-test && \chmod a+rwx /mnt/vdo-test

10.3测试 I/O 深度对 VDO 性能的影响

这些测试为 VDO 配置决定了产生最佳吞吐量和最低延迟的 I/O 深度。I/O 深度代表 fio 工具一次提交的 I/O 请求数。由于 VDO 使用 4 KiB 扇区大小,因此测试在 4 KiB I/O 操作以及 1、8、16、32、64、128、256、512 和 1024 的 I/O 深度时执行四角测试。#重要:您必须在每个 I/O 深度测试运行之间重新创建 VDO 卷。#测试 I/O 深度对 VDO 中顺序 100% 读的影响1.创建一个新的 VDO 卷。2.通过对测试卷执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.为顺序 100% 读记录报告的吞吐量和延迟:for depth in124816326412825651210242048do  fio --rw=read \--bs=4096 \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=$depth \--scramble_buffers=1 \--offset=0 \--size=100gdone#测试 I/O 深度对 VDO 中顺序 100% 写的影响1.创建一个新的 VDO 卷。2.通过对测试卷执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.为顺序 100% 写记录报告的吞吐量和延迟:for depth in124816326412825651210242048do  fio --rw=write \--bs=4096 \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=$depth \--scramble_buffers=1 \--offset=0 \--size=100gdone#测试 I/O 深度对 VDO 中随机 100% 读取的影响1.创建一个新的 VDO 卷。2.通过执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.记录随机 100% 报告的吞吐量和延迟时间:for depth in124816326412825651210242048do  fio --rw=randread \--bs=4096 \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=$depth \--scramble_buffers=1 \--offset=0 \--size=100gdone#在 VDO 中测试 I/O 深度对随机 100% 写入的影响1.创建一个新的 VDO 卷。2.通过执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.记录随机 100% 写的吞吐量和延迟时间:fio --rw=randwrite \--bs=4096 \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=depth-value

10.4.测试 I/O 请求大小对 VDO 性能的影响

使用这些测试,您可以识别 VDO 在最佳 I/O 深度时获得最佳性能的块大小。测试在固定 I/O 深度下执行四个测试,块大小为 8 KiB 到 1 MiB。#重要:您必须在每个 I/O 深度测试运行之间重新创建 VDO 卷。#测试 I/O 请求大小对 VDO 中连续写入操作的影响1.创建一个新的 VDO 卷。2.通过对测试卷执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.为后续写入测试记录报告的吞吐量和延迟:for iosize in481632641282565121024do  fio --rw=write \--bs=${iosize}k \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=optimal-depth \--scramble_buffers=1 \--offset=0 \--size=100gdone#测试 I/O 请求大小在 VDO 中随机写入时的影响1.创建一个新的 VDO 卷。2.通过对测试卷执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.记录随机写入测试所报告吞吐量和延迟时间:fio --rw=randwrite \--bs=request-size \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=optimal-depth \--scramble_buffers=1 \--offset=0 \--size=100g#测试 I/O 请求大小对 VDO 中顺序读取的影响1.创建一个新的 VDO 卷。2.通过对测试卷执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.为后续读测试记录报告的吞吐量和延迟:for iosize in481632641282565121024do  fio --rw=read \--bs=${iosize}k \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=optimal-depth \--scramble_buffers=1 \--offset=0 \--size=100gdone#测试 VDO 中 I/O 请求大小对随机读取的影响1.创建一个新的 VDO 卷。2.通过对测试卷执行写 fio 作业来预先填充测试可能会访问的区域:fio --rw=write \--bs=8M \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--thread \--direct=1 \--scramble_buffers=13.记录随机读取测试所报告吞吐量和延迟时间:for iosize in481632641282565121024do  fio --rw=read \--bs=${iosize}k \--name=vdo \--filename=/dev/mapper/vdo-test \--ioengine=libaio \--numjobs=1 \--thread \--norandommap \--runtime=300 \--direct=1 \--iodepth=optimal-depth \--scramble_buffers=1 \--offset=0 \--size=100gdone

10.5.使用的 fio 选项

参数测试中使用的值描述
--size100 GiBfio 按作业发送给目标的数据量。
--bs4kfio 生成的每个读写请求的块大小。红帽建议使用 4 KiB 块大小匹配 4 KiB 默认 VDO。
--numjobs1 代表 HDD,2 代表 SSDfio 为基准所创建的作业量。每个作业发送由 --size 选项指定的数据量。第一个作业将数据发送到 --offset 选项指定的偏移处的设备。除非提供了 --offset_increment 选项,否则后续作业将覆盖磁盘的同一区域,这会使每个作业从上一个作业在该值开始的位置偏移。为了在闪存磁盘(SSD)上达到峰值性能,红帽建议至少有两个作业。一个作业通常足以饱和旋转型磁盘(HDD)吞吐量。
--threadnone指示 fio 作业在线程中运行,而不是 fork ,这可以通过限制上下文切换来提供更好的性能。
--ioenginelibaiofio 用于基准测试的 I/O 引擎。红帽测试使用名为 libaio 的异步非缓冲引擎测试一个或多个进程同时进行随机请求的工作负载。libaio 引擎可让单个线程在检索任何数据之前异步发出多个请求。这限制了同步引擎如果许多线程提供请求时所需的上下文切换数。
--direct1(libaio)该选项允许提交到该设备的请求绕过内核页面缓存。您必须将 libaio 引擎与 --direct 选项一起使用。否则,内核将同步 API 用于所有 I/O 请求。
--iodepth至少 128任意时刻的 I/O 缓冲数量。高的值通常会提高性能,特别是用于随机读取和写入时。高值可确保控制器始终具有批处理请求。但是,设置这个值太大(通常大于 1K)可能会导致不必要的延迟。红帽建议 128 到 512 之间的值。最终的值会是一个折中的选择,它取决于您的应用程序如何容忍延迟。
--iodepth_batch_submit16当 I/O 深度缓冲池开始为空时创建的 I/O 请求数目。这个选项限制任务从 I/O 操作切换为缓冲创建。
--iodepth_batch_complete16提交批处理前需要完成的 I/O 操作数目。这个选项限制任务从 I/O 操作切换为缓冲创建。
--gtod_reduce1禁用日常调用来计算延迟。如果启用,这个设置会降低吞吐量。启用此选项,除非您需要测量延迟。

10.6.删VDO性能测试卷

此流程移除了用于从系统中测试 VDO 效率的 VDO 卷。1.卸载在 VDO 卷中创建的文件系统:umount /mnt/vdo-test2.从系统中删除 VDO 测试卷:vdo remove --name=vdo-test3.验证卷是否已被删除:vdo list --all | grep vdo-test

11.丢弃未使用的块

11.1.启用定期块丢弃

启用 systemd 计时器来定期丢弃所有支持的文件系统上未使用的块。systemctl enable --now fstrim.timer

11.2.启用在线块丢弃

执行在线块丢弃操作,以自动丢弃所有支持的文件系统上未使用的块。#流程在挂载时启用在线丢弃:手动挂载文件系统时,请添加 -o discard 挂载选项:# mount -o discard device mount-point[root@localhost ~]# mount -o discard /dev/mapper/vdo1 /data/永久挂载文件系统时,请将 discard 选项添加到 /etc/fstab 文件中的挂载条目中。

11.3.执行批量块丢弃

执行批量块丢弃操作,以丢弃挂载的文件系统上未使用的块。#流程使用 fstrim 工具:要只在所选文件系统中执行丢弃,请使用:# fstrim mount-point要在所有挂载的文件系统中执行丢弃,请使用:# fstrim --all如果您在以下设备上执行 fstrim 命令:不支持丢弃操作的设备,或者由多个设备组成的逻辑设备(LVM 或者 MD),其中任意设备不支持丢弃操作:下面的信息将显示:# fstrim /mnt/non_discardfstrim: /mnt/non_discard: the discard operation is not supported

12.使用 Web 控制台管理

12.1控制台管理VDO

使用 RHEL 8 web 控制台配置 Virtual Data Optimizer(VDO)#先决条件RHEL 8 web 控制台已安装并可以访问。cockpit-storaged 软件包已安装在您的系统上。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-20 15:18:36 HTTP/2.0 GET : https://f.mffb.com.cn/a/484749.html
  2. 运行时间 : 0.096307s [ 吞吐率:10.38req/s ] 内存消耗:5,062.63kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=a68ec43c1e9efd068d580636e12886fe
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000424s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000664s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000315s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000283s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000545s ]
  6. SELECT * FROM `set` [ RunTime:0.000643s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000576s ]
  8. SELECT * FROM `article` WHERE `id` = 484749 LIMIT 1 [ RunTime:0.001144s ]
  9. UPDATE `article` SET `lasttime` = 1776669516 WHERE `id` = 484749 [ RunTime:0.006225s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000280s ]
  11. SELECT * FROM `article` WHERE `id` < 484749 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000741s ]
  12. SELECT * FROM `article` WHERE `id` > 484749 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000557s ]
  13. SELECT * FROM `article` WHERE `id` < 484749 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003932s ]
  14. SELECT * FROM `article` WHERE `id` < 484749 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.005918s ]
  15. SELECT * FROM `article` WHERE `id` < 484749 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.006062s ]
0.097873s