-
Notifications
You must be signed in to change notification settings - Fork 276
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
SN Server performance #164
Comments
Some suggestions: Based on the existing BDT SN-related components, you can develop a single-process multi-SN client to simulate multiple BDT protocol stacks using the SN server. The primary focus should be on covering the core logic of SN ping and SN call operations. By developing a single-process multi-SN client and running stress tests, we can gain valuable insights into the performance of the SN server and identify opportunities for improvement. |
Hello, I would like to use the bdt-debugger-daemon to develop a performance analysis tool. The general steps are as follows:
|
The solution should be feasible! If you need to test, you can first choose an SN in a nightly environment, such as simulating 1k or 10k peers, and check the server-related load and response delay curve in time. |
Ok, i will simulate 10k peers to stress testing for SN online operations firstly. |
The performance test results for SN are as follows: Server hardware configuration of sn-miner:
1. SN Ping Request (SN online)Client testing environment: Performance results of sn-miner: The main bottleneck is the CPU from above data. 2. Call Request (P2P Punching)250 devices simultaneously perform call punching connections in parallel. Performance results of sn-miner: Compared to ping, the CPU consumption is lower, but there is a higher demand for upstream bandwidth. |
Very detailed datas! I have a few questions here:
So here are a few suggestions: 1. The Ping interval should be a important and configurable valueThis value is also a core factor in controlling the scale of the stress-tested devices. 2. Pay attention to the device-side data during the stress testThis mainly including:
|
No interval, the stress testing process for SN Ping is as follows: loop {
bencher.stack.sn_client().ping().wait_online()
...
bencher.stack.reset_sn_list(sns.clone());
} After each ping, the SN list in the stack is reset, which means that ping requests are constantly being sent to prevent interference from SN keepalive and connection status. "Yes, the response time of ping/call from the client side and the error handling ability of SN are also important. These indicators will be added in the subsequent stress testing. |
In our system, the SN server plays a critical role in the BDT protocol, enabling NAT peer connections and partially handling the service discovery mechanism.
For clients using the cyfs-stack (such as gateways and cyfs-runtime), the SN server can be customized or the built-in system SN server can be used through configuration. The current built-in SN servers is as follows:
The server is dynamically chosen based on the client's DeviceID area.
The implementation code for the SN server can be found at:
https://github.com/buckyos/CYFS/tree/main/src/component/cyfs-bdt/src/sn
In situations where the overall system capacity is large, the performance of the SN server may become a critical bottleneck. This might necessitate a series of mechanisms for evaluating and improving its performance.
We now need to gather some performance data on the current SN server, conduct stress tests, and use the results to optimize and improve its performance in the future. Is there anyone who can help with conducting these performance tests?
The text was updated successfully, but these errors were encountered: