The placement target index type (normal, indexless, or #id).
+.. option:: --placement-inline-data=<true>
+
+ Whether the placement target is configured to store a data chunk inline in head objects.
+
.. option:: --tier-type=<type>
The zone tier type.
}
},
"data_extra_pool": "default.rgw.buckets.non-ec",
- "index_type": 0
+ "index_type": 0,
+ "inline_data": true
}
}
],
--index-pool default.rgw.temporary.index \
--data-extra-pool default.rgw.temporary.non-ec
+.. note:: With default placement target settings, RGW stores an object's first data chunk in the RADOS "head" object along
+ with xattr metadata. The `--placement-inline-data=false` flag may be passed with the `zone placement add` or
+ `zone placement modify` commands to change this behavior for new objects stored on the target.
+ When data is stored inline (default), it may provide an advantage for read/write workloads since the first chunk of
+ an object's data can be retrieved/stored in a single librados call along with object metadata. On the other hand, a
+ target that does not store data inline can provide a performance benefit for RGW client delete requests when
+ bluestore db is located on faster storage devices (as compared to data devices) since it eliminates the need to access
+ slower devices synchronously while processing the client request. In that case, all data associated with the deleted
+ objects can be removed asynchronously in the background by garbage collection.
+
.. _adding_a_storage_class:
Adding a Storage Class
cout << " --data-extra-pool=<pool> placement target data extra (non-ec) pool\n";
cout << " --placement-index-type=<type>\n";
cout << " placement target index type (normal, indexless, or #id)\n";
+ cout << " --placement-inline-data=<true>\n";
+ cout << " set whether the placement target is configured to store a data\n";
+ cout << " chunk inline in head objects\n";
cout << " --compression=<type> placement target compression type (plugin name or empty/none)\n";
cout << " --tier-type=<type> zone tier type\n";
cout << " --tier-config=<k>=<v>[,...]\n";
list<string> tags;
list<string> tags_add;
list<string> tags_rm;
+ int placement_inline_data = true;
+ bool placement_inline_data_specified = false;
int64_t max_objects = -1;
int64_t max_size = -1;
int num_shards = 0;
bool num_shards_specified = false;
std::optional<int> bucket_index_max_shards;
+
int max_concurrent_ios = 32;
uint64_t orphan_stale_secs = (24 * 3600);
int detail = false;
// do nothing
} else if (ceph_argparse_binary_flag(args, i, &inconsistent_index, NULL, "--inconsistent-index", (char*)NULL)) {
// do nothing
+ } else if (ceph_argparse_binary_flag(args, i, &placement_inline_data, NULL, "--placement-inline-data", (char*)NULL)) {
+ placement_inline_data_specified = true;
+ // do nothing
} else if (ceph_argparse_witharg(args, i, &val, "--caps", (char*)NULL)) {
caps = val;
} else if (ceph_argparse_witharg(args, i, &val, "--infile", (char*)NULL)) {
if (index_type_specified) {
info.index_type = placement_index_type;
}
+ if (placement_inline_data_specified) {
+ info.inline_data = placement_inline_data;
+ }
ret = check_pool_support_omap(info.get_data_extra_pool());
if (ret < 0) {
}
if (same_pool) {
- head_max_size = max_head_chunk_size;
+ RGWZonePlacementInfo placement_info;
+ if (!store->svc()->zone->get_zone_params().get_placement(head_obj->get_bucket()->get_placement_rule().name, &placement_info) || placement_info.inline_data) {
+ head_max_size = max_head_chunk_size;
+ } else {
+ head_max_size = 0;
+ }
chunk_size = max_head_chunk_size;
}
encode_json("storage_classes", storage_classes, f);
encode_json("data_extra_pool", data_extra_pool, f);
encode_json("index_type", (uint32_t)index_type, f);
+ encode_json("inline_data", inline_data, f);
/* no real need for backward compatibility of compression_type and data_pool in here,
* rather not clutter the output */
JSONDecoder::decode_json("data_extra_pool", data_extra_pool, obj);
uint32_t it;
JSONDecoder::decode_json("index_type", it, obj);
+ JSONDecoder::decode_json("inline_data", inline_data, obj);
index_type = (rgw::BucketIndexType)it;
/* backward compatibility, these are now defined in storage_classes */
}
} // namespace rgw
+
rgw_pool data_extra_pool; /* if not set we should use data_pool */
RGWZoneStorageClasses storage_classes;
rgw::BucketIndexType index_type;
+ bool inline_data;
- RGWZonePlacementInfo() : index_type(rgw::BucketIndexType::Normal) {}
+ RGWZonePlacementInfo() : index_type(rgw::BucketIndexType::Normal), inline_data(true) {}
void encode(bufferlist& bl) const {
- ENCODE_START(7, 1, bl);
+ ENCODE_START(8, 1, bl);
encode(index_pool.to_str(), bl);
rgw_pool standard_data_pool = get_data_pool(RGW_STORAGE_CLASS_STANDARD);
encode(standard_data_pool.to_str(), bl);
std::string standard_compression_type = get_compression_type(RGW_STORAGE_CLASS_STANDARD);
encode(standard_compression_type, bl);
encode(storage_classes, bl);
+ encode(inline_data, bl);
ENCODE_FINISH(bl);
}
void decode(bufferlist::const_iterator& bl) {
- DECODE_START(7, bl);
+ DECODE_START(8, bl);
std::string index_pool_str;
std::string data_pool_str;
decode(index_pool_str, bl);
storage_classes.set_storage_class(RGW_STORAGE_CLASS_STANDARD, &standard_data_pool,
(!standard_compression_type.empty() ? &standard_compression_type : nullptr));
}
+ if (struct_v >= 8) {
+ decode(inline_data, bl);
+ }
DECODE_FINISH(bl);
}
const rgw_pool& get_data_extra_pool() const {
--data-extra-pool=<pool> placement target data extra (non-ec) pool
--placement-index-type=<type>
placement target index type (normal, indexless, or #id)
+ --placement-inline-data=<true>
+ set whether the placement target is configured to store a data
+ chunk inline in head objects
--compression=<type> placement target compression type (plugin name or empty/none)
--tier-type=<type> zone tier type
--tier-config=<k>=<v>[,...]