Java: Expected overhead of the rmi protocol
Within my program I'm using two RMI servers, which provide different methods, to simulate a simple network protocol between two notebooks. From my trace log 开发者_如何学PythonI can see that the transmission time of a "packet" currently varies between 850 and 1100 ms.
Are the transmission times in the expected range? Is the overhead of the RMI protocol really that large?
BR,
Markus
No, the overhead of RMI is not that large. Your requests would typically have to be very big or your network really slow for that kind of response time.
One thing which causes RMI to slow down a lot is how you divide your data into several packets. For example at my work we once tested a setup where we sent events over RMI one by one, each event took about 35ms to get transferred. After that we tried to group buffer multiple events and sending them as a group and at around 20 000 events going at ~60ms we came to conclusion that while RMI doesn't have a lot of bandwidth overhead, the sending/receiving part may have.
精彩评论