Today we were trying to deploy confluence integrated with Valtech cockpit on production. The result was an eye opener. Thanks to the confluence which consumes enough memory to push the heapsize to the limit.
As we were doing a test integration, we encountered our first "Out of memory" error within the first 15 minutes. I went back and tweaked the cache parameters within confluence by reducing some of the params like "time to live in memory" and also "number of objects to be in memory". I felts it worked great for next 24 minutes. Even though the "System information" section showed the "heap size" being used only 83%. Suddenly it crashed by throwing "Out of memory" exception.
This tweaking continued until we were able to make it work for next 45 minutes and, we felt this does not make sense to fight without proper information in place about the caches. Anyways, the point is during this struggle to make it work I found this article about setting memory size and its relation with the operating system. I know now, for serious application deployment we should think of linux/solaris or 64 bit systems.