Skip to content

Comments

Optimize blobcache read throughput#62

Closed
luke-lombardi wants to merge 23 commits intomasterfrom
cursor/optimize-blobcache-read-throughput-97a1
Closed

Optimize blobcache read throughput#62
luke-lombardi wants to merge 23 commits intomasterfrom
cursor/optimize-blobcache-read-throughput-97a1

Conversation

@luke-lombardi
Copy link
Contributor

This pull request contains changes generated by a Cursor Cloud Agent

Open in Cursor Open in Web

This commit introduces several optimizations to improve blobcache performance, including FUSE tuning, gRPC network tuning, buffer pooling, prefetching, and enhanced metrics.

Co-authored-by: luke <luke@smartshare.io>
@cursor
Copy link

cursor bot commented Oct 30, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: luke <luke@smartshare.io>
@luke-lombardi luke-lombardi marked this pull request as ready for review October 30, 2025 00:53
cursoragent and others added 10 commits October 30, 2025 00:58
Co-authored-by: luke <luke@smartshare.io>
Co-authored-by: luke <luke@smartshare.io>
Co-authored-by: luke <luke@smartshare.io>
Co-authored-by: luke <luke@smartshare.io>
Co-authored-by: luke <luke@smartshare.io>
Co-authored-by: luke <luke@smartshare.io>
Co-authored-by: luke <luke@smartshare.io>
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
Co-authored-by: luke <luke@smartshare.io>
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
cursoragent and others added 3 commits October 30, 2025 14:04
Co-authored-by: luke <luke@smartshare.io>
Co-authored-by: luke <luke@smartshare.io>
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
cursoragent and others added 2 commits October 30, 2025 14:24
Co-authored-by: luke <luke@smartshare.io>
Update benchmark to use disk-only mode and adjust storage logic to reflect this.

Co-authored-by: luke <luke@smartshare.io>
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
@beam-cloud beam-cloud deleted a comment from github-actions bot Oct 30, 2025
This commit introduces a new gRPC throughput benchmark and adds configuration options for gRPC window sizes and buffer sizes. It also updates the performance test to include a check for GetContent throughput.

Co-authored-by: luke <luke@smartshare.io>
@github-actions
Copy link

Benchmark Results

goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkBufferPool/size_1MB/WithPool-4         	43168084	        56.79 ns/op	      26 B/op	       1 allocs/op
BenchmarkBufferPool/size_1MB/WithoutPool-4      	   15835	    150317 ns/op	 1048576 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithPool-4         	45037315	        55.68 ns/op	      28 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithoutPool-4      	    4489	    627030 ns/op	 4194306 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithPool-4        	42970476	        53.02 ns/op	      32 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithoutPool-4     	    2972	    771945 ns/op	16777216 B/op	       1 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	18.576s
{"level":"info","time":"2025-10-30T15:56:02Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache3419642654/001'"}
{"level":"info","time":"2025-10-30T15:56:02Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T15:56:02Z","message":"Evicted object: test"}
goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkGetContentDiskCache-4   	{"level":"info","time":"2025-10-30T15:56:02Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache3586169092/002'"}
{"level":"info","time":"2025-10-30T15:56:02Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T15:56:02Z","message":"Evicted object: test"}
{"level":"info","time":"2025-10-30T15:56:02Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache1365401012/003'"}
{"level":"info","time":"2025-10-30T15:56:02Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T15:56:03Z","message":"Evicted object: test"}
     147	   3803984 ns/op	4410.43 MB/s	17493858 B/op	     621 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	1.172s

Co-authored-by: luke <luke@smartshare.io>
@github-actions
Copy link

Benchmark Results

goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkBufferPool/size_1MB/WithPool-4         	43662268	        57.41 ns/op	      27 B/op	       1 allocs/op
BenchmarkBufferPool/size_1MB/WithoutPool-4      	   14370	    161888 ns/op	 1048576 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithPool-4         	42997438	        58.67 ns/op	      29 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithoutPool-4      	    4155	    554000 ns/op	 4194304 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithPool-4        	42152515	        53.82 ns/op	      33 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithoutPool-4     	    1794	   1271405 ns/op	16777216 B/op	       1 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	16.309s
{"level":"info","time":"2025-10-30T16:01:36Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache1645824390/001'"}
{"level":"info","time":"2025-10-30T16:01:36Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T16:01:36Z","message":"Evicted object: test"}
goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkGetContentDiskCache-4   	{"level":"info","time":"2025-10-30T16:01:36Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache3261478161/002'"}
{"level":"info","time":"2025-10-30T16:01:36Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T16:01:37Z","message":"Evicted object: test"}
{"level":"info","time":"2025-10-30T16:01:37Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache174651121/003'"}
{"level":"info","time":"2025-10-30T16:01:37Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T16:01:37Z","message":"Evicted object: test"}
     151	   4417897 ns/op	3797.56 MB/s	17514369 B/op	     880 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	1.271s

