How to allocate memory


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to allocate memory
# 1  
Old 08-08-2008
How to allocate memory

Hi,

I have 2 systems with same hardware and software. One system is giving me error "Error occurred during initialization of VM Could not reserve enough space for object " when I tried to increase JBoss App's heap size to 2GB while the other system is running fine without any issue. Is there anything I can change/check in OS to compare. I have compared the both systems ulimit, processes, /proc/sys/vm, /ete/sysclt.conf they all look the same. Please help::

Working System with 2GB:
[root@dnpt017 root]# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 5249564672 2382192640 2867372032 0 150224896 1232392192
Swap: 2146787328 0 2146787328
MemTotal: 5126528 kB
MemFree: 2800168 kB
MemShared: 0 kB
Buffers: 146704 kB
Cached: 1203508 kB
SwapCached: 0 kB
Active: 1197156 kB
ActiveAnon: 504040 kB
ActiveCache: 693116 kB
Inact_dirty: 540712 kB
Inact_laundry: 157176 kB
Inact_clean: 6396 kB
Inact_target: 380288 kB
HighTotal: 4325056 kB
HighFree: 2562320 kB
LowTotal: 801472 kB
LowFree: 237848 kB
SwapTotal: 2096472 kB
SwapFree: 2096472 kB
CommitLimit: 4659736 kB
Committed_AS: 935568 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB
[root@dnpt017 root]#


Not working system with 2GB:
[root@dnpt015 etc]# cat /proc/meminfo
total: used: free: shared: buffers: cached:
Mem: 5249564672 2846355456 2403209216 0 141348864 1722580992
Swap: 2146787328 0 2146787328
MemTotal: 5126528 kB
MemFree: 2346884 kB
MemShared: 0 kB
Buffers: 138036 kB
Cached: 1682208 kB
SwapCached: 0 kB
Active: 1296160 kB
ActiveAnon: 498848 kB
ActiveCache: 797312 kB
Inact_dirty: 853800 kB
Inact_laundry: 263660 kB
Inact_clean: 0 kB
Inact_target: 482724 kB
HighTotal: 4325056 kB
HighFree: 2041836 kB
LowTotal: 801472 kB
LowFree: 305048 kB
SwapTotal: 2096472 kB
SwapFree: 2096472 kB
CommitLimit: 4659736 kB
Committed_AS: 888652 kB
HugePages_Total: 0
HugePages_Free: 0
Hugepagesize: 2048 kB
[root@dnpt015 etc]#
# 2  
Old 08-08-2008
Compare the two systems for swap as this issue might be related to swap space utilization.
# 3  
Old 08-08-2008
I have compared the /proc/swaps, both systems have the same swaps too:

[root@dnpt015 proc]# cat swaps
Filename Type Size Used Priority
/dev/sda2 partition 2096472 0 -1


[root@dnpt017 bin]# cat /proc/swaps
Filename Type Size Used Priority
/dev/sda2 partition 2096472 0 -1
# 4  
Old 08-08-2008
dnpt015 has issue where dnpt017 is has NO Issue compare to JVM....

[root@dnpt015 proc]# vmstat 1 5
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 0 2174900 138048 1686520 0 0 0 1 0 2 2 1 1 1
0 0 0 2174900 138048 1686520 0 0 0 0 143 167 1 0 99 0
0 0 0 2174900 138048 1686520 0 0 0 0 181 238 0 0 100 0
0 0 0 2174900 138048 1686520 0 0 0 0 155 234 0 0 99 0
0 0 0 2174900 138048 1686520 0 0 0 0 108 89 0 0 100 0


[root@dnpt017 bin]# vmstat 1 5
procs memory swap io system cpu
r b swpd free buff cache si so bi bo in cs us sy id wa
0 0 0 2618548 146716 1207404 0 0 0 1 0 0 0 0 1 0
0 0 0 2618548 146716 1207404 0 0 0 0 124 146 0 0 100 0
0 0 0 2618548 146716 1207404 0 0 0 0 109 89 0 0 100 0
0 0 0 2618548 146716 1207404 0 0 0 0 219 262 1 0 99 0
0 0 0 2618548 146716 1207404 0 0 0 64 113 95 0 0 100 0
# 5  
Old 08-11-2008
What version of java?

What versions of java and what switches for the java command? Are these both linux boxes? I believe the JVM heap size is limited to 2GB for some version of java under linux but I'm not 100% sure.
# 6  
Old 08-19-2008
ulimit -a
java -version
32 bit java?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

calloc fails: 'Cannot allocate memory'

Hi , experts. I work on Linux station (RedHat 5.7), regular user, but have root password. %> uname -a Linux ran1log06 2.6.18-238.1.1.el5 #1 SMP Tue Jan 4 13:32:19 EST 2011 x86_64 x86_64 x86_64 GNU/Linux %> cat /etc/issue Red Hat Enterprise Linux Client release 5.7 (Tikanga) Kernel \r on... (5 Replies)
Discussion started by: baruchgu
5 Replies

2. Solaris

unable to allocate enough memory

On SunOS 10 get an error when starting a large Java process with over 2Gb memory. Error occurred during initialization of VM Could not reserve enough space for object heap i have 32G memory !! , swap = 31G Please any advice !!! (3 Replies)
Discussion started by: moata_u
3 Replies

3. Programming

How to allocate memory to a string in C?

hi I want to take string as a input from user and the string is very very length. From the lengthy string i have to substring take first 16 letters, then next 8 letters,................... Please guide me how to write program to take lengthy string from user and sub string it. Thanks (4 Replies)
Discussion started by: atharalikhan
4 Replies

4. Linux

shmget failed - cannot allocate memory

Hi, In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there... (1 Reply)
Discussion started by: ManoharanMani
1 Replies

5. Linux

shmget failed - cannot allocate memory

Hi, In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there... (1 Reply)
Discussion started by: ManoharanMani
1 Replies

6. SuSE

shmget failed - cannot allocate memory

Hi, In my proj, one process was running for 2 days. after 2 days its throwing an error message "shmget failed cannot allocate memory". the same problem happened every time.i.e. i can reproduce the same issue if my process is running for every 2 days for a same operation.Within this 2 days there... (1 Reply)
Discussion started by: ManoharanMani
1 Replies

7. UNIX for Advanced & Expert Users

Oracle how many memory allocate really

hi... i want to find oracle allocate how many memory really.. i execute this code to list memory on unix system : ps -eo pmem,args | sort -k 1 -r -n outputs ; %mem command 12.9|ora_smon_RTX 12.9|ora_s000_RTX 12.9|ora_reco_RTX 12.9|ora_qmnc_RTX... (2 Replies)
Discussion started by: utoptas
2 Replies

8. UNIX for Advanced & Expert Users

unable to allocate enough memory

On SunOS 5.8 I get an error when starting a large Java process with over 2Gb memory. Error occurred during initialization of VM Could not reserve enough space for object heap When stopping several other Java processes we can start this process. This seems to indicate that we don't have... (11 Replies)
Discussion started by: rein
11 Replies

9. Programming

how allocate virtual memory

Hi Folks can any body suggest how to allocate virtual memory any function for that (2 Replies)
Discussion started by: munnu
2 Replies

10. UNIX for Dummies Questions & Answers

Unix Help - allocate more memory to /tmp

Hi Guys I using Solaris 8 and I need to change the size of my /tmp file. Was wondering does anyone know how to do this. Thanks Carson (1 Reply)
Discussion started by: cmackin
1 Replies
Login or Register to Ask a Question