VMware GemFire

 View Only

 Gemfire Serialization

Futures Support's profile image
Futures Support posted Nov 26, 2020 04:03 PM

Hi Team,

We have one issue on too much latancy on gemfire API (get/put). After debug we found that it is caused by serialization/deserialization cost too much time (additional 200 -300 ms) when data get loaded into client local cache.

 

Our data model contains two maps of objects and issue will happen if map size larger than 3000 approximately.

 

What is the best practice to solve our issue? We think it over and have below options, please advise.

  1. change data model and reduce model size -- this is not achievable in short period as business reason
  2. change local cache copy-on-read as false which seems disable serialization on local cache -- however it does not work on multiple thread
  3. Or do we have more efficient serialization tool could be used to gain better performance?

 

Below is how we implement gemfire serialization in JAVA :

==========================================================

import org.apache.geode.DataSerializable;

import org.apache.geode.DataSerializer;

 

public class A implements DataSerializable{

private Map<String, Matcher> matcherMap;

private Map<String, Matchee> matcheeMap;

 

@Override

public void fromData(DataInput in) {

this.matcherMap = DataSerializer.readHashMap(in);

this.matcheeMap = DataSerializer.readHashMap(in);

}

 

@Override

public void toData(DataOutput out) {

DataSerializer.writeHashMap(matcherMap, out);

DataSerializer.writeHashMap(matcheeMap, out);

}

}

=====================================================

public class Matcher implements DataSerializable{

...

@Override

public void fromData(DataInput in) {

...

}

 

@Override

public void toData(DataOutput out) {

...

}

}

=====================================================

public class Matchee implements DataSerializable{

...

@Override

public void fromData(DataInput in) {

...

}

 

@Override

public void toData(DataOutput out) {

...

}

}

Juan Ramos's profile image
Juan Ramos

Hello @Futures Support​ ,

 

Thanks for contacting the Support Community!.

That said, performance issues are hard to debug and solve, they require several cycles of tuning and testing, plus a deep analysis of the artefacts after each iteration. These tasks can not be conduced through the Support Community and should be directed to other proper channels.

Considering that this is not an issue with the product itself, I'd suggest to contact Professional Services directly for further guidance.

Best regards.

Futures Support's profile image
Futures Support

Hi,

 

Thanks for your response. How could I contact Professional Services ?

Juan Ramos's profile image
Juan Ramos

Hello @Futures Support​ ,

 

I can't share those details publicly in the community. Please open a Support Ticket and ask for assistance instead.

Best regards.