Hi.
I have performance problems with IBM DB2 10.5 server on KVM guest:
[db2inst1@wc8ws-auth ~]$ time db2 create db test
DB20000I The CREATE DATABASE command completed successfully.
real 7m46.155s
user 0m0.022s
sys 0m0.027s
It takes 30 seconds to create a database on an image mounted with -oloop.
I think it's because db2 uses O_DIRECT to ensure consistency. I also think that
O_DIRECT is not propagated to host with default cache modes in VM settings. The real
problem is: when guest writes data in small blocks, host CPU becomes a bottleneck.
I hava a relatively old 24-core Xeon. Host `top` shows 130% CPU usage by qemu-kvm, when I
run the following command:
[root@wc8ws-auth ~]# </dev/zero timeout -sINT 30s dd iflag=fullblock oflag=direct
conv=notrunc of=./bigfile bs=8192
140384+0 records in
140384+0 records out
1150025728 bytes (1.2 GB) copied, 29.9992 s, 38.3 MB/s
I tried all buses, cache modes and IO modes; "Cache mode=none" is slower, others
are almost equal.
I moved from image file to LVM. This raised the speed from 16M to 38M.
I also tried VirtualBox, but it's neither faster, nor slower, and it eats CPU too.
--
--------------------------------------------------------------------------------
Kind regards,
Ilya Basin
software engineer
Reksoft
Skype: basin_ilya
phone +7(812)324-24-40*553
Show replies by date