summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-11-02 13:21:42 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-11-02 13:21:42 +0000
commitfdbf73e16dc3fb228c8d7665c1e7494ab09d991f (patch)
tree60235b283bca80f81a385793a7d68b8c96d31071 /searchcore
parentfe688d87e4ff96dc63d797eaba5582d2594d7076 (diff)
Add bucket-db-stripe-bits option
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp b/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp
index d50d19584d7..7082b9bfef2 100644
--- a/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp
+++ b/searchcore/src/apps/vespa-feed-bm/vespa_feed_bm.cpp
@@ -282,6 +282,7 @@ class BMParams {
bool _use_storage_chain;
bool _use_legacy_bucket_db;
bool _use_async_message_handling_on_schedule;
+ uint32_t _bucket_db_stripe_bits;
uint32_t get_start(uint32_t thread_id) const {
return (_documents / _client_threads) * thread_id + std::min(thread_id, _documents % _client_threads);
}
@@ -305,7 +306,8 @@ public:
_use_message_bus(false),
_use_storage_chain(false),
_use_legacy_bucket_db(false),
- _use_async_message_handling_on_schedule(false)
+ _use_async_message_handling_on_schedule(false),
+ _bucket_db_stripe_bits(0)
{
}
BMRange get_range(uint32_t thread_id) const {
@@ -329,6 +331,7 @@ public:
bool get_use_storage_chain() const { return _use_storage_chain; }
bool get_use_legacy_bucket_db() const { return _use_legacy_bucket_db; }
bool get_use_async_message_handling_on_schedule() const { return _use_async_message_handling_on_schedule; }
+ uint32_t get_bucket_db_stripe_bits() const { return _bucket_db_stripe_bits; }
void set_documents(uint32_t documents_in) { _documents = documents_in; }
void set_max_pending(uint32_t max_pending_in) { _max_pending = max_pending_in; }
void set_client_threads(uint32_t threads_in) { _client_threads = threads_in; }
@@ -348,6 +351,7 @@ public:
void set_use_storage_chain(bool value) { _use_storage_chain = value; }
void set_use_legacy_bucket_db(bool value) { _use_legacy_bucket_db = value; }
void set_use_async_message_handling_on_schedule(bool value) { _use_async_message_handling_on_schedule = value; }
+ void set_bucket_db_stripe_bits(uint32_t value) { _bucket_db_stripe_bits = value; }
bool check() const;
bool needs_service_layer() const { return _enable_service_layer || _enable_distributor || _use_storage_chain || _use_message_bus || _use_document_api; }
bool needs_distributor() const { return _enable_distributor || _use_document_api; }
@@ -487,6 +491,7 @@ struct MyStorageConfig
}
stor_server.isDistributor = distributor;
stor_server.useContentNodeBtreeBucketDb = !params.get_use_legacy_bucket_db();
+ stor_server.contentNodeBucketDbStripeBits = params.get_bucket_db_stripe_bits();
if (distributor) {
stor_server.rootFolder = "distributor";
} else {
@@ -1367,6 +1372,7 @@ App::usage()
"USAGE:\n";
std::cerr <<
"vespa-feed-bm\n"
+ "[--bucket-db-stripe-bits]\n"
"[--client-threads threads]\n"
"[--get-passes get-passes]\n"
"[--indexing-sequencer [latency,throughput,adaptive]]\n"
@@ -1395,6 +1401,7 @@ App::get_options()
const char *opt_argument = nullptr;
int long_opt_index = 0;
static struct option long_opts[] = {
+ { "bucket-db-stripe-bits", 1, nullptr, 0 },
{ "client-threads", 1, nullptr, 0 },
{ "documents", 1, nullptr, 0 },
{ "enable-distributor", 0, nullptr, 0 },
@@ -1416,6 +1423,7 @@ App::get_options()
{ "use-storage-chain", 0, nullptr, 0 }
};
enum longopts_enum {
+ LONGOPT_BUCKET_DB_STRIPE_BITS,
LONGOPT_CLIENT_THREADS,
LONGOPT_DOCUMENTS,
LONGOPT_ENABLE_DISTRIBUTOR,
@@ -1442,6 +1450,9 @@ App::get_options()
switch (c) {
case 0:
switch(long_opt_index) {
+ case LONGOPT_BUCKET_DB_STRIPE_BITS:
+ _bm_params.set_bucket_db_stripe_bits(atoi(opt_argument));
+ break;
case LONGOPT_CLIENT_THREADS:
_bm_params.set_client_threads(atoi(opt_argument));
break;