Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Performance tuning

1,265 bytes removed, 15:49, 3 August 2007
no edit summary
This page describes how to do correct improve performance measurements on of OpenVZ system.
= Test conditions HW node environment tuning =
== kernels with different versions Disable unnecessary services ==* If you want to compare performance of the kernel on different hosts, or measure OpenVZ performance overhead, it's strongly recommended to compare the same kernel version with similar .config file and on the same linux distribution.
* If you compare kernels with different versions, please check Disable all .config options default services that are differ, especially _DEBUG_ optionsyou do not need to use and then reboot your host. For example, on unixbench pipe throughput test on 2.6.18 kernel, disabled CONFIG_DEBUG_HIGHMEM option will increase performance up to <font color=red>20%</font>
== running services ==
* Before performing test measurement, you should disable '''all''' default services in your runlevel and then '''reboot''' your host.
It is not enough to just stop servicesFor example, because some services, like the <code>audit</code> will affect performance even if the daemon is already stopped. For some unixbench tests it can be significantly decrease performance of linux kernel system calls (up to ~<font color=red>~20%</font> overhead ) even if you do not use any audit rules, or even if <code>auditd</code> was started once on a you just stopped this service without host before reboot.!
On RedHat distributions use <code>chkconfig</code> or <code>ntsysv</code> utility to disable default services. (<code>rc-update</code> in Gentoo, <code>update-rc.dv</code> for Debian)
== filesystem tests ==* If you perform filesystem testsTo setup default services, please keep use <code>chkconfig</code> or <code>ntsysv</code> in mind filesystem typeRedHat, block sizeor <code>rc-update</code> in Gentoo, mount options and so <code>update-rc.dv</code> on.Debian
For example, ext3 filesystem performance highly depends on journal type and mount options.== network checksumming ==('''TODO''')
* Also please always note/report IO-scheduler type. Different IO-schedulers can highly affect your tests results (up to <font color=red>30%</font>). Virtual Environment tuning =
If your kernel support different IO-schedulers, you can get/set the type here:== CPU distribution inside VE on SMP hosts ==
# cat /sys/block/hda/queue/* If the total number of VE's in your host is more than CPUs number, and there are many tasks running inside each VE, and they are scheduled quite often, it's better to give just one CPU for each VE. In this case the VirtualCPU-scheduler noop anticipatory deadline [cfq] # echo noop overhead can be significantly decreased, and overall performance can be increased up to ~<font color=red> 50-100%</sys/block/hda/queue/schedulerfont>!
== network isolation ==* You should disable local network/internet connection if your tests doesn't require it.To set the number of CPUs available inside VE use:
== CPU distribution inside VE on SMP hosts ==* If the number of VE's in your host is more than CPUs number, and there are many tasks/tests running inside each VE, and tasks are scheduled quite often, it's better to give just one CPU for each VE. In this case the VirtualCPU # vzctl set $VEID -scheduler performance overhead can be significantly decreased, and performance can increase up to <font color=red>100%</font>!-cpus N
To set = Recompiling the number of CPUs available inside VE use:kernel =
# vzctl set $VEID --cpus N== Disable all unnecessary options ==
== network performance ==* please do not use file transferring utilities to test You can disable all <code>_DEBUG_</code> options in the network performancekernel, because the bottleneck of these tests is usually file system this can increase performance - not TCPup to ~<font color=red>20%</IP stackfont> on some applications.
== network checksumming ==* other options ('''TODO''')