Odd swapping issue

From: Rafal Wijata
Date: Wed Jul 23 2008 - 13:00:19 EST

It happened twice recently(within one week), therefore I'm posting here.

32bit Fedora7,, 16G ram, 12G swap, 2*dualXeon

My machine went sluggish. Tried to debug it, and observed, that free ram(the unused one) was increasing while swap usage was increasing as well. It stopped after whole swap partition was used. Then it came back normal. Required processes were brought back to ram and server become responsible again.

Now the most strange thing is that there was 5G free(unused) ram, during those few minutes it growed to 12G! In the very same time swap usage increased from ~4G to 12G.
This is irrational to me. Can anybody explain? How to prevent?

vm.swappiness was decreased to 30, to avoid excessive swap usage, but no avail.

It's application and nfs server/client if it matters. During that "memory sweep" I observed many nfsd processes(kernel threads?) in D state.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/