[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] The data transfer speed between two VMs -- a comparison between Xen libvchan and SCP?

  • To: xen-devel <Xen-devel@xxxxxxxxxxxxx>
  • From: Bei Guan <gbtju85@xxxxxxxxx>
  • Date: Sun, 23 Mar 2014 00:28:46 +0800
  • Delivery-date: Sat, 22 Mar 2014 16:29:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hi All,

I try to make a comparison between the Xen libvchan and SCP with respect to the data transfer speed between two co-located VMs. The following is what I have done.
1. I modify the code tools/libvchan/node.c to transfer a file between two PV DomUs. I set the buffer size to 2048, which is the data size writing into the shared ring every time. (Please refer to the line 78 in node.c)
2. I use the command "time" to get the rough time of transferring a file between two PV DomUs under the SCP and Xen libvchan. The size of the file to transfer is 50M, 100M, 500M. The test result is posted behind.

However, I find that the data transferred time does decrease much under the Xen libvchan when compared to the SCP. I also set the buffer size to 4096, 5000, 10000, and so on. The Xen libvchan doesn't show a better performance. It doesn't perform "around 30-40% faster than TCP for 4KB request sizes". (Like the paper[1] said.)

Is there any wrong with my test? How to show the advantage of the Xen libvchan? Or  say the advantage of the shared memory mechanism between Xen PV DomUs?

The test result:
The time to transfer a file under the Xen libvchan. (BufferSize is 2048)
The files testdata_50m, testdata_100m, testdata_500m are files with size of 50M, 100M and 500M, respectively.

# time ./node testdata_50m
real    0m2.795s
user    0m0.243s
sys    0m0.784s
# time ./node testdata_100m 
real    0m5.707s
user    0m0.196s
sys    0m1.943s
# time ./node testdata_500m 
real    0m28.680s
user    0m2.057s
sys    0m8.601s

The time to transfer a file under the SCP.
# time scp testdata_50m root@xxxxxxxxxxxxxxx:/root/tmp
testdata_50m                               100%   50MB  25.0MB/s   00:02    
real    0m2.326s
user    0m1.485s
sys    0m0.409s
# time scp testdata_100m root@xxxxxxxxxxxxxxx:/root/tmp
testdata_100m                              100%  100MB  20.0MB/s   00:05    
real    0m4.271s
user    0m2.815s
sys    0m0.811s
# time scp testdata_500m root@xxxxxxxxxxxxxxx:/root/tmp
testdata_500m                              100%  500MB  20.8MB/s   00:24    
real    0m24.641s
user    0m15.354s
sys    0m4.246s

From the time above, we can see that the time to transfer a file under Xen libvchan is larger than that under the SCP. Why it happened? Doesn't the Xen libvchan show a better performance?

Thank you for your time. I appreciate your any suggestions.

Best Regards,
Bei Guan
Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.