Commit Graph

16 Commits

Author SHA1 Message Date
Brooks Prumo d1ba42180d
clippy for rust 1.65.0 (#28765) 2022-11-09 19:39:38 +00:00
Yueh-Hsuan Chiang ba3d9cd325
Add LedgerColumn::multi_get() (#26354)
#### Problem
Blockstore operations such as get_slots_since() issues multiple rocksdb::get()
at once which is not optimal for performance.

#### Summary of Changes
This PR adds LedgerColumn::multi_get() based on rocksdb::batched_multi_get(),
the optimized version of multi_get() where get requests are processed in batch
to minimize read I/O.
2022-09-12 15:01:22 -07:00
Yueh-Hsuan Chiang f284bba53b
Create const &strs for rocksdb perf write operation names (#26352)
#### Summary of Changes
Define PERF_METRIC_OP_NAME_PUT and PERF_METRIC_OP_NAME_WRITE_BATCH
to replace repetitive / hard-coded operation names for report_rocksdb_write_perf.
2022-07-13 00:05:26 +08:00
Yueh-Hsuan Chiang 9985215bc8
Make report_rocksdb_read_perf() to take a operation name. (#26351)
#### Problem
report_rocksdb_read_perf() always uses the hard-coded operation name "get"

#### Summary of Changes
As we will add a new read operation -- multi_get(), report_rocksdb_read_perf()
needs to have an input parameter for operation name.
2022-07-12 07:18:49 +08:00
steviez 17995c7e67
Cleanup BlockstoreInsertionMetrics (#25618)
* Move BlockstoreInsertionMetrics to blockstore_metrics.rs

* Specify unit (us) in metric fields
2022-06-01 10:54:11 -05:00
Yueh-Hsuan Chiang bcff88bf42
Use the new datapoint macro for RocksDB column family metrics (#25505)
#### Summary of Changes
Use the new datapoint macro that supports group-by for RocksDB column family metrics.
By using the new macro, we can further remove large chunks of boilerplate code that try to work around the previous datapoint macro that does not support group-by.
2022-05-31 09:26:57 -07:00
Yueh-Hsuan Chiang 24634b6e25
Use the new datapoint macro that supports group-by for RocksDB read/write metrics. (#25392)
#### Summary of Changes
Use the new datapoint macro that supports group-by for RocksDB read/write perf metrics.
2022-05-26 22:17:29 -07:00
Yueh-Hsuan Chiang 5b67960c76
(Refactor) Move blocktore options related stuff to blockstore_options.rs (#25509)
#### Problem
blockstore_db.rs has a mutual dependency between blockstore_metrics.rs.

#### Summary of Changes
This PR removes the mutual dependency by moving the option-related stuff
out from blockstore_db.rs to its new home --- blockstore_options.rs.

By doing this, we address the mutual dependency and also make the code cleaner.
2022-05-26 16:59:26 -07:00
Yueh-Hsuan Chiang d3dc2db9fb
(LedgerStore) Rate-limit RocksDB perf sample by a minimum time interval (#25100)
#### Problem
The current RocksDB read/write perf metrics do not include the total operation nanos
and thus we have to include all fields that might contribute to the total operation nanos.

#### Summary of Changes
This PR includes the total operation nanos in RocksDB's read/write perf and reduces the
number of reported fields in its perf metric.
2022-05-21 16:42:33 -07:00
Jeff Biseda 8caf0aabd1
framework to preserve optimistic_slot in blockstore (#25362) 2022-05-20 16:46:23 -07:00
Yueh-Hsuan Chiang de2033f2f2
(LedgerStore) Rate-limit RocksDB perf sample by a minimum time interval (#25093)
#### Problem
When the number of RocksDB read/write operations spikes, its payload size
might exceed the limit (413 Payload Too Large).

#### Summary of Changes
This PR rate-limit the perf-sampling of RocksDB read/write operations by one second
in addition to the existing sampling that is configurable via the hidden validator
argument --rocksdb-perf-sample-interval.
2022-05-20 10:54:27 -07:00
Yueh-Hsuan Chiang 5625959f7e
(LedgerStore) Change perf_samples_counter from Arc<AtomicUsize> to AtomicUsize (#25043)
#### Problem
After #25042, each LedgerColumn has its own BlockstoreRocksDbWritePerfMetrics
and BlockstoreRocksDbReadPerfMetrics instances.  As it has total ownership,
its member field does not need to use Arc.

#### Summary of Changes
Change perf_samples_counter from Arc<AtomicUsize> to AtomicUsize
under BlockstoreRocksDbWritePerfMetrics and BlockstoreRocksDbReadPerfMetrics.
2022-05-16 11:31:07 -07:00
Yueh-Hsuan Chiang b2dcda8980
(LedgerStore) Move metric sample counters out from LedgerColumnOptions (#25042)
#### Problem
LedgerColumnOptions contain two fields, perf_read_counter and perf_write_counter,
that are not really options but internal counters.

#### Summary of Changes
This PR introduces BlockstoreRocksDbPerfSamplingStatus, a struct that holds internal
status for RocksDB perf sampling and moves perf_read_counter and perf_write_counter
out from LedgerColumnOptions.
2022-05-10 16:13:19 -07:00
Yueh-Hsuan Chiang 63bd0cdd5d
(LedgerStore) Move BlockstoreRocksDbColumnFamilyMetrics to blockstore_metric.rs (#24856)
#### Problem
blockstore_db.rs becomes bigger.

#### Summary of Changes
Move BlockstoreRocksDbColumnFamilyMetrics to blockstore_metric.rs out from blockstore_db.rs.
2022-05-03 14:46:59 -07:00
Yueh-Hsuan Chiang 0b9d04808f
(LedgerStore) Move trait ColumnMetrics and metric-macros to blockstore_metric.rs (#24855)
#### Problem
blockstore_db.rs becomes bigger.

#### Summary of Changes
Move trait ColumnMetrics and metric-macros to blockstore_metric.rs out from blockstore_db.rs.
2022-05-02 22:58:31 -07:00
Yueh-Hsuan Chiang eca0eb9585
(LedgerStore) Move metric-related functions to blockstore_metric.rs (#24854)
#### Problem
blockstore_db.rs becomes bigger.

#### Summary of Changes
This PR creates blockstore_metric.rs and moves metric-related functions out from blockstore_db.rs.
2022-05-02 20:53:25 -07:00