Each call to rgw_read (rgw_file.cc) invokes three calls to RGWRados::get_obj_state with s->prefetch_data=true. It results in great read amplification. If length argument in rgw_read call is smaller than rgw_max_chunk_size, then the amplification is threefold.
Signed-off-by: Kajetan Janiak <kjaniak@cloudferro.com>
(cherry picked from commit
f915e21e5a1baf6030c1407b3058d4f58c638df9)
Conflicts:
src/rgw/rgw_op.cc
Cherry-pick notes:
- Octopus sets prfetch data flag through Rados method vs. method on object
return 0;
}
+ bool prefetch_data() override { return false; }
+
}; /* RGWReadRequest */
/*
{
obj = rgw_obj(s->bucket, s->object);
store->getRados()->set_atomic(s->obj_ctx, obj);
- if (get_data) {
+ if (prefetch_data()) {
store->getRados()->set_prefetch_data(s->obj_ctx, obj);
}