WIP: Blobtree substorage #645

Closed
dstepanov-yadro wants to merge 11 commits from dstepanov-yadro/frostfs-node:feat/small_blob_store into master

Blobtree is another blobstor substorage type.

Idea

Blobovnicza tree uses boltdb to store many small objects. But large bolt databases require a lot of memory to operate and may cause performance degradation. So to avoid performance degradation we need to reduce single bolt db size up to 40 MB and less.

For such small databases

  1. The overhead of maintaining a btree can take up a significant portion of the total time for Put or Get

  2. It is impossible to keep all databases open. So open/close operations also can take up a significant portion of the total time for Put or Get

Also when physically deleting a disk boltdb can panic.

Solution

Store small objects in regular files without any db, but combine them together. So one regular file contains many small objects. Such files should be small enough (1-10MB?).

So blobtree looks similar to fstree: it uses object address to build path into directory tree, but unlike fstree, in blobtree different objects are combined into a single file.

Here some performance tests on dev-env:

8kb, 10min, 30 writers/readers

blobtree put 947 kB/s
blobtree get 1.1 MB/s
depth = 2
size = 4mb

blobovnicza put 893 kB/s
blobovnicza get 1.2 MB/s
depth = 2
width = 4
leaf_width = 10
size = 4mb
Blobtree is another blobstor substorage type. ### Idea Blobovnicza tree uses boltdb to store many small objects. But large bolt databases require a lot of memory to operate and may cause performance degradation. So to avoid performance degradation we need to reduce single bolt db size up to 40 MB and less. For such small databases 1) The overhead of maintaining a btree can take up a significant portion of the total time for Put or Get 2) It is impossible to keep all databases open. So open/close operations also can take up a significant portion of the total time for Put or Get Also when physically deleting a disk boltdb can panic. ### Solution Store small objects in regular files without any db, but combine them together. So one regular file contains many small objects. Such files should be small enough (1-10MB?). So blobtree looks similar to fstree: it uses object address to build path into directory tree, but unlike fstree, in blobtree different objects are combined into a single file. Here some performance tests on dev-env: 8kb, 10min, 30 writers/readers ``` blobtree put 947 kB/s blobtree get 1.1 MB/s depth = 2 size = 4mb blobovnicza put 893 kB/s blobovnicza get 1.2 MB/s depth = 2 width = 4 leaf_width = 10 size = 4mb ```
dstepanov-yadro force-pushed feat/small_blob_store from 8ca631b575 to eedec274c7 2023-08-25 10:36:16 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from eedec274c7 to 8bbce8c9b6 2023-08-29 06:51:20 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 8bbce8c9b6 to 1f3b36f7c8 2023-10-04 07:03:14 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 1f3b36f7c8 to 8e2cd4df20 2023-10-04 07:24:30 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 8e2cd4df20 to f6c0fa7945 2023-10-04 10:29:59 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from f6c0fa7945 to 14bde0aab3 2023-10-04 10:43:47 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 14bde0aab3 to c69b65957e 2023-10-04 10:44:54 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 00c4d1f9f8 to 8bb0af6a4c 2023-10-04 13:10:32 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 8bb0af6a4c to 6c75229477 2023-10-04 13:50:39 +00:00 Compare
dstepanov-yadro changed title from WIP: Blobtree to Blobtree substorage 2023-10-04 13:56:08 +00:00
dstepanov-yadro requested review from storage-core-committers 2023-10-04 13:56:17 +00:00
dstepanov-yadro requested review from storage-core-developers 2023-10-04 13:56:18 +00:00
dstepanov-yadro force-pushed feat/small_blob_store from 84611184d2 to 3d699edf57 2023-10-17 10:27:27 +00:00 Compare
aarifullin reviewed 2023-10-19 12:07:17 +00:00
@ -0,0 +88,4 @@
}
return common.GetRes{}, err
}
for _, entity := range entities {
Member

My suggestion is not the big deal but what do you think about using filepath.WalkDir?

My suggestion is not the big deal but what do you think about using `filepath.WalkDir`?
dstepanov-yadro changed title from Blobtree substorage to WIP: Blobtree substorage 2023-10-19 14:19:01 +00:00
dstepanov-yadro force-pushed feat/small_blob_store from 3d699edf57 to d8815f2aa6 2023-10-25 06:08:05 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from fb621056f4 to be43344910 2023-10-25 18:35:50 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from be43344910 to 942a137f07 2023-10-26 08:56:00 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 942a137f07 to 3b548de37d 2023-10-26 09:00:45 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 3b548de37d to a915b3c4f0 2023-10-26 09:02:16 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from a915b3c4f0 to 2c0130ece7 2023-10-26 09:05:20 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 2c0130ece7 to a305a4f2b0 2023-10-26 09:15:55 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from a305a4f2b0 to 00fa64e26d 2023-10-26 10:06:59 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 598deb26c6 to 482d5b492a 2023-10-27 09:39:58 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 482d5b492a to 5f2a8f57e6 2023-10-27 14:48:50 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 30d97677ba to 0315f91e8f 2023-10-27 14:58:14 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 7db8318fe4 to 5ffbe4ec24 2023-10-31 16:41:51 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from 5ffbe4ec24 to e5532788bf 2023-11-03 09:50:58 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from e5532788bf to cdeca83bc1 2023-11-09 06:58:41 +00:00 Compare
dstepanov-yadro force-pushed feat/small_blob_store from cdeca83bc1 to dc5b741b1d 2023-11-29 16:38:32 +00:00 Compare
dstepanov-yadro closed this pull request 2023-12-07 13:47:01 +00:00
All checks were successful
DCO action / DCO (pull_request) Successful in 1m26s
Required
Details
Build / Build Components (1.21) (pull_request) Successful in 4m17s
Required
Details
Build / Build Components (1.20) (pull_request) Successful in 4m22s
Required
Details
Vulncheck / Vulncheck (pull_request) Successful in 3m43s
Required
Details
Tests and linters / Staticcheck (pull_request) Successful in 5m27s
Required
Details
Tests and linters / Lint (pull_request) Successful in 5m52s
Required
Details
Tests and linters / Tests (1.21) (pull_request) Successful in 6m16s
Required
Details
Tests and linters / Tests (1.20) (pull_request) Successful in 6m50s
Required
Details
Tests and linters / Tests with -race (pull_request) Successful in 7m49s
Required
Details

Pull request closed

Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-committers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-node#645
No description provided.