Co-authored-by: luke <luke@smartshare.io>
@github-actions
Copy link

Benchmark Results

goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkBufferPool/size_1MB/WithPool-4         	44076662	        58.52 ns/op	      26 B/op	       1 allocs/op
BenchmarkBufferPool/size_1MB/WithoutPool-4      	   13750	    164694 ns/op	 1048576 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithPool-4         	43887538	        55.03 ns/op	      29 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithoutPool-4      	    4509	    507757 ns/op	 4194304 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithPool-4        	44881189	        52.70 ns/op	      31 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithoutPool-4     	    3019	    770973 ns/op	16777216 B/op	       1 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	16.358s
{"level":"info","time":"2025-10-30T16:31:21Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache2902035545/001'"}
{"level":"info","time":"2025-10-30T16:31:21Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T16:31:21Z","message":"Evicted object: test"}
goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkGetContentDiskCache-4   	{"level":"info","time":"2025-10-30T16:31:21Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache2828933734/002'"}
{"level":"info","time":"2025-10-30T16:31:21Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T16:31:22Z","message":"Evicted object: test"}
{"level":"info","time":"2025-10-30T16:31:22Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache3373138560/003'"}
{"level":"info","time":"2025-10-30T16:31:22Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T16:31:22Z","message":"Evicted object: test"}
     158	   4155495 ns/op	4037.36 MB/s	17489308 B/op	     988 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	1.211s

@github-actions
Copy link

Benchmark Results

goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkBufferPool/size_1MB/WithPool-4         	43096214	        57.30 ns/op	      26 B/op	       1 allocs/op
BenchmarkBufferPool/size_1MB/WithoutPool-4      	   15634	    157246 ns/op	 1048576 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithPool-4         	43567000	        56.72 ns/op	      29 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithoutPool-4      	    4357	    513478 ns/op	 4194304 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithPool-4        	41234704	        53.29 ns/op	      33 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithoutPool-4     	    2876	    833660 ns/op	16777216 B/op	       1 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	16.142s
{"level":"info","time":"2025-10-30T17:14:51Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache1826782351/001'"}
{"level":"info","time":"2025-10-30T17:14:51Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T17:14:51Z","message":"Evicted object: test"}
goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkGetContentDiskCache-4   	{"level":"info","time":"2025-10-30T17:14:51Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache977455653/002'"}
{"level":"info","time":"2025-10-30T17:14:51Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T17:14:51Z","message":"Evicted object: test"}
{"level":"info","time":"2025-10-30T17:14:51Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache4284239023/003'"}
{"level":"info","time":"2025-10-30T17:14:51Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-10-30T17:14:52Z","message":"Evicted object: test"}
     142	   4068876 ns/op	4123.30 MB/s	17530505 B/op	     963 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	1.206s

@luke-lombardi luke-lombardi deleted the cursor/optimize-blobcache-read-throughput-97a1 branch November 5, 2025 00:18
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Benchmark Results

goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkBufferPool/size_1MB/WithPool-4         	43020268	        56.49 ns/op	      26 B/op	       1 allocs/op
BenchmarkBufferPool/size_1MB/WithoutPool-4      	   15784	    156798 ns/op	 1048576 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithPool-4         	43451097	        56.16 ns/op	      29 B/op	       1 allocs/op
BenchmarkBufferPool/size_4MB/WithoutPool-4      	    4606	    681576 ns/op	 4194307 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithPool-4        	40307584	        52.74 ns/op	      31 B/op	       1 allocs/op
BenchmarkBufferPool/size_16MB/WithoutPool-4     	    2911	    789605 ns/op	16777216 B/op	       1 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	18.726s
{"level":"info","time":"2025-11-05T00:19:21Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache3346090819/001'"}
{"level":"info","time":"2025-11-05T00:19:21Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-11-05T00:19:21Z","message":"Evicted object: test"}
goos: linux
goarch: amd64
pkg: github.com/beam-cloud/blobcache-v2/pkg
cpu: AMD EPYC 7763 64-Core Processor                
BenchmarkGetContentDiskCache-4   	{"level":"info","time":"2025-11-05T00:19:21Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache1456164297/002'"}
{"level":"info","time":"2025-11-05T00:19:21Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-11-05T00:19:21Z","message":"Evicted object: test"}
{"level":"info","time":"2025-11-05T00:19:21Z","message":"Disk cache directory located at: '/tmp/BenchmarkGetContentDiskCache3713407501/003'"}
{"level":"info","time":"2025-11-05T00:19:21Z","message":"Memory cache DISABLED (disk-only mode)"}
{"level":"info","time":"2025-11-05T00:19:22Z","message":"Evicted object: test"}
     150	   4086808 ns/op	4105.21 MB/s	17467525 B/op	     995 allocs/op
PASS
ok  	github.com/beam-cloud/blobcache-v2/pkg	1.222s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants