Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: use [fusio](https://github.com/tonbo-io/fusio) to implement the storage layer and support multiple storage #163

Merged
merged 12 commits into from
Sep 27, 2024

Conversation

KKould
Copy link
Contributor

@KKould KKould commented Sep 20, 2024

No description provided.

@KKould KKould added enhancement New feature or request L - Large Introducing a new module, implementing major features, adjusting system architecture. labels Sep 20, 2024
@KKould KKould requested a review from ethe September 20, 2024 10:18
@KKould KKould self-assigned this Sep 20, 2024
… the storage layer and support multiple storage
@KKould KKould force-pushed the refactor/fusio branch 3 times, most recently from f05f65f to c2e1ed0 Compare September 25, 2024 07:12
Copy link

Read:

+--------------------------------------------+----------+---------+
|                                            | tonbo    | rocksdb |
+=================================================================+
| random range reads                         | 136978ms | 37863ms |
|--------------------------------------------+----------+---------|
| random range reads                         | 134460ms | 37787ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53292ms  | 37680ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53218ms  | 37731ms |
|--------------------------------------------+----------+---------|
| random range projection reads (4 threads)  | 38840ms  | 38093ms |
|--------------------------------------------+----------+---------|
| random range projection reads (8 threads)  | 37563ms  | 37933ms |
|--------------------------------------------+----------+---------|
| random range projection reads (16 threads) | 34760ms  | 36319ms |
|--------------------------------------------+----------+---------|
| random range projection reads (32 threads) | 30681ms  | 36181ms |
+--------------------------------------------+----------+---------+

Copy link

Write:

+-------------------------------+--------+---------+
|                               | tonbo  | rocksdb |
+==================================================+
| bulk load                     | 6433ms | 9550ms  |
|-------------------------------+--------+---------|
| individual writes             | 8243ms | 10656ms |
|-------------------------------+--------+---------|
| individual writes (4 threads) | 8227ms | 10640ms |
|-------------------------------+--------+---------|
| individual writes (8 threads) | 7771ms | 10674ms |
|-------------------------------+--------+---------|
| batch writes                  | 8058ms | 7137ms  |
|-------------------------------+--------+---------|
| batch writes (4 threads)      | 7822ms | 7110ms  |
|-------------------------------+--------+---------|
| batch writes (8 threads)      | 7706ms | 7171ms  |
|-------------------------------+--------+---------|
| removals                      | 3118ms | 3823ms  |
+-------------------------------+--------+---------+

@KKould KKould requested a review from crwen September 25, 2024 08:34
Copy link

Read:

+--------------------------------------------+----------+---------+
|                                            | tonbo    | rocksdb |
+=================================================================+
| random range reads                         | 138091ms | 37846ms |
|--------------------------------------------+----------+---------|
| random range reads                         | 135251ms | 37909ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53065ms  | 38053ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53213ms  | 37889ms |
|--------------------------------------------+----------+---------|
| random range projection reads (4 threads)  | 38564ms  | 38157ms |
|--------------------------------------------+----------+---------|
| random range projection reads (8 threads)  | 34929ms  | 38028ms |
|--------------------------------------------+----------+---------|
| random range projection reads (16 threads) | 34649ms  | 36626ms |
|--------------------------------------------+----------+---------|
| random range projection reads (32 threads) | 31311ms  | 36543ms |
+--------------------------------------------+----------+---------+

Copy link

Write:

+-------------------------------+--------+---------+
|                               | tonbo  | rocksdb |
+==================================================+
| bulk load                     | 6406ms | 9470ms  |
|-------------------------------+--------+---------|
| individual writes             | 8351ms | 10466ms |
|-------------------------------+--------+---------|
| individual writes (4 threads) | 8168ms | 10689ms |
|-------------------------------+--------+---------|
| individual writes (8 threads) | 7694ms | 10589ms |
|-------------------------------+--------+---------|
| batch writes                  | 8009ms | 7102ms  |
|-------------------------------+--------+---------|
| batch writes (4 threads)      | 7700ms | 7165ms  |
|-------------------------------+--------+---------|
| batch writes (8 threads)      | 7707ms | 7130ms  |
|-------------------------------+--------+---------|
| removals                      | 3115ms | 3792ms  |
+-------------------------------+--------+---------+

Copy link

Read:

+--------------------------------------------+----------+---------+
|                                            | tonbo    | rocksdb |
+=================================================================+
| random range reads                         | 129046ms | 38181ms |
|--------------------------------------------+----------+---------|
| random range reads                         | 129076ms | 38144ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 52355ms  | 38120ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53120ms  | 37673ms |
|--------------------------------------------+----------+---------|
| random range projection reads (4 threads)  | 40735ms  | 37473ms |
|--------------------------------------------+----------+---------|
| random range projection reads (8 threads)  | 40130ms  | 37336ms |
|--------------------------------------------+----------+---------|
| random range projection reads (16 threads) | 37260ms  | 35875ms |
|--------------------------------------------+----------+---------|
| random range projection reads (32 threads) | 32191ms  | 35816ms |
+--------------------------------------------+----------+---------+

Copy link

Write:

+-------------------------------+--------+---------+
|                               | tonbo  | rocksdb |
+==================================================+
| bulk load                     | 6444ms | 9445ms  |
|-------------------------------+--------+---------|
| individual writes             | 8330ms | 10657ms |
|-------------------------------+--------+---------|
| individual writes (4 threads) | 8201ms | 10652ms |
|-------------------------------+--------+---------|
| individual writes (8 threads) | 7787ms | 10590ms |
|-------------------------------+--------+---------|
| batch writes                  | 8021ms | 7150ms  |
|-------------------------------+--------+---------|
| batch writes (4 threads)      | 7601ms | 7122ms  |
|-------------------------------+--------+---------|
| batch writes (8 threads)      | 7579ms | 7130ms  |
|-------------------------------+--------+---------|
| removals                      | 3109ms | 3825ms  |
+-------------------------------+--------+---------+

Copy link

Read:

+--------------------------------------------+----------+---------+
|                                            | tonbo    | rocksdb |
+=================================================================+
| random range reads                         | 133243ms | 37035ms |
|--------------------------------------------+----------+---------|
| random range reads                         | 130852ms | 36974ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53094ms  | 36895ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53073ms  | 36839ms |
|--------------------------------------------+----------+---------|
| random range projection reads (4 threads)  | 39900ms  | 36908ms |
|--------------------------------------------+----------+---------|
| random range projection reads (8 threads)  | 39510ms  | 36935ms |
|--------------------------------------------+----------+---------|
| random range projection reads (16 threads) | 36956ms  | 35581ms |
|--------------------------------------------+----------+---------|
| random range projection reads (32 threads) | 32172ms  | 35633ms |
+--------------------------------------------+----------+---------+

Copy link

Write:

+-------------------------------+--------+---------+
|                               | tonbo  | rocksdb |
+==================================================+
| bulk load                     | 6466ms | 9430ms  |
|-------------------------------+--------+---------|
| individual writes             | 8207ms | 10425ms |
|-------------------------------+--------+---------|
| individual writes (4 threads) | 8141ms | 10445ms |
|-------------------------------+--------+---------|
| individual writes (8 threads) | 7797ms | 10493ms |
|-------------------------------+--------+---------|
| batch writes                  | 7944ms | 7097ms  |
|-------------------------------+--------+---------|
| batch writes (4 threads)      | 7592ms | 7108ms  |
|-------------------------------+--------+---------|
| batch writes (8 threads)      | 7357ms | 7140ms  |
|-------------------------------+--------+---------|
| removals                      | 3070ms | 3806ms  |
+-------------------------------+--------+---------+

src/serdes/num.rs Outdated Show resolved Hide resolved
buf
};
async fn decode<R: Read + Unpin>(reader: &mut R) -> Result<Self, Self::Error> {
let bytes = reader.read_exact(vec![0u8; size_of::<Self>()]).await?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use array instead of vector?

src/version/mod.rs Outdated Show resolved Hide resolved
use crate::fs::FileProvider;

pub trait Executor: FileProvider {
pub trait Executor {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executor has to provide the local file system implementation, use tokio executor + monoio filesystem should cause panic.

Copy link

Read:

+--------------------------------------------+----------+---------+
|                                            | tonbo    | rocksdb |
+=================================================================+
| random range reads                         | 136761ms | 37490ms |
|--------------------------------------------+----------+---------|
| random range reads                         | 133886ms | 37780ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53961ms  | 37422ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 53031ms  | 37231ms |
|--------------------------------------------+----------+---------|
| random range projection reads (4 threads)  | 39582ms  | 37312ms |
|--------------------------------------------+----------+---------|
| random range projection reads (8 threads)  | 39151ms  | 37213ms |
|--------------------------------------------+----------+---------|
| random range projection reads (16 threads) | 36138ms  | 35554ms |
|--------------------------------------------+----------+---------|
| random range projection reads (32 threads) | 32139ms  | 35607ms |
+--------------------------------------------+----------+---------+

Copy link

Write:

+-------------------------------+--------+---------+
|                               | tonbo  | rocksdb |
+==================================================+
| bulk load                     | 6454ms | 9538ms  |
|-------------------------------+--------+---------|
| individual writes             | 8333ms | 10662ms |
|-------------------------------+--------+---------|
| individual writes (4 threads) | 8254ms | 10723ms |
|-------------------------------+--------+---------|
| individual writes (8 threads) | 7868ms | 10701ms |
|-------------------------------+--------+---------|
| batch writes                  | 7958ms | 7171ms  |
|-------------------------------+--------+---------|
| batch writes (4 threads)      | 7613ms | 7272ms  |
|-------------------------------+--------+---------|
| batch writes (8 threads)      | 7443ms | 7282ms  |
|-------------------------------+--------+---------|
| removals                      | 3102ms | 3828ms  |
+-------------------------------+--------+---------+

@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@tonbo-io tonbo-io deleted a comment from github-actions bot Sep 27, 2024
@ethe ethe merged commit 6a16796 into main Sep 27, 2024
12 checks passed
@ethe ethe deleted the refactor/fusio branch September 27, 2024 06:07
Copy link

Read:

+--------------------------------------------+----------+---------+
|                                            | tonbo    | rocksdb |
+=================================================================+
| random range reads                         | 129198ms | 39229ms |
|--------------------------------------------+----------+---------|
| random range reads                         | 116346ms | 39126ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 49997ms  | 40353ms |
|--------------------------------------------+----------+---------|
| random range projection reads              | 49972ms  | 40300ms |
|--------------------------------------------+----------+---------|
| random range projection reads (4 threads)  | 39654ms  | 40491ms |
|--------------------------------------------+----------+---------|
| random range projection reads (8 threads)  | 38564ms  | 40539ms |
|--------------------------------------------+----------+---------|
| random range projection reads (16 threads) | 35719ms  | 38945ms |
|--------------------------------------------+----------+---------|
| random range projection reads (32 threads) | 31509ms  | 39040ms |
+--------------------------------------------+----------+---------+

Copy link

Write:

+-------------------------------+--------+---------+
|                               | tonbo  | rocksdb |
+==================================================+
| bulk load                     | 6464ms | 9537ms  |
|-------------------------------+--------+---------|
| individual writes             | 8315ms | 10911ms |
|-------------------------------+--------+---------|
| individual writes (4 threads) | 8208ms | 10880ms |
|-------------------------------+--------+---------|
| individual writes (8 threads) | 7857ms | 10801ms |
|-------------------------------+--------+---------|
| batch writes                  | 7967ms | 7227ms  |
|-------------------------------+--------+---------|
| batch writes (4 threads)      | 7634ms | 7216ms  |
|-------------------------------+--------+---------|
| batch writes (8 threads)      | 7640ms | 7236ms  |
|-------------------------------+--------+---------|
| removals                      | 3161ms | 3855ms  |
+-------------------------------+--------+---------+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request L - Large Introducing a new module, implementing major features, adjusting system architecture.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: unwrap error on datafusion example
4 participants