-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[fastx benchmarking] Removed unnecessary TX order sending #93
Conversation
In lines 160-164 we already certify the TX, so there is no need to send the orders to the authorities. However in measuring the throughput, should we include these just for completeness sake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I think if we get rid of this, we also want to eliminate the
/ 2
here--otherwise, our throughput # will be off. - Perhaps it also makes sense to get rid of
// Serialize order
let bufx = serialize_order(&order);
assert!(!bufx.is_empty());
above?
Yes and yes. Lots to cleanup in this code. Forgot to mark it as draft PR We can also measure both separately for internal purposes but choose one consistent method to use for marketing/publicity. |
I think counting F + G + H for throughput measurements (as this PR is doing) is simple + a good start. The old code (IIUC) was doing something a bit funky--it was including B + C + D + F + G + H (but not E), and it wasn't implemented in a way that forced D to finish before F begins (which might or might not skew the #'s). |
Precisely. Wanted to make sure I wasn't missing some reasoning behind the previous (funky) formulation. Will make the changes to only count F+G+H. Thank you. |
@@ -105,12 +105,12 @@ impl ClientServerBenchmark { | |||
}; | |||
|
|||
// Pick an authority and create one state per shard. | |||
let (public_auth0, secret_auth0) = keys.pop().unwrap(); | |||
let (public_auth0, secret_auth0) = &keys[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will use the same key for every authority, which I don't think we want.
@@ -34,16 +34,16 @@ struct ClientServerBenchmark { | |||
#[structopt(long, default_value = "9555")] | |||
port: u32, | |||
/// Size of the FastPay committee | |||
#[structopt(long, default_value = "10")] | |||
#[structopt(name = "committee-size", long, default_value = "10")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I think what you're looking for here, rather than those names, is a parameter rename-all = "kebab_case"
on the enclosing structopt
attribute of ClientServerBenchmark
(doc)
The goal of this benchmark is to estimate the throughput that one authority can support. This is why we process both an order and a certificate: when an authority operates in the wild it will need to process (about) one order for each certificate. So here we simulate a load that is close to what we expect in the wild. |
@gdanezis so you wanna leave it as is? |
Right now the bench is measuring a reasonable proxy of cost of order + cost of cert processing. It might be worthwhile to have a flag that separate these two, and only measure one or the other. But just dropping the cost of processing orders just creates a blind spot I think. |
Makes sense to me. To suggest a path forward: let's leave the throughput benchmark as-is, and work on adding a new benchmark for latency that measures B -> L? |
Created PR to selectively measure Orders, Certs or both (default as is now) |
@sblackshear got it. Have this now: #106 |
Reasoning:
Current benchmark measures B-C-D and F-G-H and returns the sum.
In lines 160-164 we already certify the TX (which eliminates steps B-D), so there is no need to send the orders to the authorities.
However in measuring the throughput, should we include this roundtrip just for completeness sake? @gdanezis
By removing B-D, throughput is 34% higher => 35000tx/s vs 26000 tx/s
Solution
This PR provides the option to measure B-C-D and F-G-H separately, or both via CLI selector.
Will enhance this in future to optionally measure end-to-end (B-H and B-L)