Debian swap space not getting used.

I am running a tomcat instance on my linode which has 512mb of RAM and 1 GB swap space. My tomcat app had a memory leak so used up all the RAM, however it did not start using the swap space even when the RAM was full. ( I have -Xmx set to 1024m).

I think the swap space is not getting used. Is there a way to check if swap space is set right or not?

3 Replies

Try:

alex@proust:~$ cat /proc/swaps
Filename                                Type            Size    Used    Priority
/dev/hda3                               partition       2048276 4       -1
alex@proust:~$

(That's from my home box, not a linode.)

If you have a swap partition in use, it should be listed.

total used free shared buffers cached

Mem: 509716 370728 138988 0 11324 187524

-/+ buffers/cache: 171880 337836

Swap: 1048568 0 1048568

It does show swap ..even "top" shows asmuch ..but the used is always "0".

This is what cat /proc/swaps gives

Filename Type Size Used Priority

/dev/ubdb partition 1048568 0 -1

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct