[PVE-User] memory question

haoyun haoyun-kgq at 163.com
Sun May 29 10:46:34 CEST 2016


root at debian:~# df -h /dev/shm
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           970M  970M     0 100% /run/shm


root at debian:~# mount -o remount,size=4G /dev/shm


root at debian:/dev/shm# dd if=/dev/zero of=dd.img bs=1M count=3800
3800+0 records in
3800+0 records out
3984588800 bytes (4.0 GB) copied, 2.16686 s, 1.8 GB/s


root at debian:/dev/shm# df -h /dev/shm
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           4.0G  3.8G  296M  93% /run/shm
You're right,thank you very much!
==============================================================

actually,my question is :
I run java application in vm,app does not started,I found app report error by search log,as below:
root at debian:/data/dubbo# /data/dubbo/start.sh
root at debian:/data/dubbo# tail dubbo.2016-05-29-16.out
2016-05-29 16:27:48.191  WARN org.springframework.aop.framework.CglibAopProxy:doValidateClass(259) - Unable to proxy method [public final org.springframework.orm.hibernate3.HibernateTemplate org.springframework.orm.hibernate3.support.HibernateDaoSupport.getHibernateTemplate()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2016-05-29 16:27:48.191  WARN org.springframework.aop.framework.CglibAopProxy:doValidateClass(259) - Unable to proxy method [public final org.hibernate.SessionFactory org.springframework.orm.hibernate3.support.HibernateDaoSupport.getSessionFactory()] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2016-05-29 16:27:48.192  WARN org.springframework.aop.framework.CglibAopProxy:doValidateClass(259) - Unable to proxy method [public final void org.springframework.orm.hibernate3.support.HibernateDaoSupport.setHibernateTemplate(org.springframework.orm.hibernate3.HibernateTemplate)] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
2016-05-29 16:27:48.192  WARN org.springframework.aop.framework.CglibAopProxy:doValidateClass(259) - Unable to proxy method [public final void org.springframework.dao.support.DaoSupport.afterPropertiesSet() throws java.lang.IllegalArgumentException,org.springframework.beans.factory.BeanInitializationException] because it is final: All calls to this method via a proxy will be routed directly to the proxy.
10.163: [GC [PSYoungGen: 680437K->44400K(764608K)] 680437K->44400K(2512256K), 0.0721550 secs] [Times: user=0.09 sys=0.01, real=0.08 secs] 
2016-05-29 16:27:51.265  INFO org.springframework.context.support.DefaultLifecycleProcessor:start(334) - Starting beans in phase 2147483647


I think No space left on memory when I see “GC [PSYoungGen”
so I began to test memory,but my test method is wrong.
thank you for your guidance.
I want to know,how to manually allocate memory by python


At 2016-05-28 20:33:33, "Thomas Lamprecht" <t.lamprecht at proxmox.com> wrote:
>
>
>On 28.05.2016 11:07, haoyun wrote:
>> hello,everyone~
>> I have a cluster with 2 physical machines,and they are pve4.2
>> my physical machine:
>> root at cna5:~# free
>>              total       used       free     shared    buffers     cached
>> Mem:      65674780   21937328   43737452      93316     166488    1534868
>> -/+ buffers/cache:   20235972   45438808
>> Swap:      8388604          0    8388604
>>
>>
>> my vm:
>> root at debian:~# free
>>              total       used       free     shared    buffers     cached
>> Mem:       4063488     124792    3938696          0      10664      39144
>> -/+ buffers/cache:      74984    3988504
>> Swap:       901116          0     901116
>> root at debian:~# cd /dev/shm
>> root at debian:/dev/shm# dd if=/dev/zero of=dd.img bs=1M count=3000
>> dd: writing `dd.img': No space left on device
>> 970+0 records in
>> 969+0 records out
>> 1016737792 bytes (1.0 GB) copied, 0.250504 s, 4.1 GB/s
>> root at debian:/dev/shm# free
>>              total       used       free     shared    buffers     cached
>> Mem:       4063488    1119324    2944164          0      10680    1032052
>> -/+ buffers/cache:      76592    3986896
>> Swap:       901116          0     901116
>>
>>
>> why?
>
>can you post the result of:
>df -h /dev/shm
>
>As readable in:
>https://www.kernel.org/doc/Documentation/filesystems/tmpfs.txt
>
>The tmpfs is half the size of the physical memory by default,
>so it can be full before the whole memory is used
>(this is security measure, read the link for more infos).
>
>
>So if it simply is full you may try to remount it bigger with:
>mount -o remount,size=8G /dev/shm
>
>Adapt size, but try to let enough free memory, the OOM (Out Of Memory) Killer
>cannot free tmpfs used memory and thus a to big tmpfs can have a negative impact
>on the system stability.
>
>cheers,
>Thomas
>
>_______________________________________________
>pve-user mailing list
>pve-user at pve.proxmox.com
>http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-user


More information about the pve-user mailing list