Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We are using Oracle Coherence on linux servers. However, we noticed that because of Coherence processes running, often our swap utilization % increases too much, sometimes becoming more than 98%, even touched 100% a few times.

Once we kill all the coherence related processes, then it becomes normal.

Is there any way we can make coherence processes to only use a particular size of Swap space ?

Currently increasing swap space is not in our scope.

Please suggest.

share|improve this question
up vote 1 down vote accepted

To avoid swapping, you will need to add more physical RAM.

If your application (Oracle Coherence) demands a large amount of RAM as a part of normal operation (i.e. not a memory leak), and you do not have enough physical memory, then pretty much the only option is swapping.

As a workaround, you might want to swap to a file, though this can be slower.

  1. Create an empty file using dd: dd if=/dev/zero of=/path/to/swapfile bs=1M count=<size, in megabytes>.
  2. Create a swap filesystem on it: mkswap /path/to/swapfile
  3. Swap on it: swapon /path/to/swapfile.
share|improve this answer
Is there any way of restricting any process to only use a % of the swap space ? Since its a corporate system, for quick fix, RAM upgrade might take few days. We need to do quick fix. – Novice User May 3 '12 at 18:35
As far as I know, there isn't. And if you could do that, the kernel would kill the application as it runs out of memory. As a workaround you might want to swap to a file. – Renan May 3 '12 at 18:35
Oh okay. Yeah, we guys could not even SSH to those servers when it increased to 100% – Novice User May 3 '12 at 18:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.