SyncReadIntoAsyncRead uses 64 bytes of buffer size

#279
Opened by flokli at 2023-06-09T17·34+00

Calling Read on the BlobService in evans (as documented in //tvix/store/README.md) revealed that the gRPC blob service is currently sending BlobChunk of 64 bytes in size, which is way too small and causes too much overhead.

We should be using 100K or even 1M BlobChunks.

I tried wrapping the buffer in a BufRead::with_capacity before passing it to SyncReadIntoAsyncRead, but it looks like the implementation doesn't honor buffer sizes at all.

Inside SyncReadIntoAsyncRead, we logged the buf.remaining() value, and it's not exceeding 64 bytes.

It's probably due to our let mut buf = buf_cell.take().unwrap_or_default();.

We should see if we can somehow propagate the buffer size of the sync read buffer to there, or use some const N: usize generic arg.

  1. This code is gone, we don't have these sync barriers in between anymore.

    flokli at 2023-09-21T21·48+00

  2. flokli closed this issue at 2023-09-21T21·48+00