Resource issues [message #44637] |
Mon, 19 December 2011 05:30 ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
viniciusmunich
Messages: 4 Registered: December 2011 Location: Boston, MA
|
Junior Member |
|
|
Hello, I'm having some trouble allocating resources using openvz. It simply ignores memory limits, and does not allocate the CPU correctly.
Below are some details:
[root@skywalker ~]# vzcpucheck
Current CPU utilization: 10064
Power of the node: 1276960
On host:
[root@skywalker ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6385.84
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 3201.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 3
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 6
initial apicid : 6
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 4
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 5
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 3
initial apicid : 3
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 6
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 5
initial apicid : 5
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 7
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 1600.000
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 3
cpu cores : 4
apicid : 7
initial apicid : 7
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
Note: I do not know why in some nuclei is shown 1600MHz.
Now in virtual machine 101 .. :
[root@skywalker ~]# vzctl enter 101
entered into CT 101
root@aurora [/]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 179.595
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 0
cpu cores : 4
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6385.84
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 359.190
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 1
cpu cores : 4
apicid : 2
initial apicid : 2
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi flexpriority ept vpid
bogomips : 6384.67
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 2
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
stepping : 7
cpu MHz : 314.061
cache size : 8192 KB
physical id : 0
siblings : 8
core id : 2
cpu cores : 4
apicid : 4
initial apicid : 4
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm sse4_1 sse4_2 x2apic popcnt xsave avx lahf_lm ida arat epb xsaveopt pln pts tpr_shadow vnmi
...
|
|
|
Re: Resource issues [message #44639 is a reply to message #44637] |
Mon, 19 December 2011 08:29 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
Paparaciz
Messages: 302 Registered: August 2009
|
Senior Member |
|
|
for memory settings please read this article:
http://wiki.openvz.org/Vswap
on rhel6 based kernel you set memory limit with physpages parameter
take a look to ve-vswap-*.conf-sample config files
about cpu
You have set some with cpulimit and maybe other cpu related parameters
if you want set it to unlimited set --cpulimit 0
if you have more questions please paste CT config file
|
|
|
Re: Resource issues [message #44640 is a reply to message #44639] |
Mon, 19 December 2011 08:54 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
viniciusmunich
Messages: 4 Registered: December 2011 Location: Boston, MA
|
Junior Member |
|
|
Paparaciz, thank you for your reply.
When I set CPU Units to be 0, I received this error:
[root@skywalker conf]# vzctl restart 101
Warning at /etc/vz/conf/101.conf:36: invalid value for CPUUNITS ("0"), skipped
Restarting container
Stopping container ...
Container was stopped
Container is unmounted
Starting container ...
Container is mounted
Adding IP address(es): 216.245.217.125 216.245.217.126 64.31.32.133 64.31.32.134
Setting CPU limit: 90
Setting CPU units: 1000
Setting CPUs: 8
Container start in progress...
"Setting CPU units: 1000"
My CT file:
##############################################
## SIMUZO OpenVZ Default Configuration File ##
##############################################
ONBOOT="yes"
# UBC parameters (in form of barrier:limit)
KMEMSIZE="2147483647:2147483647"
LOCKEDPAGES="999999:999999"
PRIVVMPAGES="792576"
SHMPAGES="792576"
NUMPROC="32567:32567"
PHYSPAGES="0:2147483647"
VMGUARPAGES="792576"
OOMGUARPAGES="792576"
NUMTCPSOCK="7999992:7999992"
NUMFLOCK="999999:999999"
NUMPTY="255:255"
NUMSIGINFO="1024:1024"
NUMSIGINFO="1024:1024"
TCPSNDBUF="214748160:396774400"
TCPRCVBUF="214748160:396774400"
OTHERSOCKBUF="214748160:396774400"
DGRAMRCVBUF="214748160:396774400"
NUMOTHERSOCK="7999992:7999992"
DCACHESIZE="2147483647:2147483647"
NUMFILE="23999976:23999976"
AVNUMPROC="180:180"
NUMIPTENT="999999:999999"
# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="419430400:419430400"
DISKINODES="48000000:48000000"
QUOTATIME="0"
# CPU fair sheduler parameter
CPUUNITS="0"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos-5-x86_64"
ORIGIN_SAMPLE="vps.basic"
IP_ADDRESS="xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx"
HOSTNAME="hostname"
NAMESERVER="208.115.254.242 208.115.254.250"
QUOTAUGIDLIMIT="10000"
IOPRIO="0"
CPULIMIT="90"
CPUS="8"
When I set CPUS=4
Total processors: 4
Processor #1
Vendor
GenuineIntel
Name
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Speed
359.190 MHz
Cache
8192 KB
Processor #2
Vendor
GenuineIntel
Name
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Speed
359.190 MHz
Cache
8192 KB
Processor #3
Vendor
GenuineIntel
Name
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Speed
359.190 MHz
Cache
8192 KB
Processor #4
Vendor
GenuineIntel
Name
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Speed
359.190 MHz
Cache
8192 KB
CPUS=2
Total processors: 2
Processor #1
Vendor
GenuineIntel
Name
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Speed
1438.602 MHz
Cache
8192 KB
Processor #2
Vendor
GenuineIntel
Name
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Speed
719.301 MHz
Cache
8192 KB
CPUS=1
Total processors: 1
Processor #1
Vendor
GenuineIntel
Name
Intel(R) Xeon(R) CPU E31230 @ 3.20GHz
Speed
1438.602 MHz
Cache
8192 KB
I cannot understand..
[Updated on: Mon, 19 December 2011 09:07] Report message to a moderator
|
|
|
Re: Resource issues [message #44642 is a reply to message #44639] |
Mon, 19 December 2011 09:05 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) ![Go to next message Go to next message](/theme/ovz3/images/down.png) |
Paparaciz
Messages: 302 Registered: August 2009
|
Senior Member |
|
|
I said cpulimit, not cpuunits
in your config you are setting limit 90
please take a note, that to calculate cpulimit you have to sum all cores which you give for CT
so if you have 8 cores cpu all power is 800%
8cores*100% = 800
if you want that CT don't use more than 50% of cpu you have to set it to 400
with limit 90 you set ~10% of cpu power.
if you set for CT 2 cores (--cpus X)
than to calculate limits you need to sum: 2cores*100%=200%
with limit 90 it would be little bit less than 50%
|
|
|
|
|
Re: Resource issues [message #44646 is a reply to message #44644] |
Mon, 19 December 2011 09:49 ![Go to previous message Go to previous message](/theme/ovz3/images/up.png) |
viniciusmunich
Messages: 4 Registered: December 2011 Location: Boston, MA
|
Junior Member |
|
|
Thanks again,
I set using the commands:
vzctl set VMID --swappages: XXXXM --save
vzctl set VMID ---physpages: XXXXM --save
Problem solved =)
|
|
|