Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / doc / dev / osd_internals / wbthrottle.rst
1 ==================
2 Writeback Throttle
3 ==================
4
5 Previously, the filestore had a problem when handling large numbers of
6 small ios.  We throttle dirty data implicitely via the journal, but
7 a large number of inodes can be dirtied without filling the journal
8 resulting in a very long sync time when the sync finally does happen.
9 The flusher was not an adequate solution to this problem since it
10 forced writeback of small writes too eagerly killing performance.
11
12 WBThrottle tracks unflushed io per hobject_t and ::fsyncs in lru
13 order once the start_flusher threshold is exceeded for any of
14 dirty bytes, dirty ios, or dirty inodes.  While any of these exceed
15 the hard_limit, we block on throttle() in _do_op.
16
17 See src/os/WBThrottle.h, src/osd/WBThrottle.cc
18
19 To track the open FDs through the writeback process, there is now an
20 fdcache to cache open fds.  lfn_open now returns a cached FDRef which
21 implicitely closes the fd once all references have expired.
22
23 Filestore syncs have a sideeffect of flushing all outstanding objects
24 in the wbthrottle.
25
26 lfn_unlink clears the cached FDRef and wbthrottle entries for the
27 unlinked object when the last link is removed and asserts that all
28 outstanding FDRefs for that object are dead.