Sponsored Content
Full Discussion: How to allocate memory
Top Forums UNIX for Advanced & Expert Users How to allocate memory Post 302223129 by ravi3553 on Friday 8th of August 2008 12:06:45 PM
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]#
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
ALLOC_HUGEPAGES(2)					     Linux Programmer's Manual						ALLOC_HUGEPAGES(2)

NAME
alloc_hugepages, free_hugepages - allocate or free huge pages SYNOPSIS
void *alloc_hugepages(int key, void *addr, size_t len, int prot, int flag); int free_hugepages(void *addr); DESCRIPTION
The system calls alloc_hugepages() and free_hugepages() were introduced in Linux 2.5.36 and removed again in 2.5.54. They existed only on i386 and ia64 (when built with CONFIG_HUGETLB_PAGE). In Linux 2.4.20 the syscall numbers exist, but the calls fail with the error ENOSYS. On i386 the memory management hardware knows about ordinary pages (4 KiB) and huge pages (2 or 4 MiB). Similarly ia64 knows about huge pages of several sizes. These system calls serve to map huge pages into the process's memory or to free them again. Huge pages are locked into memory, and are not swapped. The key argument is an identifier. When zero the pages are private, and not inherited by children. When positive the pages are shared with other applications using the same key, and inherited by child processes. The addr argument of free_hugepages() tells which page is being freed: it was the return value of a call to alloc_hugepages(). (The memory is first actually freed when all users have released it.) The addr argument of alloc_hugepages() is a hint, that the kernel may or may not follow. Addresses must be properly aligned. The len argument is the length of the required segment. It must be a multiple of the huge page size. The prot argument specifies the memory protection of the segment. It is one of PROT_READ, PROT_WRITE, PROT_EXEC. The flag argument is ignored, unless key is positive. In that case, if flag is IPC_CREAT, then a new huge page segment is created when none with the given key existed. If this flag is not set, then ENOENT is returned when no segment with the given key exists. RETURN VALUE
On success, alloc_hugepages() returns the allocated virtual address, and free_hugepages() returns zero. On error, -1 is returned, and errno is set appropriately. ERRORS
ENOSYS The system call is not supported on this kernel. FILES
/proc/sys/vm/nr_hugepages Number of configured hugetlb pages. This can be read and written. /proc/meminfo Gives info on the number of configured hugetlb pages and on their size in the three variables HugePages_Total, HugePages_Free, Hugepagesize. CONFORMING TO
These calls are specific to Linux on Intel processors, and should not be used in programs intended to be portable. NOTES
These system calls are gone; they existed only in Linux 2.5.36 through to 2.5.54. Now the hugetlbfs file system can be used instead. Mem- ory backed by huge pages (if the CPU supports them) is obtained by using mmap(2) to map files in this virtual file system. The maximal number of huge pages can be specified using the hugepages= boot parameter. COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. Linux 2007-05-31 ALLOC_HUGEPAGES(2)
All times are GMT -4. The time now is 11:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy