5 Replies Latest reply on Aug 4, 2009 12:38 PM by timfox

    Meaning of Paging Max Global Size

    clebert.suconic

      I'm creating this dev post as a continuation of the user's post about paging and management destinations:

      http://www.jboss.org/index.html?module=bb&op=viewtopic&t=159288


      What should be the meaning of paging-global-max-size?

      Current definition: "The global max size is the max memory the server will be able to accept. After the limit was reach, the server won't accept anything protecting itself from Out of Memory Exceptions."

      But this seems too much, as when a single destinations puts the server into global page, this will mean... nothing else gets inside the server.

      My expectation was the user configuring page-max-size individually at address level, and having the global-max-size as an *extra* protection.


      If we want to allow routing when in global-page-mode, we will need to change the global-max-size definition a little bit.


      New definition?: The global max size is the limit where all the destinations enter into page mode. And any destination will have at least a minimal limit of data in memory equivalent to 1 page. (the default will be 10MiB).


      This will also mean: We won't be able to protect the server from OMEs. If the user created a huge ammount of addresses (say.... 1000), each address will have at least 10MiB (pre-configured) in memory.


      Any thoughts?



        • 1. Re: Meaning of Paging Max Global Size
          jmesnil

          ok, it's starting to be clearer for me.

          I'm fine with the global paging mode preventing an OOME by putting messages in the pages and not route them.

          What is still not clear in the user example was why was it possible to consume messages from destinationA and not from destinationB?
          In other words, once we hit the global paging mode, how can we consume the paged messages?

          I'm wondering if we shouldn't be restrictive with producers and permissive with consumers.
          Even when we've reached the global page mode, we should still allow a consumer to consume messages (even if it will consume memory). wdyt?

          • 2. Re: Meaning of Paging Max Global Size
            clebert.suconic

             

            What is still not clear in the user example was why was it possible to consume messages from destinationA and not from destinationB?
            In other words, once we hit the global paging mode, how can we consume the paged messages?


            from the user's example, I' m assuming destinationA is the destination that will receive MESSAGE_COUNT (10000) messages, and destinationB the destination that will only receive one message.

            At the current definition: You need to first consume the messages that are in memory for destinationA. As soon as you free up memory, destinationB will have their messages on queue.


            ATM: The user just needs to configure paging at the address level. As that's probably what the user wants.

            • 3. Re: Meaning of Paging Max Global Size
              clebert.suconic

               

              New definition?: The global max size is the limit where all the destinations enter into page mode. And any destination will have at least a minimal limit of data in memory equivalent to 1 page. (the default will be 10MiB).


              This will also mean: We won't be able to protect the server from OMEs. If the user created a huge ammount of addresses (say.... 1000), each address will have at least 10MiB (pre-configured) in memory.



              This would be exactly the same as: Set GlobalPageMaxSize = -1, and set maxPage = 10MiB on each individual pages.

              GlobalPageMaxSize should be something rarely used by the user.

              If we decide for this definition, I would just remove the option for GlobalPageMode. (which I would actually love to do it.. I never liked GlobalPageModel anyway ;-) )

              • 4. Re: Meaning of Paging Max Global Size
                clebert.suconic

                Well... not exactly the same :-) Ok... we only start paging everything after the maxSize.

                • 5. Re: Meaning of Paging Max Global Size
                  timfox

                  Ok fair enough.

                  So let's document it clearly that global max size is a *hard* limit and limiting sizes on an address level is preferable.