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

Bug: Poor performance handling binary payload #3947

Open
2 tasks done
SeanEClarke opened this issue Apr 25, 2024 · 0 comments
Open
2 tasks done

Bug: Poor performance handling binary payload #3947

SeanEClarke opened this issue Apr 25, 2024 · 0 comments
Labels
bug Something isn't working topic:performance Improvements to database performance

Comments

@SeanEClarke
Copy link

Describe the bug

I did a test uploading a binary file in 32Kb blocks and the load performance was very poor (PostgreSQL, Cassandra and ScyllaDB were much much faster).

~110MB file uploaded in 32Kb blocks (3260 rows):
cargo run 203.47s user 0.81s system 78% cpu 4:21.21 total

Steps to reproduce

Simple structure, something like:

#[derive(Debug, Serialize, Deserialize)]
struct Data {
    sequence: Id,
    name: String,
    payload: Vec<u8>,
}

and then load data into it:

    let mut file = tokio::fs::File::open("/tmp/some_data_100MB.bin").await?;
    let mut data = [0; 0x8000];
    let mut c = 0;
    while file.read(&mut data).await? != 0 {
        let created: Vec<Data> = db
            .create("data")
            .content(Data {
                sequence: Id::Number(c),
                name: "test".to_owned(),
                payload: data.to_vec(),
            })
            .await?;
        c += 1;
    }

Expected behaviour

a lot quicker, ScyllaDB is in the order of a couple of seconds.

SurrealDB version

surreal 1.4.2 AMD64

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@SeanEClarke SeanEClarke added bug Something isn't working triage This issue is new labels Apr 25, 2024
@DelSkayn DelSkayn added topic:performance Improvements to database performance and removed triage This issue is new labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working topic:performance Improvements to database performance
Projects
None yet
Development

No branches or pull requests

2 participants