2 Replies Latest reply on Jan 3, 2017 6:40 AM by galder.zamarreno Branched from an earlier discussion.

    Re: Near cache memory mgmt

    galder.zamarreno

      First things first, what Infinispan version are you using? We've made some changes over time and hence we'd recommend latest stable release, 8.2.5.

       

      What is your near cache configuration like?

       

      What makes you think the near cache is not being utilised? When near cache is enabled, the client starts getting notifications of key updates and removals, so some extra traffic might be incurred. The size of the traffic depends on the number of updates/removes and size of the keys.

       

      In general, near cache helps when the same data is being requested multiple times and there are not many updates or removals of the data. If your use case does not match this, it might be better to disable near cache?

        • 1. Re: Near cache memory mgmt
          gohilmca

          Thanks galder.zamarreno

           

          I have shared my details.

           

          First things first, what Infinispan version are you using? We've made some changes over time and hence we'd recommend latest stable release, 8.2.5.

          • I am using infinispan 8.2.3

          What is your near cache configuration like?

          • there is no limit for entries.

          What makes you think the near cache is not being utilised? When near cache is enabled, the client starts getting notifications of key updates and removals, so some extra traffic might be incurred. The size of the traffic depends on the number of updates/removes and size of the keys.

          • I have multilevel cache, and the cached object is a map, which is big in size. so my usecase is I am getting this map from which I need only one entry. So this may reside on near cache, now all cache are in same way.
          • My think is as all these cached objects are big in size, may be due to memory constraint these near cache releases these cache to serve current request and hence network traffic may increase. Is this sound right?

          In general, near cache helps when the same data is being requested multiple times and there are not many updates or removals of the data. If your use case does not match this, it might be better to disable near cache?

          • Let me know your view on this
          • 2. Re: Near cache memory mgmt
            galder.zamarreno

            Near cache works at the key/value level as a whole, so if you're value is actually a map, by default the entire map is cached in the near cache even if only element is accessed.

             

            There are several ways in which you can mitigate this:

             

            1. Flatten the multimap. Use a combination of key and map key and then get each value present in the multimap via the cache.get().

             

            2. Create your own near caching on top of custom remote listeners. Underneath near caching, we use remote listeners to provide the near cache functionality. When using remote listeners is possible to configure key/value converters/filters that get deployed server side. These case be used to limit/expand each listener event, or filter out those events that you do not want being sent to the client. Using a combination of these two you could have events that only ship back elements that you want. For more info, head to the documentation section.

            1 of 1 people found this helpful