WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms...
Transcript of WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms...
![Page 1: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/1.jpg)
Investigation�of�High-Efficient�Transfer�Mechanisms�for�SCA�4.1
Yu�Zhao,�Li�Zhou,�Qi�Tang,�Dongtang Ma,�Haitao Zhao,�Shan�Wang,�Jibo Wei
National�University�of�Defense�Technology
Changsha,�China
May�17,�2017
![Page 2: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/2.jpg)
Outline
Introduction
Implementation of transfer mechanisms
Efficiency comparison
KD-RPC
Conclusion
![Page 3: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/3.jpg)
SCA 4.1SCA 2.2.2
Introduction
![Page 4: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/4.jpg)
Introduction
Transfer mechanism
MiddlewareOther transports and technologies
ORB RPC MOM …
Omni ORBTAO Microsoft
RPCZeroMQ
RabbitMQ
Shared Memory
Message QueuesSOAP MHALPOSIX
socket
Binder
![Page 5: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/5.jpg)
Implementation of Binder
Binder — RPC in Android platform.
One-time copy technique
Credible identity verification
Centralized system only
![Page 6: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/6.jpg)
Step 1: Client obtains the interface of Server from Proxy;
Step 2: Proxy wraps the method and parameters specified by Client and sends it to Binder Driver;
Step 3: Server continually reads from Binder Driver and unwraps the Parcel addressed to itself;
Step 4: Execute and return.
Implementation of Binder
![Page 7: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/7.jpg)
Implementation of ZeroMQ
24 APIs Multiple protocols
IPC, TCP, in-processMultiple communication modes
pair, pub-sub, req-rep, push-pullMultiple languages
C, C++, Java, .NET, Python Cross-platform
Linux, Windows, OS X Run as a library
![Page 8: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/8.jpg)
Implementation of ZeroMQ
![Page 9: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/9.jpg)
Outline
Introduction
Implementation of transfer mechanisms
Efficiency comparison
KD-RPC
Conclusion
![Page 10: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/10.jpg)
Efficiency analysis
Encoding Data formatting Serialization Data Checking
Transfer function Message queue Shared memory TCP Socket
Others System schedule Thread management
![Page 11: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/11.jpg)
Test environment and methods
General SDR Platform ZLSDR-1000
Baseband chip: ZYNQ 7030 SoC CPU: dual-core ARM Cortex-A9 Frequency: 667MHz;
FPGA: Kintex-7 logic cell: 125K; DSP slices: 400 BARM: 1MB
Memory size: 1GB
OS: Linux 3.17
![Page 12: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/12.jpg)
T1=clock_gettime() T2=clock_gettime()
Transfer delay = (T2-T1) /1000000
T1: the first time of sending T2: the 1000000th time of receiving
Monte Carlo simulation of 500 trials
Test environment and methods
![Page 13: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/13.jpg)
ResultsTransfer delay of omniORB, Binder and ZeroMQ
Packet size: 1024 bytes The number of components
varies from 2 to 10
The delay of ZeroMQ is 1/5 of binder and 1/7 of omniORB.
Transfer delay increases almost linearly with the number of components.
Parameters
Results
![Page 14: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/14.jpg)
The number of components is 2 Packet size varies from 1024 to
8192 bytes
The delay of ZeroMQ is 1/3 of omniORB when packet size is larger than 1024 bytes.
The delay of Binder is similar to omniORB when packet size is larger than 4096 bytes.
ResultsTransfer delay of omniORB, Binder and ZeroMQ
Parameters
Results
![Page 15: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/15.jpg)
Transfer delay between ZeroMQ-TCP and low-level transfer functions
Packet size: 1024 bytes The number of components varies
from 2 to 10
The delay of ZeroMQ is 5.6 times of TCP socket.
The efficiency of Message Queue is similar to TCP socket
Results
Parameters
Results
![Page 16: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/16.jpg)
ResultsTransfer delay between ZeroMQ-TCP and low-level transfer functions
The number of components is 2 Packet size varies from 128 to
8192 bytes
Parameters
When packet size is smaller than 1024 bytes, the delays remain almost constant.
More delays occur when packet size exceed 1024 bytes
Results
![Page 17: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/17.jpg)
Outline
Introduction
Implementation of transfer mechanisms
Efficiency comparison
KD-RPC
Conclusion
![Page 18: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/18.jpg)
KD-RPC
Hierarchical Structure of KD-RPC
Main features
Based on RPC
Self-adaptive and pluggable transfer functions
Self-defined frame structure and serialization approach
![Page 19: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/19.jpg)
KD-RPC Tests
128 256 512 1024 4096 8192
TCP socketVM 0.344 0.349 0.379 0.477 0.825 1.660
ARM 2.350 2.526 2.862 3.872 10.52 20.12
KD-RPCVM 3.877 4.558 4.457 4.969 7.046 11.62
ARM 69.05 72.76 79.01 90.20 157.6 257.4
omniORBVM 48.49 49.65 47.46 48.26 48.15 55.43
ARM 140.6 141.4 155.1 157.4 159.3 215.9
VM Linux Ubuntu 4.2 Intel 3.2 GHz dual-core
processor 1 GB RAM
ZLSDR-1000
KD-RPC performs not good as omniORB in ZLSDR-1000 when packet size is larger than 4096bytes
Testbeds
Performance degradation
Packet size (bytes)
![Page 20: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/20.jpg)
Averagely, the efficiency of KD-RPC improves by 18.24%compared with Binder, and 42.68% compared with omniORB.
The number of components: 2 Packet size: 1024 bytes
Comparison with KD-RPC
Parameters
Results
![Page 21: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/21.jpg)
ZeroMQ achieves better performance compared with Binder and OmniORB.
Encapsulation of low level transfer functions worse the efficiency more than 10 times.
Averagely, the efficiency of KD-RPC improves by 18.24% compared with Binder, and 42.68% compared with omniORB
There is a tradeoff between universality and efficiency.
Conclusion
![Page 22: WInn Comm Eurpoe 2017 Yu Zhao-slides · Introduction Implementation of transfer mechanisms Efficiency comparison KD-RPC Conclusion. SCA 2.2.2 SCA 4.1 Introduction. Introduction Transfer](https://reader034.fdocuments.us/reader034/viewer/2022042806/5f6e1f978a463d52ad494427/html5/thumbnails/22.jpg)
Thank�you!
谢谢!