]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: disable prefetch in rgw_file 44170/head
authorKajetan Janiak <kajetan.janiak@gmail.com>
Wed, 18 Nov 2020 10:42:07 +0000 (11:42 +0100)
committerCory Snyder <csnyder@iland.com>
Wed, 1 Dec 2021 19:56:56 +0000 (14:56 -0500)
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

src/rgw/rgw_file.h
src/rgw/rgw_op.cc

index 32449721ea1f6af8e1a12714040fd14b12a27651..ac8ada0251f5fc64772f76a278d9c31bc2fc8764 100644 (file)
@@ -2164,6 +2164,8 @@ public:
     return 0;
   }
 
+  bool prefetch_data() override { return false; }
+
 }; /* RGWReadRequest */
 
 /*
index ec0dbf64361dc57b91223e14cede05c2a96adcfb..7dc50a6ce1c795b990a19561a437a4dad24abb86 100644 (file)
@@ -966,7 +966,7 @@ int RGWGetObj::verify_permission()
 {
   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);
   }