Replies: 2 comments 6 replies
-
If at some point you've significantly filled your pool, deleting something later, that resulted in some metaslabs remain almost full, I guess you could be affected by the same issue this PR of mine should fix: #17037 . |
Beta Was this translation helpful? Give feedback.
3 replies
-
When you are randomly writing and deleting the data, especially with blocks of different sizes (due to small files or different compressability), fragmentation is just a part of life. That is why it was recommended to not fill pools with such workloads more than ~50%. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I learned in #17024 that fragmentation is a measurement of size of free space.
I thought our usage pattern would have allowed for a quite low frag metric, but nothing I've tried has allowed improving it more than temporarily. It seems the fragmentation (or the metric, at least) is very tightly connected to the pool capacity.
I did a bunch of experiments like this:
time dd if=/dev/zero bs=1M count=1k of=/newzfs3/zero0
I'm okay with it that when the pool is 51% full, the fragmentation says 2%.
But when the pool is 65% full, it's 46% fragmented, and when it's 79% full, it shows as 68% fragmented.
I found that with recordsize=1M, when the pool is 79% full, it shows 26% fragmented, so that's an improvement.
I tried different "bs=" sizes, tried adding a ZIL, tried changing several module params, none of these had any effect.
This is disappointing and surprising. Is it really expected that 6 files written sequentially would end up with 26-68% fragmentation just by filling the pool to 80%? Notably, most of those writes were done while the pool was less than half full. I could believe that data written to a pool that's 80-90% full might tend to be stored in a non-optimal/fragmented manner, depending on the usage patterns. But why would such ideal input be written so poorly ?
Beta Was this translation helpful? Give feedback.
All reactions