Comments (4)
通信量应该可以直接用流量统计的工具进行统计? 比如可以直接用iptables去监控从A机器到B机器的通信端口(默认应该是9370)流量
from fate.
通信量应该可以直接用流量统计的工具进行统计? 比如可以直接用iptables去监控从A机器到B机器的通信端口(默认应该是9370)流量
我采用standalone配置,在1.7.2版本中,FATE启动时会扫描9360和9380端口以保证他们没有被占有,有没有可能就是这两个端口模拟了两个参与方之间的通信呢?或许我只需要测量通过这两个端口之间的流量就可以了?
from fate.
standalone 模式,通信没有走grpc,上面两个端口测不到通信流量。如果测试流量的话,用集群模式部署。部署eggroll
from fate.
使用iptables监测host端发送往guest端9370端口的TCP流量。其中 192.168.40.172
是集群部署时 guest 端的ip地址,这条指令会将捕获到的包写入日志文件 /var/log/messages
中,并且在条捕获的流量信息中添加前缀 "Communication for DH PSI_16: "。然后我们构造大小为 2^16
的数据集,上传 dh_intersect
求交任务,即可捕获进行 2^16
大小集合求交时的通信量数据。
sudo iptables -I OUTPUT -p tcp -d 192.168.40.172 --dport 9370 -j LOG --log-prefix "Communication for DH PSI_16: "
捕捉完毕后,使用 awk
统计流量信息。该指令会找到包含了"Communication for DH PSI_16: "的每一行,然后求和len=xxx后的包长度值(以字节为单位),并输出。
grep "Communication for DH PSI_16: " /var/log/messages | awk '{split($0, arr, " "); for(i=1;i<=length(arr);i++) {if (arr[i] ~ /^LEN=/) {split(arr[i], lenArr, "="); sum += lenArr[2]}} } END {print "Total length: " sum}'
测量了dh_intersect
的通信量后,采用相同方法测试rsa_intersect
的通信量。不过需要先使用 sudo iptables -F OUTPUT
删除现有的过滤规则(可以使用 sudo iptables -L
查看已有过滤规则),再添加新的过滤规则:
sudo iptables -I OUTPUT -p tcp -d 192.168.40.172 --dport 9370 -j LOG --log-prefix "Communication for RSA PSI_16: "
只要每一次测量前删除所有过滤规则,并且每一次测量时日志文件中的前缀彼此不一致,就可以正确测量出通信量。
这里附上我测量的 dh_intersect
和 rsa_intersect
协议在不同数据集上进行求交运算的通信量(MB),根据前面的设置,这里测量的应该是host向guest单向发送的数据量大小。
协议名 | 2^12 | 2^14 | 2^16 | 2^18 |
---|---|---|---|---|
dh_intersect | 2.36 | 9.36 | 37.27 | 149.38 |
rsa_intersect | 2.47 | 9.81 | 39.15 | 156.5 |
from fate.
Related Issues (20)
- PSI 算法 HOT 1
- Fedkseed HOT 9
- 联邦学习发起方角色是否固定 HOT 3
- 如果我想对框架自定义的Dataframe的元素进行操作,该如何进行 HOT 1
- 求教关于改动源代码 HOT 3
- 一个困扰我很久的现象,不知道是什么原因 HOT 1
- import PipeLine,ModuleNotFoundError: No module named 'pipeline.backend' HOT 1
- 求教,关于集群代码的修改 HOT 1
- 关于bind一个csv格式的数据提交任务后报错 HOT 1
- 请问2.0.0的docker-compose.yml文件能用于2.1.0版本的吗? HOT 4
- 使用fate api提交任务异常 HOT 1
- FATE-2.0.0和FATE-2.1.0提供的LR(train_lr.yaml)模板运行到”lr-0“就运行不下去了 HOT 5
- 线性回归模型使用Evaluation处,传递几个参数,但实际显示只有rmse,请问这是什么原因 HOT 1
- 当前Fate支持隐私查询吗?或者有计划支持吗? HOT 1
- 关于内置的DataFrame HOT 3
- 我在单机版中试图调试PSI,目前遇到问题。 HOT 2
- FATE2.0 中如何使用 torch_geometric 中提供的 Dataset HOT 3
- 首页给的demo跑不通。查了源码,是不是demo过时了? HOT 3
- 关于_table类型的一个内置方法的问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fate.