I've encountered a lot of out of memory problems in the past dealing with Websphere Application server. Most have been solved by proper tuning of Websphere settings (heap size, thread pools etc) or optimization of the applications deployed in it. When finding solutions for those problems, one thing I always read or hear is the suggestion of changing the "paging" settings. Never really understood what its for. What does it have to do with garbage collection and heap settings in Websphere?
Can someone explain this to me in simplest terms?
Is it difficult to tune this? is it more on tuning the server OS settings and not websphere?
As far as I know, there are no commercial JVMs that actively involve themselves in interacting with virtual memory paging, although at least one experiment has apparently been done.
It's generally considered to be a good idea to have sufficient real memory to hold the entire VM without any OS-level paging at all.
The nightmare scenario comes when the objects being handled in virtual memory (the "working set") exceed available free page slots, forcing a high page rate in order to do things like traverse a hypothetical garbage-collection list, and in particular when the working set is being randomly accessed. That's because it can take thousands of times longer to page out an unused page and page a new page into the vacated slot than to do a simple read from RAM, and if you're doing stuff that sends the page in and out a lot, it will slow your app down to a crawl and beat the disk drive silly.
Someone once "proved" that OS/2 was slower than a Commodore-64 by doing just that, in fact.
Memory is cheap these days. In fact, it costs a lot less to install a few extra sticks in a server than it does to pay a highly-trained expert to optimize paging.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: Paging and its relation to Heap and Garbage collection in Websphere