Announcement Announcement Module
Collapse
No announcement yet.
Http-invoker performance? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Http-invoker performance?

    I ran the http-invoker based jpetstore sample. Interestingly, I got reasonably fast response times for up to 3 repetitions of the service request (400 ms or so). Beyond 4 repetitions, though, the performance got worse and worse, and it sort of stabilized at about 2 seconds/request, for, say, a loop of 20 requests.

    What is causing this significant performance degradation? The requests are sent sequentially in a loop, so there is always only request dealt with at a time.

    Has anyone alse noticed it? Is there a remedy?


    Thanks,


    -- JK

  • #2
    Jacek,

    I have created a bug report for this on JIRA and I will look into in more detail to see if I can reproduce this problem and if so if I can fix it.

    Rob

    Comment


    • #3
      HttpInvoker performance

      I have been looking into using HttpInvoker to call services from an applet. I ran my small test looping through 20 calls and did not notice this behavior.

      Comment


      • #4
        Performance problems - non-local only

        One note: The problematic performance can only be observed when NOT using "localhost" for the server address in client.properties, but a regular IP address (even though the client and the server are on the same machine). For "localhost", the performance is relatively consistent whether I have 1 or 20 iterations.

        What I am puzzled with is not the ABSOLUTE performance (with network overhead, performance degradation is to be expected), but rather the sudden drop from 1-3 repetitions (very good performance) to 20 repetitions (very poor performance, 10-15x times worse).

        msauer, could you re-run your test not using localhost, but an IP address?

        Could it be the network?

        Thanks in advance,

        -- JK

        Comment


        • #5
          Sounds like a problem with keep alive connections to me.

          What could be happening is that for some reason a new connection to the server is being created for each invocation rather than a keep alive being reused... but the old keep alive connections still exist and are still connected resulting in your server being overloaded with open connections that do nothing. Or it could be that the http client has some kind of limit on the number of concurrent connections it will make to a single server and it's waiting for an old connection to close before it will initiate a new connection....

          Have you tried doing your test using both the JDK (SimpleHttpInvokerRequestExecutor) and HttpClient (CommonsHttpInvokerRequestExecutor) executors?

          Ollie

          Comment


          • #6
            JK,

            I set up simple test to check the performance of the HttpInvoker but I didn't get the same degradation as you did. I tried with both localhost and my local IP and results were similar.

            Can you post a case that is definitely not working for you along with configuration (servlet container etc).

            Rob

            Comment


            • #7
              I also re-ran my test using an IP address and did not see the degradation.

              Comment


              • #8
                Mystery solved

                Looks like it has something to do with my Network Address Translation setup.
                I ran the test on the private network (192.168.*) and did NOT see the degradation. The problem happens only when I try to use the external IP address. So I assume it is some kind of a NAT problem.

                Thanks to all who helped with this.

                -- JK

                Comment


                • #9
                  Thanks for posting back with the information - I'll update the issue in JIRA.


                  Rob

                  Comment

                  Working...
                  X