fstree: serve HEAD from the storage#3383
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3383 +/- ##
==========================================
- Coverage 21.16% 21.04% -0.13%
==========================================
Files 708 707 -1
Lines 53045 52939 -106
==========================================
- Hits 11229 11141 -88
+ Misses 41015 40980 -35
- Partials 801 818 +17 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bccb054 to
c551e92
Compare
| ) | ||
|
|
||
| for { | ||
| n, err := io.ReadFull(f, comBuf[:]) |
There was a problem hiding this comment.
Reading 16K of data is not much different from reading several bytes of data, you can leverage this to avoid some seeks (like when the file is not using combined format).
There was a problem hiding this comment.
I still think reading 16K in the first chunk is good.
There was a problem hiding this comment.
If it was a combined object and it wasn't the first one, then it would be necessary to search for it, so for this I found only a way through io.MultiReader(buf, f), and then do not Seek, but io.CopyN(io.Discard...), which is in theory much worse.
There was a problem hiding this comment.
Depends on the size. The next OID can be in the same 16K, it's pretty easy to check, then if it's not there you're seeking for real.
| if fieldEnd > len(data) { | ||
| return nil, fmt.Errorf("field exceeds data boundary") | ||
| } | ||
| out = append(out, data[offset-tagLen-lenLen:fieldEnd]...) |
There was a problem hiding this comment.
You can reuse data, or just have a single slices.Copy() after you have found where the header ends.
c551e92 to
b525589
Compare
Since it works worse on small sizes, mb I can do the usual |
| if err != nil { | ||
| if errors.Is(err, io.EOF) || errors.Is(err, io.ErrUnexpectedEOF) { | ||
| if !isCombined { | ||
| return comBuf[:n], nil |
There was a problem hiding this comment.
can this even be a valid header?
There was a problem hiding this comment.
neofs-node/pkg/local_object_storage/blobstor/fstree/fstree.go
Lines 448 to 462 in 8c19be4
I took it from here.
There was a problem hiding this comment.
Big objects don't use combined format.
We always know the size (either from the file size or from the combined header), so we can (and should, if there is a performance difference) adjust the logic wrt it. |
b525589 to
fd09d6d
Compare
The values are lower than before because I used https://pkg.go.dev/github.com/nspcc-dev/neofs-sdk-go/object/test#Object |
| ) | ||
|
|
||
| for { | ||
| n, err := io.ReadFull(f, comBuf[:]) |
There was a problem hiding this comment.
I still think reading 16K in the first chunk is good.
fd09d6d to
638c2e9
Compare
638c2e9 to
c8d0121
Compare
|
@End-rey i see ur trying to pool buffers which is generally reasonable, but for the future lets make such improvements into changes separate from the functional part (even separate issues/PRs). Amending them complicates the review |
c8d0121 to
2bdf007
Compare
The new structure of the objects gives an increase in speed, but on small objects almost everything is the same. There is a large increase mainly on compressed objects due to the use of fast DecodeAll, instead of sequential reading. |
| if offset < len(buf) { | ||
| n = copy(comBuf[:], buf[offset:]) | ||
| } | ||
| _, err := io.ReadFull(f, comBuf[n:]) |
There was a problem hiding this comment.
Seems to be suboptimal for combined files with small objects, but it's correct anyway.
2bdf007 to
efe51b1
Compare
| } | ||
|
|
||
| offset += int(l) | ||
| if n-offset < objectSDK.MaxHeaderLen { |
There was a problem hiding this comment.
Rather check that buffer has at least combinedDataOff bytes from offset. If it is --- check the next OID and act accordingly. It's quite likely the next OID is not going to be the one we need and we do not want to read more in this case. Read the next four pages only if offset points to something out of the buffer scope.
There was a problem hiding this comment.
if we check this way, there may be a situation where the data will not be enough for the header, but the ID has been found. Will I have to read it again then? Or should I leave it like it is now?
There was a problem hiding this comment.
You'll read it in header getter, pass whatever you have there, if it's not sufficient it'll read a bit more. It'd be more efficient for 1-4K objects, you can have like 10 of them in the first 16K and if you quickly jump through them --- good for you. Maybe the one we need is in this 16K, maybe not, doesn't matter, the less reads/seeks we do the better. And in case of 32K objects nothing really changes, seek/read, OK, no way around it.
efe51b1 to
7c69c80
Compare
7c69c80 to
5d1b7cd
Compare
roman-khimov
left a comment
There was a problem hiding this comment.
Some reads can still be optimized, but OK for now.
5d1b7cd to
e1cfe2a
Compare
Now the `HEAD` operation can be performed directly in the storage, where the object is retrieved from the file without payload. Add tests and bench to see the difference between `Head` and `Get`. Use the new `Head` function in the write cache and in the shard. Closes #2085. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Since #3383 and #3431, it is now not necessary to unmarshal the object to get its payload, and we can read the payload from reader to find the data. ``` goos: linux goarch: amd64 pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 7457.9µ ± 8% 262.2µ ± 8% -96.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 7440.2µ ± 5% 261.5µ ± 10% -96.49% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 9840.3µ ± 6% 355.8µ ± 4% -96.38% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 8.242m ± 8% 3.977m ± 1% -51.75% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 7.814m ± 4% 3.979m ± 2% -49.07% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 9.821m ± 4% 3.765m ± 3% -61.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 10.432m ± 6% 3.987m ± 2% -61.78% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 10.721m ± 9% 3.982m ± 2% -62.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 9.766m ± 5% 3.680m ± 6% -62.32% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 77.48µ ± 2% 90.66µ ± 2% +17.00% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 77.42µ ± 5% 91.58µ ± 3% +18.29% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 79.90µ ± 3% 90.45µ ± 1% +13.21% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 80.28µ ± 2% 89.15µ ± 2% +11.05% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 79.36µ ± 3% 89.60µ ± 3% +12.91% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 77.83µ ± 6% 91.00µ ± 1% +16.93% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 79.47µ ± 2% 86.42µ ± 2% +8.75% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 79.30µ ± 4% 88.33µ ± 2% +11.40% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 79.86µ ± 2% 90.45µ ± 1% +13.27% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 10.294m ± 6% 1.856m ± 3% -81.97% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 10.059m ± 6% 1.848m ± 4% -81.63% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 9.650m ± 6% 1.723m ± 6% -82.15% (p=0.000 n=10) geomean 1.199m 478.5µ -60.09% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 20495.52Ki ± 0% 43.91Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 20495.52Ki ± 0% 43.90Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 20495.96Ki ± 0% 43.81Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 17.62Ki ± 0% 48.31Ki ± 0% +174.24% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 17.62Ki ± 0% 48.31Ki ± 0% +174.24% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 17.90Ki ± 0% 48.08Ki ± 0% +168.60% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 17.77Ki ± 0% 47.95Ki ± 0% +169.80% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 17.77Ki ± 0% 47.95Ki ± 0% +169.80% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 17.91Ki ± 0% 48.13Ki ± 0% +168.81% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 17.92Ki ± 0% 44.77Ki ± 0% +149.83% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 17.92Ki ± 0% 44.77Ki ± 0% +149.83% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 17.95Ki ± 1% 45.13Ki ± 0% +151.45% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 20495.92Ki ± 0% 43.66Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 20495.92Ki ± 0% 43.66Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 20495.94Ki ± 0% 43.75Ki ± 0% -99.79% (p=0.000 n=10) geomean 999.8Ki 214.7Ki -78.52% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 127.0 ± 0% 145.0 ± 0% +14.17% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 127.0 ± 0% 145.0 ± 0% +14.17% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 139.0 ± 2% 141.0 ± 1% +1.44% (p=0.010 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 149.0 ± 0% 148.0 ± 0% -0.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 149.0 ± 0% 148.0 ± 0% -0.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 138.5 ± 3% 140.0 ± 2% +1.08% (p=0.027 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 137.0 ± 2% 141.0 ± 1% +2.92% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 131.0 ± 0% 145.0 ± 0% +10.69% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 131.0 ± 0% 145.0 ± 0% +10.69% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 137.0 ± 1% 139.0 ± 1% +1.46% (p=0.007 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 137.5 ± 0% 140.5 ± 1% +2.18% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 139.0 ± 2% 140.5 ± 2% ~ (p=0.058 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 139.0 ± 0% 138.0 ± 0% -0.72% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 139.0 ± 0% 138.0 ± 0% -0.72% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 138.0 ± 2% 140.5 ± 2% +1.81% (p=0.002 n=10) geomean 136.8 139.9 +2.26% ``` Closes #1724. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Since #3383 and #3431, it is now not necessary to unmarshal the object to get its payload, and we can read the payload from reader to find the data. ``` goos: linux goarch: amd64 pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 7457.9µ ± 8% 262.2µ ± 8% -96.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 7440.2µ ± 5% 261.5µ ± 10% -96.49% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 9840.3µ ± 6% 355.8µ ± 4% -96.38% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 8.242m ± 8% 3.977m ± 1% -51.75% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 7.814m ± 4% 3.979m ± 2% -49.07% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 9.821m ± 4% 3.765m ± 3% -61.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 10.432m ± 6% 3.987m ± 2% -61.78% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 10.721m ± 9% 3.982m ± 2% -62.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 9.766m ± 5% 3.680m ± 6% -62.32% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 77.48µ ± 2% 90.66µ ± 2% +17.00% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 77.42µ ± 5% 91.58µ ± 3% +18.29% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 79.90µ ± 3% 90.45µ ± 1% +13.21% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 80.28µ ± 2% 89.15µ ± 2% +11.05% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 79.36µ ± 3% 89.60µ ± 3% +12.91% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 77.83µ ± 6% 91.00µ ± 1% +16.93% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 79.47µ ± 2% 86.42µ ± 2% +8.75% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 79.30µ ± 4% 88.33µ ± 2% +11.40% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 79.86µ ± 2% 90.45µ ± 1% +13.27% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 10.294m ± 6% 1.856m ± 3% -81.97% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 10.059m ± 6% 1.848m ± 4% -81.63% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 9.650m ± 6% 1.723m ± 6% -82.15% (p=0.000 n=10) geomean 1.199m 478.5µ -60.09% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 20495.52Ki ± 0% 43.91Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 20495.52Ki ± 0% 43.90Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 20495.96Ki ± 0% 43.81Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 17.62Ki ± 0% 48.31Ki ± 0% +174.24% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 17.62Ki ± 0% 48.31Ki ± 0% +174.24% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 17.90Ki ± 0% 48.08Ki ± 0% +168.60% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 17.77Ki ± 0% 47.95Ki ± 0% +169.80% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 17.77Ki ± 0% 47.95Ki ± 0% +169.80% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 17.91Ki ± 0% 48.13Ki ± 0% +168.81% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 17.92Ki ± 0% 44.77Ki ± 0% +149.83% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 17.92Ki ± 0% 44.77Ki ± 0% +149.83% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 17.95Ki ± 1% 45.13Ki ± 0% +151.45% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 20495.92Ki ± 0% 43.66Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 20495.92Ki ± 0% 43.66Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 20495.94Ki ± 0% 43.75Ki ± 0% -99.79% (p=0.000 n=10) geomean 999.8Ki 214.7Ki -78.52% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 127.0 ± 0% 145.0 ± 0% +14.17% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 127.0 ± 0% 145.0 ± 0% +14.17% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 139.0 ± 2% 141.0 ± 1% +1.44% (p=0.010 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 149.0 ± 0% 148.0 ± 0% -0.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 149.0 ± 0% 148.0 ± 0% -0.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 138.5 ± 3% 140.0 ± 2% +1.08% (p=0.027 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 137.0 ± 2% 141.0 ± 1% +2.92% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 131.0 ± 0% 145.0 ± 0% +10.69% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 131.0 ± 0% 145.0 ± 0% +10.69% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 137.0 ± 1% 139.0 ± 1% +1.46% (p=0.007 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 137.5 ± 0% 140.5 ± 1% +2.18% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 139.0 ± 2% 140.5 ± 2% ~ (p=0.058 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 139.0 ± 0% 138.0 ± 0% -0.72% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 139.0 ± 0% 138.0 ± 0% -0.72% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 138.0 ± 2% 140.5 ± 2% +1.81% (p=0.002 n=10) geomean 136.8 139.9 +2.26% ``` Closes #1724. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Since #3383 and #3431, it is now not necessary to unmarshal the object to get its payload, and we can read the payload from reader to find the data. ``` goos: linux goarch: amd64 pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 7457.9µ ± 8% 262.2µ ± 8% -96.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 7440.2µ ± 5% 261.5µ ± 10% -96.49% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 9840.3µ ± 6% 355.8µ ± 4% -96.38% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 8.242m ± 8% 3.977m ± 1% -51.75% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 7.814m ± 4% 3.979m ± 2% -49.07% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 9.821m ± 4% 3.765m ± 3% -61.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 10.432m ± 6% 3.987m ± 2% -61.78% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 10.721m ± 9% 3.982m ± 2% -62.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 9.766m ± 5% 3.680m ± 6% -62.32% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 77.48µ ± 2% 90.66µ ± 2% +17.00% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 77.42µ ± 5% 91.58µ ± 3% +18.29% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 79.90µ ± 3% 90.45µ ± 1% +13.21% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 80.28µ ± 2% 89.15µ ± 2% +11.05% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 79.36µ ± 3% 89.60µ ± 3% +12.91% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 77.83µ ± 6% 91.00µ ± 1% +16.93% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 79.47µ ± 2% 86.42µ ± 2% +8.75% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 79.30µ ± 4% 88.33µ ± 2% +11.40% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 79.86µ ± 2% 90.45µ ± 1% +13.27% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 10.294m ± 6% 1.856m ± 3% -81.97% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 10.059m ± 6% 1.848m ± 4% -81.63% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 9.650m ± 6% 1.723m ± 6% -82.15% (p=0.000 n=10) geomean 1.199m 478.5µ -60.09% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 20495.52Ki ± 0% 43.91Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 20495.52Ki ± 0% 43.90Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 20495.96Ki ± 0% 43.81Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 17.62Ki ± 0% 48.31Ki ± 0% +174.24% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 17.62Ki ± 0% 48.31Ki ± 0% +174.24% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 17.90Ki ± 0% 48.08Ki ± 0% +168.60% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 17.77Ki ± 0% 47.95Ki ± 0% +169.80% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 17.77Ki ± 0% 47.95Ki ± 0% +169.80% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 17.91Ki ± 0% 48.13Ki ± 0% +168.81% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 17.92Ki ± 0% 44.77Ki ± 0% +149.83% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 17.92Ki ± 0% 44.77Ki ± 0% +149.83% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 17.95Ki ± 1% 45.13Ki ± 0% +151.45% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 20495.92Ki ± 0% 43.66Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 20495.92Ki ± 0% 43.66Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 20495.94Ki ± 0% 43.75Ki ± 0% -99.79% (p=0.000 n=10) geomean 999.8Ki 214.7Ki -78.52% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 127.0 ± 0% 145.0 ± 0% +14.17% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 127.0 ± 0% 145.0 ± 0% +14.17% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 139.0 ± 2% 141.0 ± 1% +1.44% (p=0.010 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 149.0 ± 0% 148.0 ± 0% -0.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 149.0 ± 0% 148.0 ± 0% -0.67% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 138.5 ± 3% 140.0 ± 2% +1.08% (p=0.027 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 137.0 ± 2% 141.0 ± 1% +2.92% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 131.0 ± 0% 145.0 ± 0% +10.69% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 131.0 ± 0% 145.0 ± 0% +10.69% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 137.0 ± 1% 139.0 ± 1% +1.46% (p=0.007 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 135.0 ± 0% 137.0 ± 0% +1.48% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 137.5 ± 0% 140.5 ± 1% +2.18% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 139.0 ± 2% 140.5 ± 2% ~ (p=0.058 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/regular-16 139.0 ± 0% 138.0 ± 0% -0.72% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/compressed-16 139.0 ± 0% 138.0 ± 0% -0.72% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=9MB,len=4KB/combined-16 138.0 ± 2% 140.5 ± 2% +1.81% (p=0.002 n=10) geomean 136.8 139.9 +2.26% ``` Closes #1724. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Since #3383 and #3431, it is now not necessary to unmarshal the object to get its payload, and we can read the payload from reader to find the data. ``` goos: linux goarch: amd64 pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 8027.9µ ± 9% 264.8µ ± 5% -96.70% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 7608.3µ ± 5% 270.5µ ± 6% -96.45% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 7391.8µ ± 6% 360.6µ ± 8% -95.12% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 7.876m ± 4% 4.134m ± 3% -47.52% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 7.989m ± 6% 4.170m ± 3% -47.80% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 7.530m ± 2% 4.038m ± 8% -46.37% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 8.220m ± 6% 4.164m ± 4% -49.35% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 8.183m ± 6% 4.703m ± 6% -42.53% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 7.508m ± 5% 4.325m ± 5% -42.40% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/regular-16 822.54µ ± 6% 83.04µ ± 4% -89.90% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/compressed-16 884.94µ ± 7% 92.61µ ± 5% -89.53% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/combined-16 1346.99µ ± 11% 84.62µ ± 10% -93.72% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/regular-16 908.2µ ± 15% 817.8µ ± 9% ~ (p=0.165 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/compressed-16 946.3µ ± 3% 806.2µ ± 4% -14.80% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/combined-16 1290.4µ ± 9% 914.6µ ± 11% -29.12% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/regular-16 955.0µ ± 3% 863.4µ ± 4% -9.60% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/compressed-16 948.7µ ± 4% 869.5µ ± 5% -8.35% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/combined-16 1318.8µ ± 13% 955.9µ ± 7% -27.52% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 79.55µ ± 5% 89.11µ ± 2% +12.01% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 78.48µ ± 5% 87.90µ ± 2% +12.01% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 79.15µ ± 4% 92.59µ ± 3% +16.98% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 81.78µ ± 4% 92.22µ ± 4% +12.77% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 79.80µ ± 11% 90.99µ ± 3% +14.02% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 92.39µ ± 9% 92.73µ ± 2% ~ (p=0.280 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 92.11µ ± 1% 89.30µ ± 2% -3.06% (p=0.002 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 80.11µ ± 17% 91.34µ ± 2% ~ (p=0.105 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 79.40µ ± 5% 90.61µ ± 4% +14.12% (p=0.000 n=10) geomean 871.6µ 399.9µ -54.12% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 20495.77Ki ± 0% 43.65Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 20495.77Ki ± 0% 43.65Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 20496.00Ki ± 0% 43.81Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/regular-16 2063.83Ki ± 0% 43.65Ki ± 0% -97.89% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/compressed-16 2063.83Ki ± 0% 43.65Ki ± 0% -97.88% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/combined-16 2063.98Ki ± 0% 43.89Ki ± 0% -97.87% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/regular-16 2.015Mi ± 0% 1.039Mi ± 0% -48.45% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/compressed-16 2.015Mi ± 0% 1.039Mi ± 0% -48.45% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/combined-16 2.016Mi ± 0% 1.039Mi ± 0% -48.46% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/regular-16 2.015Mi ± 0% 1.039Mi ± 0% -48.44% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/compressed-16 2.015Mi ± 0% 1.039Mi ± 0% -48.44% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/combined-16 2.016Mi ± 0% 1.039Mi ± 0% -48.46% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 17.97Ki ± 0% 47.68Ki ± 0% +165.35% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 17.97Ki ± 0% 47.68Ki ± 0% +165.35% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 17.91Ki ± 0% 48.13Ki ± 0% +168.71% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 18.12Ki ± 0% 48.09Ki ± 0% +165.42% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 18.12Ki ± 0% 48.09Ki ± 0% +165.42% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 17.90Ki ± 1% 48.12Ki ± 0% +168.78% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 18.15Ki ± 0% 45.07Ki ± 0% +148.34% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 18.15Ki ± 0% 45.07Ki ± 0% +148.34% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 17.92Ki ± 1% 45.11Ki ± 0% +151.67% (p=0.000 n=10) geomean 913.5Ki 306.3Ki -66.47% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 135.0 ± 0% 138.0 ± 0% +2.22% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 135.0 ± 0% 138.0 ± 0% +2.22% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 140.0 ± 1% 140.5 ± 1% +0.36% (p=0.038 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 142.0 ± 0% 145.0 ± 0% +2.11% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 142.0 ± 0% 145.0 ± 0% +2.11% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 138.0 ± 1% 140.5 ± 2% ~ (p=0.063 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 139.0 ± 0% 148.0 ± 0% +6.47% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 139.0 ± 0% 148.0 ± 0% +6.47% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 139.0 ± 2% 139.0 ± 1% ~ (p=0.773 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/regular-16 135.0 ± 0% 134.0 ± 0% -0.74% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/compressed-16 135.0 ± 0% 134.0 ± 0% -0.74% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/combined-16 139.5 ± 2% 140.5 ± 2% +0.72% (p=0.030 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/regular-16 127.0 ± 0% 141.0 ± 0% +11.02% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/compressed-16 127.0 ± 0% 141.0 ± 0% +11.02% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/combined-16 138.0 ± 2% 139.5 ± 1% ~ (p=0.195 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/regular-16 127.0 ± 0% 144.0 ± 0% +13.39% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/compressed-16 127.0 ± 0% 144.0 ± 0% +13.39% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/combined-16 139.0 ± 1% 140.0 ± 2% ~ (p=0.146 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 138.0 ± 1% 140.5 ± 1% +1.81% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 142.0 ± 0% 140.0 ± 0% -1.41% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 142.0 ± 0% 140.0 ± 0% -1.41% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 137.5 ± 3% 140.0 ± 2% ~ (p=0.091 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 143.0 ± 0% 140.0 ± 0% -2.10% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 143.0 ± 0% 140.0 ± 0% -2.10% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 138.0 ± 1% 140.5 ± 2% +1.81% (p=0.030 n=10) geomean 137.1 139.9 +2.01% ``` Closes #1724. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Since #3383 and #3431, it is now not necessary to unmarshal the object to get its payload, and we can read the payload from reader to find the data. ``` goos: linux goarch: amd64 pkg: github.com/nspcc-dev/neofs-node/pkg/local_object_storage/blobstor/fstree cpu: AMD Ryzen 7 PRO 4750U with Radeon Graphics │ old.txt │ new.txt │ │ sec/op │ sec/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 8027.9µ ± 9% 264.8µ ± 5% -96.70% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 7608.3µ ± 5% 270.5µ ± 6% -96.45% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 7391.8µ ± 6% 360.6µ ± 8% -95.12% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 7.876m ± 4% 4.134m ± 3% -47.52% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 7.989m ± 6% 4.170m ± 3% -47.80% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 7.530m ± 2% 4.038m ± 8% -46.37% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 8.220m ± 6% 4.164m ± 4% -49.35% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 8.183m ± 6% 4.703m ± 6% -42.53% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 7.508m ± 5% 4.325m ± 5% -42.40% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/regular-16 822.54µ ± 6% 83.04µ ± 4% -89.90% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/compressed-16 884.94µ ± 7% 92.61µ ± 5% -89.53% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/combined-16 1346.99µ ± 11% 84.62µ ± 10% -93.72% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/regular-16 908.2µ ± 15% 817.8µ ± 9% ~ (p=0.165 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/compressed-16 946.3µ ± 3% 806.2µ ± 4% -14.80% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/combined-16 1290.4µ ± 9% 914.6µ ± 11% -29.12% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/regular-16 955.0µ ± 3% 863.4µ ± 4% -9.60% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/compressed-16 948.7µ ± 4% 869.5µ ± 5% -8.35% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/combined-16 1318.8µ ± 13% 955.9µ ± 7% -27.52% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 79.55µ ± 5% 89.11µ ± 2% +12.01% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 78.48µ ± 5% 87.90µ ± 2% +12.01% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 79.15µ ± 4% 92.59µ ± 3% +16.98% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 81.78µ ± 4% 92.22µ ± 4% +12.77% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 79.80µ ± 11% 90.99µ ± 3% +14.02% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 92.39µ ± 9% 92.73µ ± 2% ~ (p=0.280 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 92.11µ ± 1% 89.30µ ± 2% -3.06% (p=0.002 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 80.11µ ± 17% 91.34µ ± 2% ~ (p=0.105 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 79.40µ ± 5% 90.61µ ± 4% +14.12% (p=0.000 n=10) geomean 871.6µ 399.9µ -54.12% │ old.txt │ new.txt │ │ B/op │ B/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 20495.77Ki ± 0% 43.65Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 20495.77Ki ± 0% 43.65Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 20496.00Ki ± 0% 43.81Ki ± 0% -99.79% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 20.02Mi ± 0% 10.04Mi ± 0% -49.84% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 20.02Mi ± 0% 10.04Mi ± 0% -49.85% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/regular-16 2063.83Ki ± 0% 43.65Ki ± 0% -97.89% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/compressed-16 2063.83Ki ± 0% 43.65Ki ± 0% -97.88% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/combined-16 2063.98Ki ± 0% 43.89Ki ± 0% -97.87% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/regular-16 2.015Mi ± 0% 1.039Mi ± 0% -48.45% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/compressed-16 2.015Mi ± 0% 1.039Mi ± 0% -48.45% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/combined-16 2.016Mi ± 0% 1.039Mi ± 0% -48.46% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/regular-16 2.015Mi ± 0% 1.039Mi ± 0% -48.44% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/compressed-16 2.015Mi ± 0% 1.039Mi ± 0% -48.44% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/combined-16 2.016Mi ± 0% 1.039Mi ± 0% -48.46% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 17.97Ki ± 0% 47.68Ki ± 0% +165.35% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 17.97Ki ± 0% 47.68Ki ± 0% +165.35% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 17.91Ki ± 0% 48.13Ki ± 0% +168.71% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 18.12Ki ± 0% 48.09Ki ± 0% +165.42% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 18.12Ki ± 0% 48.09Ki ± 0% +165.42% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 17.90Ki ± 1% 48.12Ki ± 0% +168.78% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 18.15Ki ± 0% 45.07Ki ± 0% +148.34% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 18.15Ki ± 0% 45.07Ki ± 0% +148.34% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 17.92Ki ± 1% 45.11Ki ± 0% +151.67% (p=0.000 n=10) geomean 913.5Ki 306.3Ki -66.47% │ old.txt │ new.txt │ │ allocs/op │ allocs/op vs base │ FSTree_GetRange/size=10MB,off=1MB,len=4KB/regular-16 135.0 ± 0% 138.0 ± 0% +2.22% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/compressed-16 135.0 ± 0% 138.0 ± 0% +2.22% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=1MB,len=4KB/combined-16 140.0 ± 1% 140.5 ± 1% +0.36% (p=0.038 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/regular-16 142.0 ± 0% 145.0 ± 0% +2.11% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/compressed-16 142.0 ± 0% 145.0 ± 0% +2.11% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=10MB/combined-16 138.0 ± 1% 140.5 ± 2% ~ (p=0.063 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/regular-16 139.0 ± 0% 148.0 ± 0% +6.47% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/compressed-16 139.0 ± 0% 148.0 ± 0% +6.47% (p=0.000 n=10) FSTree_GetRange/size=10MB,off=Empty,len=Empty/combined-16 139.0 ± 2% 139.0 ± 1% ~ (p=0.773 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/regular-16 135.0 ± 0% 134.0 ± 0% -0.74% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/compressed-16 135.0 ± 0% 134.0 ± 0% -0.74% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=1KB,len=4KB/combined-16 139.5 ± 2% 140.5 ± 2% +0.72% (p=0.030 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/regular-16 127.0 ± 0% 141.0 ± 0% +11.02% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/compressed-16 127.0 ± 0% 141.0 ± 0% +11.02% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=1MB/combined-16 138.0 ± 2% 139.5 ± 1% ~ (p=0.195 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/regular-16 127.0 ± 0% 144.0 ± 0% +13.39% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/compressed-16 127.0 ± 0% 144.0 ± 0% +13.39% (p=0.000 n=10) FSTree_GetRange/size=1MB,off=Empty,len=Empty/combined-16 139.0 ± 1% 140.0 ± 2% ~ (p=0.146 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/regular-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/compressed-16 139.0 ± 0% 129.0 ± 0% -7.19% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=4KB/combined-16 138.0 ± 1% 140.5 ± 1% +1.81% (p=0.001 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/regular-16 142.0 ± 0% 140.0 ± 0% -1.41% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/compressed-16 142.0 ± 0% 140.0 ± 0% -1.41% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=Empty,len=Empty/combined-16 137.5 ± 3% 140.0 ± 2% ~ (p=0.091 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/regular-16 143.0 ± 0% 140.0 ± 0% -2.10% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/compressed-16 143.0 ± 0% 140.0 ± 0% -2.10% (p=0.000 n=10) FSTree_GetRange/size=4KB,off=1KB,len=1KB/combined-16 138.0 ± 1% 140.5 ± 2% +1.81% (p=0.030 n=10) geomean 137.1 139.9 +2.01% ``` Closes #1724. Signed-off-by: Andrey Butusov <andrey@nspcc.io>
Closes #2085.