Cannot allocate memory [message #42626] |
Sat, 07 May 2011 19:27  |
|
I have created a new centos-5-x86_64-minimal VPS.
When i try enter, i get error
[root@server12 ~]# vzctl enter 233
entered into CT 233
-bash: /etc/profile: Cannot allocate memory
-bash: /root/.bash_profile: Cannot allocate memory
-bash-3.1#
-bash-3.1# free -m
-bash: start_pipeline: pgrp pipe: Cannot allocate memory
-bash: free: command not found
-bash-3.1#
I have another Ubuntu VPS on this server, that work properly. I stop Ubuntu VPS and start this new CentOS VPS as both use same IP. Only CentOS VPS give this Memory error.
VPS configuration for CentOS VPS is
[root@server12 ~]# cat /etc/vz/conf/233.conf
# Copyright (C) 2000-2009, Parallels, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
ONBOOT="no"
# UBC parameters (in form of barrier:limit)
KMEMSIZE="60000000:60000000"
LOCKEDPAGES="256:256"
PRIVVMPAGES="900000:900000"
SHMPAGES="21504:21504"
NUMPROC="1000:1000"
PHYSPAGES="0:9223372036854775807"
VMGUARPAGES="33792:9223372036854775807"
OOMGUARPAGES="26112:9223372036854775807"
NUMTCPSOCK="500:500"
NUMFLOCK="188:206"
NUMPTY="16:16"
NUMSIGINFO="256:256"
TCPSNDBUF="20000000:35000000"
TCPRCVBUF="20000000:35000000"
OTHERSOCKBUF="1126080:2097152"
DGRAMRCVBUF="262144:262144"
NUMOTHERSOCK="360:360"
DCACHESIZE="3409920:3624960"
NUMFILE="9312:9312"
AVNUMPROC="180:180"
NUMIPTENT="128:128"
# Disk quota parameters (in form of softlimit:hardlimit)
DISKSPACE="104857600:115343360"
DISKINODES="25000000:30000000"
QUOTATIME="0"
# CPU fair sheduler parameter
CPUUNITS="1000"
VE_ROOT="/vz/root/$VEID"
VE_PRIVATE="/vz/private/$VEID"
OSTEMPLATE="centos-5-x86_64-minimal"
ORIGIN_SAMPLE="basic"
IP_ADDRESS="174.36.130.247"
HOSTNAME="alex.localhost"
NAMESERVER="8.8.8.8"
[root@server12 ~]#
free -m on node (server that hosts vps)
[root@server12 ~]# free -m
total used free shared buffers cached
Mem: 7972 7850 121 0 128 6348
-/+ buffers/cache: 1373 6598
Swap: 1027 0 1027
[root@server12 ~]#
OS/kernal
[root@server12 ~]# cat /etc/*release
Red Hat Enterprise Linux Server release 5.6 (Tikanga)
[root@server12 ~]# uname -a
Linux server12.hosthat.com 2.6.18-238.5.1.el5.028stab085.5 #1 SMP Thu Apr 14 15:42:34 MSD 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@server12 ~]#
This is a bug or CentOS (centos-5-x86_64-minimal) need memory run than Ubuntu VPS (ubuntu-10.04-x86_64) ?
Anyone know how to fix this ?
|
|
|
Re: Cannot allocate memory [message #42627 is a reply to message #42626] |
Sat, 07 May 2011 19:38   |
|
/proc/user_beancounters also not showing
[root@server12 ~]# vzctl exec 233 cat /proc/user_beancounters
cat: /proc/user_beancounters: Cannot allocate memory
[root@server12 ~]#
|
|
|
|
Re: Cannot allocate memory [message #42637 is a reply to message #42629] |
Sun, 08 May 2011 07:30   |
|
I tried that, still not working.
I created a CentOS 32 bit and Fedora 14 32 bit, both worked fine with out any memory error. On CentOS 32 bit VPS, i am able to install XFCE, Opera and VNC server, so i don't think it is a memory issue.
|
|
|
|
Re: Cannot allocate memory [message #42640 is a reply to message #42638] |
Sun, 08 May 2011 14:49  |
|
Here is the result for 'cat /proc/bc/233/resources'
[root@server12 ~]# cat /proc/bc/233/resources
kmemsize 3708532 4169627 60000000 60000000 0
lockedpages 0 0 256 256 0
privvmpages 380 1319 900000 900000 0
shmpages 1 1 21504 21504 0
numproc 2 7 1000 1000 0
physpages 269 973 0 9223372036854775807 0
vmguarpages 0 0 33792 9223372036854775807 0
oomguarpages 269 973 26112 9223372036854775807 0
numtcpsock 0 0 500 500 0
numflock 0 1 188 206 0
numpty 0 1 16 16 0
numsiginfo 0 2 256 256 0
tcpsndbuf 0 0 20000000 35000000 0
tcprcvbuf 0 0 20000000 35000000 0
othersockbuf 4656 5960 1126080 2097152 0
dgramrcvbuf 0 0 262144 262144 0
numothersock 2 4 360 360 0
dcachesize 3408570 3413265 3409920 3624960 38
numfile 34 111 9312 9312 0
numiptent 20 20 128 128 0
swappages 0 0 9223372036854775807 9223372036854775807 0
[root@server12 ~]#
vzcalc for the vps if that helps
[root@server12 sbin]# vzcalc -v 233
Resource Current(%) Promised(%) Max(%)
Low Mem 0.11 3.96 3.96
Total RAM 0.06 n/a n/a
Mem + Swap 0.05 2.54 n/a
Alloc. Mem 0.06 2.87 40.47
Num. Proc 0.00 n/a 0.72
--------------------------------------------
Memory 0.11 3.96 40.47
[root@server12 sbin]#
[root@server12 sbin]# vzcpucheck
Current CPU utilization: 3000
Power of the node: 478753
[root@server12 sbin]#
|
|
|