1. I need to predetermine how much swap will my JVM use if it is started with
and
?
2. Can a JVM process just use the Heap and not the Swap memory ?
3. If the Total physical RAM on my server is 8 GB and current Heap utilisation is also 8GB(using the
command), can I start a JVM process so that it just uses the swap memory ?
4. what will happen if the swap memory is 100% full and and heap memory is 2 GB free. Will i be able to start a JVM process with 512M xms and xmx ?
Based on the nature of my questions if you have something related to this topic that can give me a better understanding on this topic Kindly share.
Your questions suggest a bit of confusion between memory and swap; I'll try to explain.
swap is used as a holding area for RAM. When memory gets low, RAM which hasn't been used recently gets copied into swap space then recycled, given to something else. When something tries to use memory which has been copied into swap, it's forced to wait for it to be read back out of storage.
You don't allocate memory versus swap -- it's the same thing as far as a userspace program's concerned. Traditionally, any memory is backed by its own area of swap anyway. It doesn't get used unless needed, but it's there. So you'd want to have at least as much swap as RAM, and potentially more.
This makes it possible to use more memory than you have RAM, by copying excess things into swap so it can make up the difference. This has a significant performance cost, because swap space on disk is much slower than RAM.
Last edited by Corona688; 12-20-2011 at 02:12 PM..
vivex-goel-piet runs Solaris 9 (according to another post). All my links to the very old online manuals don't work any more since Oracle revamped the website. He could of course type "man swap" and post the bit of the manual he doesn't understand.
swap is used as a holding area for RAM. When memory gets low, RAM which hasn't been used recently gets copied into swap space then recycled, given to something else. When something tries to use memory which has been copied into swap, it's forced to wait for it to be read back out of storage.
If the above were true, why does my swap memory increase in size which means something less used from the RAM was transfered to the swap memory even when the process I am starting is -xms=512M and -xmx=512M and the Total current free RAM is 4 GB.
It should ideally allocate 512M from the free 4GB of RAM rather than freeing up space on the RAM inorder to accomodate 512M process.
1. I need to predetermine how much swap will my JVM use if it is started with
and
?
You cannot. It depends on all sorts of factors.
Quote:
2. Can a JVM process just use the Heap and not the Swap memory ?
Yes. Whether it does or does not depends on all sorts of factors.
Quote:
3. If the Total physical RAM on my server is 8 GB and current Heap utilisation is also 8GB(using the
command), can I start a JVM process so that it just uses the swap memory ?
No.
Your questions indicate that you have little understanding of how virtual memory works on Unix/Linux or how memory management works in JVM. I recommend that you spend so time researching the subjects.
Admins,
How can I configure the server so that it will utilize the swap file as little as possible? Please correct me if I'm wrong, I would say change the value of sysctl - vm.swappiness? And if, how can I keep it permenatly even after rebooting the system? since no related parameters in... (7 Replies)
Hi,
In our production box i can see the Swap space using the below command
free
total used free shared buffers cached
Mem: 65963232 41041084 24922148 0 877160 35936292
-/+ buffers/cache: 4227632 61735600
Swap: 4192880 ... (6 Replies)
Hi team,
Is there any ability to force the system to use the swap memory for a specific service? And prevent another service of using the swap memory?
Thanks (2 Replies)
here is the output of swapinfo command
==> swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192000 0 8184000 0% 0 - 1 /dev/vg00/swap
reserve - 8184000 -8184000
memory ... (5 Replies)
In Linux, Unix environments Is swap and Shared memory the same ?
In Linux, swap is mounted on /dev/shm ? I am wondering if the naming of 'shm' has anything to do with Shared memory ? (3 Replies)
Hi All,
I have just installed my first Linux server ( Ubuntu 11.10 ).
I am sure I didn't allocate /swap , and double check by 'df -h', yes really no /swap
but when I use 'free -m' , returned a "Swap" line as below.
total used free shared buffers cached
Mem: ... (3 Replies)
Hi,
I want to see used swap memory
I know that for this there is command free -m
but this shows Swap: 16383 4529 11854
by top command
while load is 1.05
max CPU % 24 mysqld
why used swap shows 4529
either it is not flushed
there is other command... (2 Replies)
Hi all
Got myself in a pickle here, chasing my own tail and am confused. Im trying to work out memory / swap on my solaris 10 server, that Im using zones on.
Server A has 32Gb of raw memory, ZFS across the root /mirror drives.
# prtdiag -v | grep mem = Memory size: 32768 Megabytes
#... (1 Reply)
Hi
Can any help me on setting the swap memory ? I would like to set swap memory for installing oracle 9i software.
RAM - 512 Mb
HDD - 40 Gb
OS - Sun Solaris 5.9 (6 Replies)
I need to put a program together to determine the total, available memory and total and available swap on unix machines. I have been searching for weeks and I seem to run into dead ends. Every unix platform I look at has a different way to determine memory info.
Any sugggestions or new... (4 Replies)