Skip to content
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

请问分布式系统的Continental eCAL with protobuf 该怎么使用 #12

Open
zqlibo opened this issue Nov 15, 2022 · 6 comments
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@zqlibo
Copy link

zqlibo commented Nov 15, 2022

我在局域网中的两台电脑上部署了代码,怎么才能测试UDP模式下的传输性能?

使用以下指令 只能在本地模式运行,两台电脑无法测试。

t1

./install/performance_test/lib/performance_test/perf_test -c ECAL_PROTO --msg Array1k -p 0 -s 1

t2

./install/performance_test/lib/performance_test/perf_test -c ECAL_PROTO --msg Array1k -p 1 -s 0

@ZhenshengLee ZhenshengLee self-assigned this Nov 15, 2022
@ZhenshengLee ZhenshengLee added the documentation Improvements or additions to documentation label Nov 15, 2022
@ZhenshengLee
Copy link
Owner

跨主机通信的测试方法,参考readme

performance_test/README.md

Lines 295 to 310 in 7ce2c8e

On a distributed system, testing latency is difficult, because the clocks are probably not
perfectly synchronized between the two devices. To work around this, the performance_test tool
supports relay mode, which allows for a round-trip style of communication:
```bash
# On the main machine
perf_test <options> --roundtrip-mode Main
# On the relay machine:
perf_test <options> --roundtrip-mode Relay
```
In relay mode, the Main machine sends messages to the Relay machine, which immediately sends the
messages back. The Main machine receives the relayed message, and reports the round-trip latency.
Therefore, the reported latency will be roughly double the latency compared to the latency reported
in non-relay mode.

By default, eCAL is configured in local mode. To switch eCAL to cloud mode, edit your ecal.ini and change the following settings:

还取决于eCAL是否启用了跨主机通信,从5.10版本开始,跨主机网络通信默认是关闭的,参考
https://eclipse-ecal.github.io/ecal/getting_started/cloud.html#enable-network-mode-in-ecal-ini

如果喜欢本仓库,请star,谢谢!

@zqlibo
Copy link
Author

zqlibo commented Nov 16, 2022

您好 还是想咨询下我的eCAL改了网络配置后测试代码还是无法使用,我的eCAL版本为5.10.3
我的本地ecal.ini 配置如下
[network] network_enabled = true multicast_group = 239.0.0.1 multicast_mask = 0.0.0.15 multicast_port = 14000 multicast_ttl = 2 multicast_sndbuf = 5242880 multicast_rcvbuf = 5242880

Host1 和Host2 之间用ecal_sample_person_snd 和 ecal_sample_person_rec 测试是可以通信的。

我的测试指令如下:
Host1
./install/performance_test/lib/performance_test/perf_test -c ECAL_PROTO --msg Array1k -p 0 -s 1 --roundtrip-mode Relay
Host2
./install/performance_test/lib/performance_test/perf_test -c ECAL_PROTO --msg Array1k -p 1 -s 0 --roundtrip-mode Main

执行后在Host1中samples recv 为一直0,请问还是有哪里没有配置正确吗?
期待您的回复,感谢!

@ZhenshengLee
Copy link
Owner

我的本地ecal.ini 配置如下
[network] network_enabled = true multicast_group = 239.0.0.1 multicast_mask = 0.0.0.15 multicast_port = 14000 multicast_ttl = 2 multicast_sndbuf = 5242880 multicast_rcvbuf = 5242880

配置没问题

Host1 和Host2 之间用ecal_sample_person_snd 和 ecal_sample_person_rec 测试是可以通信的。

先测试sample的思路是正确的

我的测试指令如下: Host1 ./install/performance_test/lib/performance_test/perf_test -c ECAL_PROTO --msg Array1k -p 0 -s 1 --roundtrip-mode Relay Host2 ./install/performance_test/lib/performance_test/perf_test -c ECAL_PROTO --msg Array1k -p 1 -s 0 --roundtrip-mode Main

执行后在Host1中samples recv 为一直0,请问还是有哪里没有配置正确吗?

我添加eCAL支持的时候没测试过这个命令,所以不确定该功能是否开发完成

你这边测试有问题,我会找个时间复现下这个故障

建议你先测试其他中间件plugin,比如FastRTPS的这个,这个是原生的, Apex.ai开发的

Apex.ai的原始库也更新了,你也可以下载原始库测试下,https://gitlab.com/ApexAI/performance_test

谢谢!

@ZhenshengLee ZhenshengLee added bug Something isn't working and removed documentation Improvements or additions to documentation labels Nov 16, 2022
@ZhenshengLee ZhenshengLee added this to the Backlog milestone Nov 16, 2022
@zqlibo
Copy link
Author

zqlibo commented Nov 20, 2022

您好,我发现在eCAL protobuf或者FastDDS进行跨主机通信测试中, 加上中继模式的参数后,接收端的samples中recv 一直为0 ,不加下面的参数可以进行跨主机通信,并且samples中recv可以显示,请问这个是什么原因呢?

# On the main machine 
perf_test <options> --roundtrip-mode Main 
 
# On the relay machine: 
perf_test <options> --roundtrip-mode Relay 

@ZhenshengLee
Copy link
Owner

您好,我发现在eCAL protobuf或者FastDDS进行跨主机通信测试中, 加上中继模式的参数后,接收端的samples中recv 一直为0

this has been confirmed in the branch of legacy/foxy and should happen in all outdoor/* branch.

@ZhenshengLee
Copy link
Owner

不加下面的参数可以进行跨主机通信,并且samples中recv可以显示

That's been confirmed in all branches, and can be used to test the packet lost experiment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants