的Suse SLES10 X64運行下分配XMS我試圖在VMware下運行的SLES10 x64的分配與XMS = XMX RAM。JVM不能在VMware ESX
當停止JVM拋出以下錯誤:
Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 12).
The RAM of the VM is 8 GB and they are reserved.
的VM看到8GB,它可以通過XMX設置在運行時進行分配。
在具有16 GB RAM保留另一個虛擬SLES10通過VMWare的設置大頁面,即使我沒有用的RAM分配問題,只能通過回聲正常工作shmax。
回聲8000>的/ proc/SYS/VM/nr_hugepages
回聲8589934592>的/ proc/SYS /內核/ SHMMAX
使用在另一SLES10回波命令顯示沒有影響/ proc/meminfo。
這裏是我CONFIGS 1日在這裏XMS未能分配SLES10。
# more /apps/liferay-portal-5.2.5/tomcat-5.5.27/bin/setenv.sh JAVA_HOME=/apps/java5 JRE_HOME=/apps/java5 JAVA_OPTS="$JAVA_OPTS -Xms3G -Xmx3G -XX:NewRatio=3 -XX:MaxPermSize=256m -XX:SurvivorRatio=20 -Dsun.rmi.dgc.client.gcInterval=1800000 -Dsun.rmi.dgc.server.gcInterval=1800000 -XX:+UsePa rallelGC -XX:ParallelGCThreads=4 -XX:+UseLargePages -Xloggc:/apps/gc.log -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGC -XX:+PrintGCTimeStamps - XX:+PrintGCDetails -Dfile.encoding=UTF8 -Duser.timezone=GMT+2 -Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_C LEAR_REFERENCES=false" more /etc/sysctl.conf kernel.shmmax=7516192768 vm.nr_hugepages=3072 vm.hugetlb_shm_group=1000 more /etc/securtiy/limits.conf # # #* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #@student - maxlogins 4 * soft memlock unlimited * hard memlock unlimited tomcat soft memlock 6291456 tomcat hard memlock 6291456 # End of file # cat /proc/meminfo MemTotal: 7928752 kB MemFree: 737004 kB Buffers: 0 kB Cached: 417368 kB SwapCached: 0 kB Active: 487428 kB Inactive: 324072 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 7928752 kB LowFree: 737004 kB SwapTotal: 2097144 kB SwapFree: 2097020 kB Dirty: 0 kB Writeback: 0 kB AnonPages: 397208 kB Mapped: 72180 kB Slab: 62136 kB CommitLimit: 2915792 kB Committed_AS: 748576 kB PageTables: 3292 kB VmallocTotal: 34359738367 kB VmallocUsed: 7028 kB VmallocChunk: 34359731271 kB HugePages_Total: 3072 HugePages_Free: 2305 HugePages_Rsvd: 897 Hugepagesize: 2048 kB # ipcs -l Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 7340032 max total shared memory (kbytes) = 4611686018427386880 min seg size (bytes) = 1 Semaphore Limits -------- max number of arrays = 1024 max semaphores per array = 250 max semaphores system wide = 256000 max ops per semop call = 32 semaphore max value = 32767 Messages: Limits -------- max queues system wide = 16 max size of message (bytes) = 65536 default max size of queue (bytes) = 65536 # ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 65536 max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 stack size (kbytes, -s) 8192 cpu time (seconds, -t) unlimited max user processes (-u) 65536 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
在第二VM它看起來像這樣
cat /proc/meminfo MemTotal: 16190448 kB MemFree: 176812 kB Buffers: 52752 kB Cached: 755256 kB SwapCached: 0 kB Active: 713808 kB Inactive: 425300 kB HighTotal: 0 kB HighFree: 0 kB LowTotal: 16190448 kB LowFree: 176812 kB SwapTotal: 35658896 kB SwapFree: 35658796 kB Dirty: 932 kB Writeback: 0 kB AnonPages: 333620 kB Mapped: 79120 kB Slab: 37492 kB CommitLimit: 36356744 kB Committed_AS: 646284 kB PageTables: 3584 kB VmallocTotal: 34359738367 kB VmallocUsed: 23500 kB VmallocChunk: 34359713907 kB HugePages_Total: 7224 HugePages_Free: 6654 HugePages_Rsvd: 582 Hugepagesize: 2048 kB JAVA_OPTS="$JAVA_OPTS -Xms2G -Xmx2G -XX:NewRatio=3 -XX:MaxPermSize=256m -XX:SurvivorRatio=20 -Dsun.rmi.dgc.client.gcInterval=1800000 -Dsun.rmi.dgc.server.gcI nterval=1800000 -XX:+UseParallelGC -XX:ParallelGCThreads=2 -XX:+UseLargePages -Xloggc:/apps/gc.log -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplication ConcurrentTime -XX:+PrintGC -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Dfile.encoding=UTF8 -Duser.timezone=GMT+2 -Djava.security.auth.login.config=$CATALINA _HOME/conf/jaas.config -Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false" hepide01pep1:~ # ipcs -l ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 8388608 max total shared memory (kbytes) = 4611686018427386880 min seg size (bytes) = 1 ------ Semaphore Limits -------- max number of arrays = 1024 max semaphores per array = 250 max semaphores system wide = 256000 max ops per semop call = 32 semaphore max value = 32767 ------ Messages: Limits -------- max queues system wide = 16 max size of message (bytes) = 65536 default max size of queue (bytes) = 65536
在第一機器你正在試圖分配總3G + 256M = 3.25gig,但在第二你正在分配2克+256米= 2.25m.So更好的測試都與機器相同堆size.But反正2.25或3.25,兩者都應該使用64位JDK。可以讓我知道您使用的是JDK版本。 – 2010-08-25 17:03:48
同時,我做了一些測試,並最終可以分配2900米,但不是3gb設置爲3200後的巨大頁面。在另一臺主機上,我確實將8000頁的大頁數減少到了3200,現在只能分配2900m。將頁面恢復到8000我現在可以再次分配4GB。稍後我會檢查哪個版本和更短的命令行 – macbert 2010-08-25 21:55:07
java.runtime.name \t的Java(TM)2運行環境,標準版 java.runtime.version \t 1.5.0_22-B03 java.specification.name \t的Java再試一次平臺API規格 java.specification.vendor \t Sun Microsystems公司 java.specification.version \t 1.5 – macbert 2010-08-25 22:24:04