Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Performance tuning

1,492 bytes added, 11:34, 19 September 2007
no edit summary
To setup default services, use <code>chkconfig</code> or <code>ntsysv</code> in RedHat, or <code>rc-update</code> in Gentoo, <code>update-rc.dv</code> on Debian
 
== Shell scripts performance improvement ==
 
To improve performance of small shell scripts, which spends a lot of time starting the shell binary itself (like the shell scripts test from the [http://www.tux.org/pub/tux/niemi/unixbench/ unixbench] package), you can set your <code>LANG</code> environment variable to <code>"C"</code>.
 
 
To see current settings, type
 
# locale
 
If you want to change it only for the current shell session, do:
 
# export LANG=C
 
If you want to change the default value, modify the <code>/etc/sysconfig/i18n</code> file.
 
 
If your default <code>LANG</code> environment variable was set to something like <code>en_US.UTF-8</code>, you can reduce shell (bash) startup time up to ~<font color=red>15%</font> with <code>LANG=C</code>.
= Virtual Environment tuning =
# vzctl set $VEID --cpus N
== network Network checksumming ==
('''TODO''')
 
== Shell scripts performance improvement ==
 
 
Please note, that on VE creation the default <code>LANG</code> value will be the same as in the HW node. So you can tune it in node (see [[#Shell scripts performance improvement] aaa]), or set it in VE the same way.
 
 
The second important thing is the locale cache. By default it is created by glibc rpm post install script and it can be up to 50 MBytes on some distributions. So on some VE templates it can be missed to save disk space. But you can always create it inside VE after VE creation by the following command (you must be the root user):
 
# build-locale-archive
 
And again, in some cases shell (bash) startup time can be reduced up to ~<font color=red>15%</font>.