Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.
/ leveldown Public archive
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Benchmarks: End iterator manually vs on GC #627

@peakji

Description

@peakji

Original discussion: #601

Benchmark script and full outputs: https://gist.github.com/peakji/0fd6c1529951767697480e708806ae33


The benchmark script records time usage of each epoch. And an epoch comes with two flavors: sequential and parallel.

In sequential mode, we first insert some pseudo-random keys (deterministic) with a batch, then scan the keys using an iterator. In parallel mode we insert and scan at the same time, and of course unlike the sequential mode, the randomness makes the program uncertain / nondeterministic.

Between epochs, we do not clear the database.


Result shows that ending on GC is slower than ending eagerly on a busy server with mixed workload. I guess the main cause is that holding snapshots might affect compaction of new keys after the SequenceNumber.

master-sequential gc-sequential master-parallel gc-parallel
Total time (nanoseconds) 90005813332 104395061841 81394247896 94485047913

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions