Hi there,
We are currentlyusing pre-modernization release https://github.com/apache/geode-native/releases/tag/pre-modernization The function thatyou saw before consuming most of the CPU is built in our C++ app and basicallyis desirializaring a HashMap . As part of the Map value we store arrays, somaybe the structure is too heavy... inlineCacheableHashMapPtr getAttributes(const PdxInstancePtr &instance) { CacheablePtr attributes; instance->getField("attributes", attributes); returndynCast<CacheableHashMapPtr>(attributes); } The classesimplementing the SErializable interface looks like classLdapObjectPdx : public apache::geode::client::PdxSerializable { private: CacheableKeyPtr key; char*a; boolb; CacheableStringPtr c; CacheableHashMapPtr attributes; //children are kept only for distributed entries CacheableLinkedHashSetPtr children; ... We tried to builda Java client making the queries our C++ app is doing and we see also that CPUusage is really high compared with Geode servers... Running the YSCBwe see also that YSCB CPU usage is quite high compared with Geode. Maybe thisis the expected behavior as far as the lookups are basically primary keylookups We are thinkingseveral options: use Dataserialization instead of PDX, try some specific forour data structure, try different structure with more primitives and avoidcollections... Any hint is highlyappreciated Thanks again, /evaristo El Miércoles 14 de junio de 2017 19:11, Hitesh Khamesra <[email protected]> escribió: >>>This method consumes most of the CPU:CacheablePtrattributes; >>>instance->getField("attributes", attributes); Do you know who is calling getField(..) api? Is application using PdxInstance? Thanks.Hitesh. From: Evaristo José Camarero <[email protected]> To: "[email protected]" <[email protected]> Sent: Wednesday, June 14, 2017 3:12 AM Subject: PDX SERIALIZATION WITH C++ GEODE-NATIVE Hi there, Weare using Apache Geode 1.1 as DB backend and a C++ application as client thatis using Geode-native pre-release (and using PDX serialization), and thesummary is that we are experience that PDX deserialization is taking most ofthe CPU in our C++ application. Whenbenchmarking the application we see the following (in a 12 cores machine):-Geode CPU usage is really low (let's say 40%)- Client app CPU usage is really (let's say 700%) If we push further the benchmark thelatencies are simply too high The objects that we store looks like: CacheableKeyPtrkey; char *a; bool bdistributedEntry; CacheableStringPtr c; CacheableHashMapPtr attributesMap; // children arekept only for distributed entries CacheableLinkedHashSetPtr d; This method consumes most of the CPU:CacheablePtrattributes; instance->getField("attributes", attributes); I have some doubts about:- Is C++ PDX serialization mature andperformant? I have read some benchmarks about Java's library but I was not ableto find information about the C++ library.- Is there any of modelling guidelinesthat could alleviate the serialization performance issue? We havestarted with a design in which classes are designed for simplicity withoutconsider PDX serialization performance aspect Thx in advance, Evaristo
