xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* The data transfer speed between two VMs -- a comparison between Xen libvchan and SCP?
@ 2014-03-22 16:28 Bei Guan
  2014-03-24 12:25 ` George Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Bei Guan @ 2014-03-22 16:28 UTC (permalink / raw)
  To: xen-devel


[-- Attachment #1.1: Type: text/plain, Size: 2609 bytes --]

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?

[1] "The case for reconfigurable I/O channels"
http://www.freebsdlabs.com/~robert/papers/201203-resolve-reconfigurable-io.pdf

===========
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@192.168.160.226:/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@192.168.160.226:/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@192.168.160.226:/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

[-- Attachment #1.2: Type: text/html, Size: 6387 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: The data transfer speed between two VMs -- a comparison between Xen libvchan and SCP?
  2014-03-22 16:28 The data transfer speed between two VMs -- a comparison between Xen libvchan and SCP? Bei Guan
@ 2014-03-24 12:25 ` George Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: George Dunlap @ 2014-03-24 12:25 UTC (permalink / raw)
  To: Bei Guan; +Cc: xen-devel

On Sat, Mar 22, 2014 at 4:28 PM, Bei Guan <gbtju85@gmail.com> wrote:
> 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?
>
> [1] "The case for reconfigurable I/O channels"
> http://www.freebsdlabs.com/~robert/papers/201203-resolve-reconfigurable-io.pdf

I think your best bet is to cc the authors of the paper with that
question, and see if they can give you any insight.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-24 12:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-22 16:28 The data transfer speed between two VMs -- a comparison between Xen libvchan and SCP? Bei Guan
2014-03-24 12:25 ` George Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).