Skip to content

The bandwidth of the read file benchmark doesn't scale up when -test.cpu becomes large #571

@xin3liang

Description

@xin3liang

The bandwidth of the read file benchmark doesn't scale up when -test.cpu becomes large.
See below test results, for test BenchmarkGoFuseMemoryRead, the bandwidth doesn't scale up when -test.cpu is 32+.
And for test BenchmarkGoFuseFDRead, the bandwidth doesn't scale up when -test.cpu is ~2+.

[root@client5 go-fuse]# go test ./benchmark -test.bench 'Read$' -test.cpu 1,2,4,8,16,32,64,$(nproc)
goos: linux
goarch: amd64
pkg: github.com/hanwen/go-fuse/v2/benchmark
cpu: Intel(R) Xeon(R) Platinum 8180 CPU @ 2.50GHz
BenchmarkGoFuseMemoryRead                   3536            348005 ns/op        6026.22 MB/s        3573 B/op        103 allocs/op
BenchmarkGoFuseMemoryRead-2                 5542            230751 ns/op        9088.37 MB/s        4011 B/op        111 allocs/op
BenchmarkGoFuseMemoryRead-4                 7869            177888 ns/op        11789.16 MB/s       2897 B/op        102 allocs/op
BenchmarkGoFuseMemoryRead-8                 7573            146180 ns/op        14346.37 MB/s       3010 B/op         97 allocs/op
BenchmarkGoFuseMemoryRead-16               13089             88321 ns/op        23744.54 MB/s       2914 B/op         96 allocs/op
BenchmarkGoFuseMemoryRead-32               15603             74119 ns/op        28294.26 MB/s       3472 B/op         96 allocs/op
BenchmarkGoFuseMemoryRead-64               16168             74109 ns/op        28298.19 MB/s       3669 B/op         96 allocs/op
BenchmarkGoFuseMemoryRead-112              15554             89165 ns/op        23519.89 MB/s       4365 B/op         96 allocs/op
BenchmarkGoFuseFDRead                      18832             61235 ns/op        1070.23 MB/s         122 B/op          3 allocs/op
BenchmarkGoFuseFDRead-2                    34098             43279 ns/op        1514.26 MB/s          95 B/op          2 allocs/op
BenchmarkGoFuseFDRead-4                    29010             36657 ns/op        1787.82 MB/s          92 B/op          2 allocs/op
BenchmarkGoFuseFDRead-8                    28642             42491 ns/op        1542.35 MB/s         107 B/op          2 allocs/op
BenchmarkGoFuseFDRead-16                   28728             39150 ns/op        1673.96 MB/s         116 B/op          2 allocs/op
BenchmarkGoFuseFDRead-32                   32385             40201 ns/op        1630.20 MB/s         112 B/op          2 allocs/op
BenchmarkGoFuseFDRead-64                   35319             38679 ns/op        1694.36 MB/s         108 B/op          2 allocs/op
BenchmarkGoFuseFDRead-112                  28196             41337 ns/op        1585.41 MB/s         113 B/op          2 allocs/op
PASS
ok      github.com/hanwen/go-fuse/v2/benchmark  44.812s

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions