Apache Ignite Heap size recommendation
It depends on what you're trying to do -- persistence and SQL tend to use more heap space for example -- but both 2Gb and 768Mb are much smaller than I'd expect for an in-memory database.
The tuning guide suggests 10Gb as a starting point:
-server-Xms10g-Xmx10g-XX:+AlwaysPreTouch-XX:+UseG1GC-XX:+ScavengeBeforeFullGC-XX:+DisableExplicitGC