Skip to content

Append Path performance comparison between Pravega Rust and Java client

Wenqi Mou edited this page May 21, 2020 · 6 revisions

About the experiemnt

Goal

The append path performance is an essential part of the overall Pravega performance and we want to make sure the client is not the bottleneck. One of the reasons of porting Java client to Rust is that Rust supposed to have much better performance than Java due to its language property(directly compiled to machine code). This experiment is an initial proof of our presumption.

The design of the experiment

When writing to Pravega, the data flows roughly like this:

User code ---> Pravega Client ---> Kernel ---> Network ---> Pravega Segmentstore ---> Bookkeeper

In this experiment we measure the latency:

Pravega Client ---> Kernel ---> Mock Pravega Segmentstore

How to run the benchmark

Navigate to the root directory and run

cargo bench

Initial Result

100 Byte Event Rust Java
1K writes 8ms 129ms
100K writes 774ms 1610ms
1M writes 7960ms 8392ms

Looks like Rust Client has a linear latency increasing as the load increases and Java has a constant overhead for small workload but performs well when the workload increases. It is probably because the Java client is pretty optimized and Rust client doesn't have that yet. However, it does show that an optimized Rust client might have a great chance beating Java.

Clone this wiki locally