OpenVZ uses a configuration file for each container to manage system resources. Usually, these configuration files are stored in the /etc/vz/conf directory with the naming format as [VEID].conf.
Here are some settings that you can adjust to manage resources:
1. CPU Units: OpenVZ uses a CPU scheduler to distribute CPU time among containers. You can define the CPU units for a container in its configuration file. The ‘cpuunits’ parameter is used for that.
1. CPU Limit: You can specify the CPU limit for a container that defines the maximum CPU usage for a container at any given moment, regardless of the CPU units assigned to it. The ‘cpulimit’ parameter is used for that.
1. Disk Quota: You can limit the total size of a container’s image file using the diskspace parameter.
1. RAM : You can limit the amount of guaranteed and maximum RAM a container can consume using ‘vmguarpages’ (guaranteed memory) and ‘oomguarpages’ (max memory).
1. Network Bandwidth: OpenVZ doesn’t directly manage networking resources, but you can use traffic shaping tools to do this.
Here’s how to adjust those settings:
1. Open the configuration file for the container. E.g., to edit the configuration for the container 101, do:
```
nano /etc/vz/conf/101.conf
```
1. Modify parameters as per your requirements. For example:
```
```
vzctl stop 101
vzctl set 101 —applyconfig vswap2g —save
vzctl start 101
```
Please note that specific settings and commands can vary depending on the specific version of OpenVZ. It’s best to refer to the official OpenVZ documentation for the most accurate instructions.