All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] Delayed refs rsv
@ 2018-11-21 18:59 Josef Bacik
  2018-11-21 18:59 ` [PATCH 1/6] btrfs: add btrfs_delete_ref_head helper Josef Bacik
                   ` (6 more replies)
  0 siblings, 7 replies; 23+ messages in thread
From: Josef Bacik @ 2018-11-21 18:59 UTC (permalink / raw)
  To: linux-btrfs, kernel-team

This patchset changes how we do space reservations for delayed refs.  We were
hitting probably 20-40 enospc abort's per day in production while running
delayed refs at transaction commit time.  This means we ran out of space in the
global reserve and couldn't easily get more space in use_block_rsv().

The global reserve has grown to cover everything we don't reserve space
explicitly for, and we've grown a lot of weird ad-hoc hueristics to know if
we're running short on space and when it's time to force a commit.  A failure
rate of 20-40 file systems when we run hundreds of thousands of them isn't super
high, but cleaning up this code will make things less ugly and more predictible.

Thus the delayed refs rsv.  We always know how many delayed refs we have
outstanding, and although running them generates more we can use the global
reserve for that spill over, which fits better into it's desired use than a full
blown reservation.  This first approach is to simply take how many times we're
reserving space for and multiply that by 2 in order to save enough space for the
delayed refs that could be generated.  This is a niave approach and will
probably evolve, but for now it works.

With this patchset we've gone down to 2-8 failures per week.  It's not perfect,
there are some corner cases that still need to be addressed, but is
significantly better than what we had.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2018-11-27 19:11 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 18:59 [PATCH 0/6] Delayed refs rsv Josef Bacik
2018-11-21 18:59 ` [PATCH 1/6] btrfs: add btrfs_delete_ref_head helper Josef Bacik
2018-11-22  9:12   ` Nikolay Borisov
2018-11-22  9:42     ` Nikolay Borisov
2018-11-23 13:45       ` David Sterba
2018-11-23 13:50         ` Nikolay Borisov
2018-11-21 18:59 ` [PATCH 2/6] btrfs: add cleanup_ref_head_accounting helper Josef Bacik
2018-11-22  1:06   ` Qu Wenruo
2018-11-23 13:51     ` David Sterba
2018-11-21 18:59 ` [PATCH 3/6] btrfs: cleanup extent_op handling Josef Bacik
2018-11-22  8:56   ` Lu Fengqi
2018-11-22 10:09   ` Nikolay Borisov
2018-11-27 15:39     ` Josef Bacik
2018-11-23 15:05   ` David Sterba
2018-11-21 18:59 ` [PATCH 4/6] btrfs: only track ref_heads in delayed_ref_updates Josef Bacik
2018-11-22 10:19   ` Nikolay Borisov
2018-11-21 18:59 ` [PATCH 5/6] btrfs: introduce delayed_refs_rsv Josef Bacik
2018-11-26  9:14   ` Nikolay Borisov
2018-11-27 15:38     ` David Sterba
2018-11-27 19:11     ` Josef Bacik
2018-11-21 18:59 ` [PATCH 6/6] btrfs: fix truncate throttling Josef Bacik
2018-11-26  9:44   ` Nikolay Borisov
2018-11-23 15:55 ` [PATCH 0/6] Delayed refs rsv David Sterba

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.