Does it make sense to have multiple tomcat instances on the same server?
I have seen some clusters with more than one 开发者_运维技巧tomcat running per machine. The main argument is that the garbage collector is slower on large heaps, so it would better to have 4 tomcats with 1G heap than 1 tomcat with a 4G heap.
Have anyone ever profiled that? what do you think?
It's not worth it- you have to deal with all the overhead of what happens when someone is bounced between one server and the other. Keep things simple until you have enough work being done to require another server, and by then, maybe you can just replace it with a faster one.
What is your cpu load now? What are your average page load times?
I don't think it makes much sense. It will be easier to maintain one instance of Tomcat than multiple instances, especially if you have to make configuration changes or deploy web applications regularly.
Having profiled a single Tomcat instance on a server and seen the resources it used firsthand, it's best to optimize this single instance for maximum performance than to simply share the same resources with another instance and thereby decrease performance.
精彩评论