Skip to content

Channel performance #2

@nonconvextech

Description

@nonconvextech

ftlog use a crossbeam channel to offload IO/pipe to dedicated log thread. However, when benchmarking ftlog performance, I found that crossbeam channel takes up most of the time, especially in x86/x86_64 environment.

When try_send is commented out, the latency of single log call can steadily reduce to ~100ns. For normal benchmark, the latency of log call raises to ~500ns. This result does not match the latency in crossbeam benchmark(See kanal benchmark).

Further more, the impact of try_send is much more significant in Linux server than on MacBook Pro. This might cause by CPU architecture since crossbeam uses atomic operations in try_send.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions