Browse Prior Art Database

Method to dynamically (re)configure limits associated with a resource affected by a hotplug operation.

IP.com Disclosure Number: IPCOM000233880D
Publication Date: 2013-Dec-26
Document File: 5 page(s) / 63K

Publishing Venue

The IP.com Prior Art Database

Abstract

User limit are set of system resources and their corresponding values as seen by a operating system user. These user limits often referred to as ulimits provides control over the resources available to the shell and to processes started by it, on systems that allow such control. This article explains a mechanism to adapt the values for certain resource limits on a hot(un)plug operation.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 57% of the total text.

Page 01 of 5

Method to dynamically (re)configure limits associated with a resource affected by a hotplug operation.

User limit (as applicable via ulimit) are set of system resources and their corresponding values as seen by a operating system user. These user limits often referred to as "ulimits" provides control over the resources available to the shell and to processes started by it, on systems that allow such control. The initial values for various resources are initialized by an operation system kernel and then later can be adapted by each user for it's corresponding session.

When memory is hot (un)plugged corresponding user limits will be identified. On a hot (un)plug operation existing and new value of memory will be recorded. Percentage of increase/decrease will be calculated. The above noted user limit values will be changed by similar ratio.

The change will only be applied if the hot (un)plug operation is completed successfully. If the hot (un)plug operation fails no change to user limits will be done.

User limits can be changed by a user dynamically and are restricted to a session till the user is logged in. The above proposed change will be done system wide. The changed values will be available for all users. A user can always override any of these settings manually. Once the user logs out manually changed values will no longer persist and will be reverted to system wide settings.

Following are the details:

Environment : A Linux operating system having support for hot-plugging memory, 2GB configured memory and 2GB standby memory.

# lsmem


Address Range Size (MB) State Removable Device ===================================================================== ==========
0x0000000000000000-0x000000000fffffff 256 online no 0 0x0000000010000000-0x000000005fffffff 1280 online yes 1-5 0x0000000060000000-0x000000007fffffff 512 online no 6-7 0x0000000080000000-0x00000000ffffffff 2048 offline - 8-15

Memory device size : 256 MB


Memory block size : 256 MB
Total online memory : 2048 MB ===> 2GB Online memory Total offline memory: 2048 MB ===> 2GB standby memory

Amount of free memory on a the system.

# free -m

total used free shared buffers cached

Mem: 2006 432 1573 0 9 322

1


Page 02 of 5

-/+ buffers/cache: 101 1905 Swap: 0 0 0
#

Associated ulimits on a 2GB system .

Figure 1 : Ulimit output

Invoking JAVA with 2.2 GB of heap memory request will fail(expected)

# java -Xmx2200m -version
JVMDBG001: malloc failed to allocate 8392704 bytes, time: Wed Jun 26 11:00:59 2013

[ **Out of memory, aborting** ]
[ ]
[ *** panic: JVMST027: Cannot allocate memory for System Heap, request size 8388608 bytes

]

Aborted

Enable additional 2GB of memory (online standby memory)

# chmem -e 2048
# lsmem
Address Range Size (MB) State Removable Device ===================================================================== ==========
0x0000000000000000-0x000000000fffffff 256 online no 0 0x0000000010000000-0x000000005fffffff 1280 online yes 1-5 0x0000000060000000-0x000000007fffffff 512 onlin...