the perfomance of lxc is not better than kvm+virtio
As we all known the performance of lxc is near to native. I do a iozone test to compare the performance of lxc, kvm and kvm+virtio. Howerver,i find kvm+virtio has the best performance。
All test enviroment is use the same configuration as vcpu=4 and memory=2G
The results as follows
I don't understand why it is, please give me some help to explain this result.
_______________________________________________
Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
1. Have you used separate small partition for benchmarking? Disk performance varies about 2x times across the plate....
2. 596 and even 700MB/sec makes me think you measure not real disk I/O, but memory (cache).
3. iozone is not a trustable benchmark, it really sucks.
4. VMs may have wrong time flow inside the guest which may be slower then real wall clocks. So it takes sometimes "less" time for benchmark to complete and obviously performance results "faster".
5. VMs and containers are comparable on 1 rotational HDD. VM overhead becomes much more visible on fast SSD or SAN drives where performance can get as high as >1GB/sec.
Thanks,
Kirill
Quoted 5 lines · cmcc.dylan
As we all known the performance of lxc is near to native. I do a iozone test to compare the performance of lxc, kvm and kvm+virtio. Howerver,i find kvm+virtio has the best performance。
All test enviroment is use the same configuration as vcpu=4 and memory=2G
The results as followsI don't understand why it is, please give me some help to explain this result.<iozone.png><ATT00001.c>
_______________________________________________
Containers mailing list Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
Thanks Kirill!
Quoted 2 lines
1. Have you used separate small partition for benchmarking? Disk performance varies about 2x times across the plate....
Because i'am still a novice in LXC, so what does your exactly means about "used separate small partition for benchmarking"? Do you mean the rootfs of container mounted in a separate partition?
In my experiment, i use iozone test case of the phoronix test suite and i create a lxc instance use the xml config file as follows:
<domain type="lxc">
<name>ubuntu_lxc</name>
<memory>2048576</memory>
<os>
<type>exe</type>
<init>/sbin/init</init>
</os>
<vcpu>4</vcpu>
<clock offset="utc"/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<emulator>/usr/lib/libvirt/libvirt_lxc</emulator>
<filesystem type="mount">
<source dir="/var/lib/lxc/my-container/rootfs"/>
<target dir="/"/>
</filesystem>
<interface type='bridge'>
<source bridge='kvmbr0'/>
<mac address='00:11:22:34:34:34'/>
</interface> <console type="pty"/>
</devices>
</domain>
Quoted 1 line
2. 596 and even 700MB/sec makes me think you measure not real disk I/O, but memory (cache).
i'm also think this is a results due to cache, for example page cache in the host os. Do you have some ideas bypassing memory cache?
Quoted 2 lines
3. iozone is not a trustable benchmark, it really sucks.
Is there benchmark better than iozone and can you give me some advice for io benchmark?
Quoted 3 lines
4. VMs may have wrong time flow inside the guest which may be slower then real wall clocks. So it takes sometimes "less" time for benchmark to complete and obviously performance results "faster".
5. VMs and containers are comparable on 1 rotational HDD. VM overhead becomes much more visible on fast SSD or SAN drives where performance can get as high as >1GB/sec.
I think the speed of io is the key factor that affects the vm's performance, is that right? Thanks for your help again!
Quoted 8 lines · At 2012-09-06 17:27:24,"Kirill Korotaev" <[email protected]> wrote:
1. Have you used separate small partition for benchmarking? Disk performance varies about 2x times across the plate....
2. 596 and even 700MB/sec makes me think you measure not real disk I/O, but memory (cache).
3. iozone is not a trustable benchmark, it really sucks.
4. VMs may have wrong time flow inside the guest which may be slower then real wall clocks. So it takes sometimes "less" time for benchmark to complete and obviously performance results "faster".
Quoted 14 lines
5. VMs and containers are comparable on 1 rotational HDD. VM overhead becomes much more visible on fast SSD or SAN drives where performance can get as high as >1GB/sec.
Thanks,
KirillQuoted 5 lines · cmcc.dylan
As we all known the performance of lxc is near to native. I do a iozone test to compare the performance of lxc, kvm and kvm+virtio. Howerver,i find kvm+virtio has the best performance。
All test enviroment is use the same configuration as vcpu=4 and memory=2G
The results as followsI don't understand why it is, please give me some help to explain this result.<iozone.png><ATT00001.c>
_______________________________________________
Containers mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/containers
Quoted 6 lines · cmcc.dylan
Quoted 3 lines
Quoted 3 lines
2. 596 and even 700MB/sec makes me think you measure not real disk I/O, but memory (cache).
i'm also think this is a results due to cache, for example page cache in the host os. Do you have some ideas bypassing memory cache?
Check your kvm command line. IIRC, KVM has a fully-cached mode of operation. Writes to guest "disk" will not actually reach the disk for a while. While this is nice, this is an unfair comparison from a benchmark PoV, because of you are, of course, trading away a bit of your data-safety. It is still safe against guest power-off, but not necessarily against host power-off. Also, since there is no magic, this can hurt you in very dense scenarios.
The "-drive" parameter will probably have a "cache" specifier, which is what you are looking for.
Quoted 3 lines
Quoted 2 lines
3. iozone is not a trustable benchmark, it really sucks.
Is there benchmark better than iozone and can you give me some advice for io benchmark?
I'd prefer fio (http://git.kernel.org/?p=linux/kernel/git/axboe/fio.git;a=summary)
-zyh
Quoted 27 lines
Quoted 3 lines
4. VMs may have wrong time flow inside the guest which may be slower then real wall clocks. So it takes sometimes "less" time for benchmark to complete and obviously performance results "faster".
5. VMs and containers are comparable on 1 rotational HDD. VM overhead becomes much more visible on fast SSD or SAN drives where performance can get as high as >1GB/sec.
I think the speed of io is the key factor that affects the vm's performance, is that right? Thanks for your help again!
Quoted 20 lines · At 2012-09-06 17:27:24,"Kirill Korotaev" <[email protected]> wrote:
1. Have you used separate small partition for benchmarking? Disk performance varies about 2x times across the plate....
2. 596 and even 700MB/sec makes me think you measure not real disk I/O, but memory (cache).
3. iozone is not a trustable benchmark, it really sucks.
4. VMs may have wrong time flow inside the guest which may be slower then real wall clocks. So it takes sometimes "less" time for benchmark to complete and obviously performance results "faster".
5. VMs and containers are comparable on 1 rotational HDD. VM overhead becomes much more visible on fast SSD or SAN drives where performance can get as high as >1GB/sec.
Thanks,
KirillQuoted 4 lines · cmcc.dylan
As we all known the performance of lxc is near to native. I do a iozone test to compare the performance of lxc, kvm and kvm+virtio. Howerver,i find kvm+virtio has the best performance。
All test enviroment is use the same configuration as vcpu=4 and memory=2G
The results as follows
Quoted 6 lines
Quoted 2 lines
Quoted 1 line
I don't understand why it is, please give me some help to explain this result.<iozone.png><ATT00001.c>
_______________________________________________
Containers mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/containers