User Tools

Site Tools


openvz:hw-node-environment-tuning

HW node environment tuning

This page describes how to improve the performance of an OpenVZ system.

Disable unnecessary services

Disable all default services that you do not need to use and then reboot your host.

For example, the audit daemon can significantly decrease performance of linux kernel system calls (up to ~20%) even if you do not use any audit rules, or even if you just stopped this service without host reboot!

To setup default services, use

chkconfig

or

ntsysv

in RedHat, or

rc-update

in Gentoo,

update-rc.d

on Debian and Ubuntu

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 LANG environment variable to “C”.

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 /etc/default/locale file.

# nano /etc/default/locale
#LANG="en_US.UTF-8"
LANG="C"

If your default LANG environment variable was set to something like en_US.UTF-8, you can reduce shell (bash) startup time up to ~15% with LANG=C.

openvz/hw-node-environment-tuning.txt · Last modified: 2010-08-30 18:28 (external edit)