I run a Usenet service with FreeBSD 13.2-RELEASE-p4 and INN running in a ESXi VM atop NVMe storage using the NVMe controller, if that matters. I'm noticing a strange issue where the reported size of a 10GB news buffer file is larger than the actual/apparent size and I do not understand why.
This is a file that is continuously written to and when it reaches the end begins storing overtop data at the beginning (known as a CNFS buffer in INN/Usenet speak). The first few times the buffer is filled and wraps the space reported by 'du' is smaller than the file (given the small amount of compression from ZFS) but after it wraps a number of times 'du' starts to report larger sizes.
This file was originally created with 'dd if=/dev/zero of=cnfs2 bs=1k count=10000000' and has been written to for a few days with INN and wrapped ~13 times.
When I copy the file over to a Linux box with ext4 it looks 'normal':
I then copied the file back from the Linux box to a new folder and now it is using double?!
When I remove that file ~20GB of space are recovered according to df.
What would cause this kind of behavior? It feels like this is recent change in behavior after a patch release as I don't recall seeing this a year+ ago. Typically the file consumes about 9.5GB of space given the little bit of compression provided by ZFS.
Code:
# du cnfs2
12612853 cnfs2
# du -A cnfs2
10000000 cnfs2
This is a file that is continuously written to and when it reaches the end begins storing overtop data at the beginning (known as a CNFS buffer in INN/Usenet speak). The first few times the buffer is filled and wraps the space reported by 'du' is smaller than the file (given the small amount of compression from ZFS) but after it wraps a number of times 'du' starts to report larger sizes.
This file was originally created with 'dd if=/dev/zero of=cnfs2 bs=1k count=10000000' and has been written to for a few days with INN and wrapped ~13 times.
When I copy the file over to a Linux box with ext4 it looks 'normal':
Code:
# du cnfs2
10000000 cnfs2
# du --apparent-size cnfs2
10000000 cnfs2
I then copied the file back from the Linux box to a new folder and now it is using double?!
Code:
# du -A cnfs2
10000000 cnfs2
# du cnfs2
20224841 cnfs2
When I remove that file ~20GB of space are recovered according to df.
What would cause this kind of behavior? It feels like this is recent change in behavior after a patch release as I don't recall seeing this a year+ ago. Typically the file consumes about 9.5GB of space given the little bit of compression provided by ZFS.