Agree! Balance_Read improves a little device utility but poorer performance because of cache in my test. Gregory Farnum <gfarnum@xxxxxxxxxx> 于2018年12月11日周二 上午6:30写道: > > There are two issues I can think of offhand: > > 1) This is often not actually a net gain to anybody, because it > reduces cache efficiency of the OSDs (reads are distributed across all > replicas instead of just 1, and a single object is not usually a > hotspot). > > 2) Replicas don't have all the state available to do proper read > guards that the primary does, so you might direct a read to a replica > that is still backfilling and have it tell you that a snapshot doesn't > exist when it really does, or return the wrong version of the data. :( > > That second one is of course the killer, despite being a pretty rare scenario. > -Greg > > On Sat, Dec 8, 2018 at 8:27 AM Ning Yao <zay11022@xxxxxxxxx> wrote: > > > > I think the balance_snap_reads and balance_parent_reads would be > > safety since snap would not be changed, right? Is that any issue > > with the options rbd_balance_snap_reads and rbd_balance_parent_reads, > > which is default setting to false now? > > > > Regards > > Ning Yao > > Gregory Farnum <gfarnum@xxxxxxxxxx> 于2018年12月6日周四 上午11:42写道: > > > > > > On Sun, Dec 2, 2018 at 7:37 PM 韦皓诚 <whc0000001@xxxxxxxxx> wrote: > > > > > > > > Hi~ > > > > I want to turn on the "CEPH_OSD_FALG_BALANCE_READS" flag to > > > > optimize read performance. Do I just need to set flag in librados API > > > > and is there any other problems? > > > > > > While there may be limited cases where it can be useful, there are a > > > lot of caveats and surprising holes where this doesn't work right or > > > can cause issues. (Because it reads from replicas — which don't have > > > the full PG state a primary does — there are numerous situations where > > > you can retrieve stale or incorrect data.) I would strongly advise > > > against using it. > > > -Greg