2 Replies Latest reply on Apr 28, 2015 3:44 AM by jworrall

    Socket buffer send and receive size recommendation

    jworrall

      Hello,

       

      I noticed in the default-jgroups-udp.xml setting, the default receive buffer required is quite large, hence one has to tune the kernel to accommodate the socket receive buffer to around 25MB. Is this a 'default' recommendation? I suppose it all depends on the amount of traffic between the data nodes and assuming if the nature of the app requires accessing the cache frequently in an embedded distributed mode, this might be justifiable. If this is the case, then this means the data grid is limited to accept many other concurrent socket connections.

       

      My questions are:

       

      1) is there a guideline or rule-of-thumb for determining the appropriate socket buffer size for tuning Infinispan?

      2) if Infinispan requires a large socket buffer, does this mean a client-server mode is more appropriate?

      3) also which mode is faster in terms of cache access (read/write), client-server mode or embedded distributed mode?

       

      Thanks very much for your advice!

        • 1. Re: Socket buffer send and receive size recommendation
          rvansa

          This setting is based on performance tests, which really assumes that the cache is heavily accessed. We're trying to keep the default as performant as possible, and you don't have to tune kernel - if the buffer cannot be allocated, only a warning is produced and the cluster still works.

           

          2) The question whether to use client-server mode should be based on the general use rather than on fine-tuning parameters. If the node is expected to often connect/disconnect, it's definitely a use case for HotRod client. If you need any of the embedded mode-only features (e.g. transactions), or you really want to store data on the node, use embedded mode.

          3) The major latency source is network. Read operations need to do 1 roundtrip if the entry is not located on the local node (which is always in client mode, unless you're using near cache, but in embedded mode you can be lucky and can serve the request locally), and for non-tx writes it's roundtrip to primary owner (which might be the local node in embedded mode), and then max(roundtrips) to all backup owners.

          • 2. Re: Socket buffer send and receive size recommendation
            jworrall

            Many thanks for answer my questions Radim, much appreciated!