yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.99k stars 1.07k forks source link

[DocDB] Speedup remote bootstrap by moving checksum to background #12352

Open bmatican opened 2 years ago

bmatican commented 2 years ago

Jira Link: DB-1859

Description

src/yb/tserver/remote_bootstrap_service.cc
...
void RemoteBootstrapServiceImpl::FetchData
...
  session->rate_limiter().UpdateDataSizeAndMaybeSleep(info.data.size());
  uint32_t crc32 = Crc32c(info.data.data(), info.data.length());

We should add some timing info, even if just for debugging, to understand the time spent on fetching data vs writing it to disk vs computing the checksum. It's possible that for low network latency scenarios, the checksuming being in the critical path is slowing down the RBS process.

For high latency scenarios, the RTT might be wasting more cycles, so there we might need some form of streaming / pipelining.

bmatican commented 1 year ago

@rthallamko3 @basavaraj29 note, I think @karan-yb added some timing info, perhaps after this issue was filed. We should review those, from an actual cluster, to see if it’s worth even doing this work, ie does it actually add a considerable overhead or not

rthallamko3 commented 1 year ago

Yep, We just changed assignment to @basavaraj29 to add it to his backlog.