From f00f50493715d484bacf1287bc4f7992ee22705c Mon Sep 17 00:00:00 2001 From: Chris Schinnerl Date: Thu, 22 Feb 2024 13:38:45 +0100 Subject: [PATCH] worker: update benchmark results --- worker/bench_test.go | 8 ++++---- worker/upload.go | 6 ++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/worker/bench_test.go b/worker/bench_test.go index f864df9cae..4748f3d85c 100644 --- a/worker/bench_test.go +++ b/worker/bench_test.go @@ -21,7 +21,7 @@ func (z *zeroReader) Read(p []byte) (n int, err error) { // BenchmarkUploaderSingleObject benchmarks uploading a single object. // // Speed | CPU | Commit -// 232.97 MB/s | M2 Pro | 26d3119 +// 433.86 MB/s | M2 Pro | bae6e77 func BenchmarkUploaderSingleObject(b *testing.B) { w := newMockWorker() @@ -46,7 +46,7 @@ func BenchmarkUploaderSingleObject(b *testing.B) { // BenchmarkUploaderSingleObject benchmarks uploading one object per slab. // // Speed | CPU | Commit -// 185.10 MB/s | M2 Pro | 26d3119 +// 282.47 MB/s | M2 Pro | bae6e77 func BenchmarkUploaderMultiObject(b *testing.B) { w := newMockWorker() @@ -75,7 +75,7 @@ func BenchmarkUploaderMultiObject(b *testing.B) { // slabs. // // Speed | CPU | Commit -// 1668.87 MB/s | M2 Pro | 26d3119 +// 1658.49 MB/s | M2 Pro | bae6e77 func BenchmarkSectorRoot30Goroutines(b *testing.B) { data := make([]byte, rhpv2.SectorSize) b.SetBytes(int64(rhpv2.SectorSize)) @@ -108,7 +108,7 @@ func BenchmarkSectorRoot30Goroutines(b *testing.B) { // BenchmarkSectorRootSingleGoroutine benchmarks the SectorRoot function. // // Speed | CPU | Commit -// 176.91 MB/s | M2 Pro | 26d3119 +// 177.33 MB/s | M2 Pro | bae6e77 func BenchmarkSectorRootSingleGoroutine(b *testing.B) { data := make([]byte, rhpv2.SectorSize) b.SetBytes(rhpv2.SectorSize) diff --git a/worker/upload.go b/worker/upload.go index 63be07b2b1..8bd87f881f 100644 --- a/worker/upload.go +++ b/worker/upload.go @@ -770,6 +770,12 @@ func (u *upload) newSlabUpload(ctx context.Context, shards [][]byte, uploaders [ sCtx, sCancel := context.WithCancel(ctx) // create the sector + // NOTE: we are computing the sector root here and pass it all the + // way down to the RPC to avoid having to recompute it for the proof + // verification. This is necessary because we need it ahead of time + // for the call to AddUploadingSector in uploader.go + // Once we upload to temp storage we don't need AddUploadingSector + // anymore and can move it back to the RPC. sectors[idx] = §orUpload{ data: (*[rhpv2.SectorSize]byte)(shards[idx]), index: idx,