For our collectors initially we have set the xmx value as 8GB in collector.ini. Now we are running two collector instances on the same host. Since we have two collector instances do we need to increase the xmx as 16GB (we have enough RAM) . What's the Max heap that a dynatrace collector can take for heap?
Sree, There really is no specific maximum xmx value for a collector. As with any java process, more memory can be better, but there's limits to this value. I would start with a reasonable value, such as 8, and then monitor the Collector behavior using the Collector Sizing dashboard available under the Deployment Health menu in the cockpit. This will allow you to determine if the Collector is memory starved or has plenty of headroom, along with monitoring CPU consumption and buffer saturation. Obviously, buffer saturation of 100% is not good, CPU consumption nearing 100% is not good.
Rather than randomly set these values (such as xmx) use the provided metrics to guide your adjustments.