2

I have a system with 16G RAM and 23G Swap (6 x 3TB disks in ZFS), currently the swap sits at 98% but I can only see 5G of ram used.

I have checked all possible resources to find who is using the swap space.

ps -vax | awk 'NR==1{print} {VSZ+=$7;RSS+=$8}END{print VSZ,RSS}'

  PID STAT         TIME  SL  RE  PAGEIN    VSZ    RSS LIM TSIZ  %CPU %MEM COMMAND

6106336 894176

Various other tools (top -w ... sort SWAP) also give no hint as to what uses 23G of swap space.

swapoff -a fails with cannot allocate memory.

I would like to avoid a reboot so any hint how to revive the (now) slow machine?

( freenas 11.2-STABLE FreeBSD )

  • This is going to be a FreeNAS problem, not a FreeBSD one. – Rob Mar 11 at 13:13
0

I had this problem with running Atlassian Confluence on my FreeBSD 11.3 server (32 GB RAM, ZFS). The culprit turned out to be the JRE paging out data space because it was not allowed to use enough of the RAM. It was a very curious effect. Once I bumped the allocated memory to the Java VM, it stopped paging out and sucking up all of the swap space. It also boosted the application responsiveness.

It was not entirely clear why it did not show up in the memory usage reports from pstat and top, and the system reporting tons of free RAM at the same time.

So if you are running large Java applications, make sure you tune your JVM properly to allow it to use the resources it needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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