Noticed that the TServer tries to fail fast if caches and memory maps are configured to use more memory than the JVM has given to it via -Xmx. However, if native maps are being used, this check fails. I recently had OOMEs kill TServers because their data block cache was 16gb and the max heap was 16gb.
Here's the check:
I think the check should still happen for index and data caches if native maps are being used.