with regards to memory settings, you need to watch the memory usage in realtime of the AIM , Tomcat, Jboss servers. If your memory usage is running close to its maximum settings then you need to increase the memory to provide more head room . This means you may have to move to 64 bit if you reach the 2gb limit of a 32 bit system
So it really depends on your app and how much memory it requires to run. Also dont forget the database, sometimes it gets more efficient when you allocate more ram to the db