-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Linux Kernel:4.19.190 CentOS 8
ZFS Version:zfs2.1.5
Architecture:x86-64
When I used vdbench to test the 8K small file performance of zfs, I found that when zfs_arc_max=0 (128G) is 100% read, when the arc cache displayed by arcstat does not reach 128G, ops(100000 ~ 200000 ) will increase with the increase of arc cache, and maintain at around 150,000. When the arc cache reaches 128G, arc arc reclaim occurs at this time, and the ops value often drops by 60% or more (when the performance drops, zpool iostat observes that the disk_wait of the data lun will become larger 600us->1~3ms), and the ops is between 100000 and 190000 fluctuation.
vdbench screenshot:

When I set zfs_arc_max=192G and restarted the test, I observed that the maximum value of the arc cache displayed by arcstat was 171G, and arc reclaim did not occur during the entire test (judged by the fact that the arc_prune count did not increase), and the ops during the entire test was very stable and maintained Around 200000.
So I set zfs_arc_max=171G and started the test again. The ops during the whole test was very stable, only 2 times the ops dropped by 50%. These two time points happened to be the two time points when the arc_prune count increased during the entire test process, so I thought it was arc-related recycling that caused the ops performance to drop. But when I set zfs_arc_max=64G, there is always arc recycling, but the ops is very stable, and there is no situation where the ops drops a lot. Can someone tell me what is causing this.
When zfs_arc_max=64G and 128G, I used the ftrace embedded in the kernel to track arc_evict, and found that many arc_hdr_free_abd (10~30us) will be called in one arc_evict_state (750161us) function call. Because enabling trace will seriously degrade performance, this conclusion can only be used as a reference, and I hope it will be useful.
If anyone needs more info, I'll do my best to provide it