I use the datastax driver to create NIO connections with Cassandra without do any other thing but just keep connection.
What's more, when I set the XMX to 1G, the RES(from top -p [java pid]) will occupied about 400M memory, but when I set the XMX to 512M, the RES will only occupied about 200M memory,
How to understand it? from my opinion, my code do the same thing, why occupied different memory?
Cluster build = Cluster.builder().addContactPoint("10.224.57.163").withAuthProvider(new PlainTextAuthProvider("fujian","pass")).withLoadBalancingPolicy(new DCAwareRoundRobinPolicy("DC1")).build(); Session connect = build.connect("demo");