1 2 Previous Next 19 Replies Latest reply on Jul 26, 2008 6:41 PM by phpguy99 Go to original post
      • 15. Re: JBoss Cache performance looks pretty poor :(
        phpguy99

        Jason and Manik,
        Thank you all for very quick and useful response.

        Re: balancing
        I'm afraid simple modulus won't make the tree deep. If I have 1,000,000 meters and written actively by 3 nodes (but I do have stickiness per node) then simple modulus like
        x = ID % 10000
        fqn = /ROOT/x/ID

        ROOT still has 10000 direct nodes (which is according to Manik should be less than 500 direct children per node).
        I can do many level of by partitioning the bits of a number.
        Here, I really want to know the best practice which I hope you guys document somewhere, such as, how many nodes should I have under ROOT? How many direct nodes under a node? And how deep the tree can go? How bad is unbalanced tree?
        On other cache system I ended up using multiple caches to spread the load and concurrency using simple modulus b/c everything is flat.

        • 16. Re: JBoss Cache performance looks pretty poor :(
          jason.greene

           

          "phpguy99" wrote:
          Jason and Manik,
          I'm afraid simple modulus won't make the tree deep. If I have 1,000,000 meters and written actively by 3 nodes (but I do have stickiness per node) then simple modulus like
          x = ID % 10000
          fqn = /ROOT/x/ID

          ROOT still has 10000 direct nodes (which is according to Manik should be less than 500 direct children per node).


          How many threads do you have inserting/removing (not updating) on the same process at the same time?

          • 17. Re: JBoss Cache performance looks pretty poor :(
            phpguy99

            About 10 - 20 threads.
            (Sorry for my late response - caught up in development madness).

            • 18. Re: JBoss Cache performance looks pretty poor :(
              jason.greene

              Ok then a simple modulus spread should be all you need. The depth of the tree only matters if you are using the lockParentForChildInsertRemove option, which is disabled by default.

              Regarding balancing, you do not need to balance the tree, since it's not a b-tree.

              You just need a reasonable spread across nodes, since a node only supports 4 concurrent inserts at a time.

              • 19. Re: JBoss Cache performance looks pretty poor :(
                phpguy99

                Thank you so much.
                I've bookmarked this and will change my code.

                1 2 Previous Next