Swap usage on Solaris 10

I have an Ultra 30 running Solaris 10 with 1 GB of RAM and 500 MB of swap. The machine runs extremely slowly. When I run top I see that memory is highly utilized, but swap remains mostly untouched. For example, right now there is only 50 MB of RAM free, but 453 MB of swap. Is there a way to increase the usage of swap and enhance system performance?

[357 byte] By [ungnown_admina] at [2007-11-27 7:11:24]
# 1
Disk space will be used if necessary.What is the output of 'swap -s' and 'swap -l'?There's no particular reason that using diskspace for memory is going to increase the peformance of your machine (and in many cases it will decrease the performance).--
Darren_Dunhama at 2007-7-12 19:03:02 > top of Java-index,General,Talk to the Sysop...
# 2

Solaris is pretty aggressive at swapping stuff that isnt used much out of memory.

So if your seeing stuff stay in memory and not get swapped out much, then presumably its because that memory is being regularly accessed.

So pushing it out to disk would only hurt performance. You'd be better off investing in more memory.

robert.cohena at 2007-7-12 19:03:02 > top of Java-index,General,Talk to the Sysop...
# 3

Solaris has a tendency to, eventually, utilize most of the memory on a system without swapping much, as you have observed. This is a good thing - it's trying to cache as much as it can, and is not particularly aggressive about flushing out dirty memory regions until things really get tight or busy.

Buying more memory may only result in you seeing the same pattern - a few MB of physical memory free, not much swap used, especially if your app is doing a lot of IO.

Why your app is "slow" is dependent on a lot of things. There are lots of threads here on how to analyze vmstat, prstat, iostat, lockstat, top, etc - usually one of those tools will show you where the bottleneck is. Familiarize yourself with all of them.

wsandersa at 2007-7-12 19:03:02 > top of Java-index,General,Talk to the Sysop...