-
Notifications
You must be signed in to change notification settings - Fork 648
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
Make better use of multi-core servers #1079
Comments
General remark: I think we need a "Performance" epic - #982 belongs into the same category. |
Someone has invaded my head. I spent a good chunk of last night reading and pondering some of the same ideas. The big question that kept coming up as I thought about implementations was "would this be faster, or slower?" Web servers have SSL offloading, which can be dedicated hardware that handles the SSL encryption/decryption, so the real server can serve pages. But we need authentication on both sides ("client side authentication" in web-speak). An intermediate step is giving peers the option to talk over an encrypted, verified channel. Part of the handshake verifies public keys and negotiates stream ciphers. While negotiation is painful up front, subsequent communication is less-so. We could centralize (and perhaps optimize) signature verification by moving the incoming data through the verification step on the way in, and marking the internal representation of that data as "signed and verified by public key X". Perhaps there would be no more signature verification needed. Warning... Going off topic here... What if we want to only connect to a white list of servers? We can do that if we know (with a good amount of confidence) who is on the other side. Another optimization is specialized protocols. Incoming blocks can quickly be routed somewhere different than incoming heartbeats, or connection requests, or .... Back on topic (somewhat)... There's a lot of possible optimizations here. But I keep bubbling back up to my original question. "Would this be faster or slower?" The current p2p code has some metrics. I think we're going to have to give that a hard look, gather stats (especially what kind of process is currently slowing our throughput), and spend some time in the laboratory. |
@jmjatlanta there's a difference between client and/or P2P connections and transaction signature verification. Similar to sending PGP-encrypted email through an TLS-protected SMTP connection (that's routed through a VPN tunnel if you want). :-) They are different communication layers where encryption / authentication plays different roles. P2P connections are already encrypted, but there is no authentication happening yet. Interesting topic, but out of scope here.
This! ("centralize" in the sense of software code, it could be done "decentralized" in the sense of multi-core and perhaps as a future step in the sense of multi-server).
Full ACK! |
@bangzi1001 It would certainly help. I would like to set up some kind of lab. I've got a fairly slow machine in NY, and a few around here. I'm hoping to develop some kind of testing framework that closely mimics the block producing process, and use it and a variety of machines to gather some metrics. We may already have such a framework, or at least the beginnings of one. |
Currently applying some optimizations I've discovered during the research for my BitFest presentation. |
Moving to december release since only partially resolved at this time. |
Done? |
Depends. We could treat this as an Epic and leave it open. Or we declare this done via #1360 and create new issues for future improvements. |
@pmconrad and @abitmore I'm not sure what to do with this Issue at this time. I believe #1360 addresses some of this. I like the idea of treating it as an epic and modifying the Description to track related Issues/PRs. @MichelSantos Please ensure you consider this in your Release Notes. Shall I remove it from the finished Feature Release and add it to (next) Feature Release for further consideration? |
@ryanRfox This is currently referenced in the Release Notes for the 201902 Feature Release |
User Story
As a
node operator
I want tomake better use of my server hardware
so thatmy server can process more transactions per second
.Impacts
Describe which portion(s) of BitShares Core may be impacted by your request. Please tick at least one box.
Additional Context (optional)
@clockworkgr discovered this attempt to parallelize signature verification: neuronchain/neuronchain@3b545d2
I think a better approach would be to extract the crypto calculations from the database thread out into the network layers, i. e. handle the signature->pubkey conversion in the P2P and API layers. Keep in mind that a witness has will apply a given transaction three times when signing a block:
The abovementioned patch doesn't help with steps 1 + 2.
CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: