Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
18 replies Latest Post - ‏2012-07-13T13:19:00Z by SystemAdmin
SystemAdmin
SystemAdmin
7615 Posts
ACCEPTED ANSWER

Pinned topic Coach Performance optimization

‏2012-05-21T11:28:48Z |
Hi All,

I have 18 different services wired before it come to coach.Few of those are database integration and web service integration.Because of this it take time to load the coach.Any way to get rid of this performance issue ?

Thanks !
Manas
Updated on 2012-07-13T13:19:00Z at 2012-07-13T13:19:00Z by SystemAdmin
  • ritedas
    ritedas
    95 Posts
    ACCEPTED ANSWER

    Re: Coach Performance optimization

    ‏2012-05-21T11:50:10Z  in response to SystemAdmin
    Hi Manas,
    As you already mentinoed, there are 18 services before coach, to process data. Is it your services or coach which consume time to load?
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: Coach Performance optimization

      ‏2012-05-21T12:18:58Z  in response to ritedas
      Hi Ritesh,

      It's the coach which takes time to load...say around 15 secs...it takes.I have tabed tables in that coach and 18 different services as I mentioned. Any ways to make it load faster ?

      Thanks !
      Manas
      • ritedas
        ritedas
        95 Posts
        ACCEPTED ANSWER

        Re: Coach Performance optimization

        ‏2012-05-21T12:51:14Z  in response to SystemAdmin
        In general, coaches take time to load when we have custom html, loops in custom html, custom visibilty scripts, nested table structures.... or huge data to show on coach.
        check your coach and see how you can minimize these things, it surely can help you to reduce loading time of coach.

        Thanks.
        • darrenP@Regus
          darrenP@Regus
          5 Posts
          ACCEPTED ANSWER

          Re: Coach Performance optimization

          ‏2012-05-21T14:32:49Z  in response to ritedas
          Also, depends on how you are accessing the coaches. Are you accessing the coaches via a URL or within the process flow?

          If via a URL, use the following:
          http://server:port/teamworks/executeServiceByName?processApp=ACRONYM&serviceName=name%20of%service%20exposed&snapshot=SNAPSHOTV1

          Adding "&snapshot=SNAPSHOTV1" to the end of your URL will increase the load time.
          • SystemAdmin
            SystemAdmin
            7615 Posts
            ACCEPTED ANSWER

            Re: Coach Performance optimization

            ‏2012-05-21T20:52:44Z  in response to darrenP@Regus
            Also, some time when we copy and paste the contrls on the coach, contrl elements will be created with the same control id's. If we have same control id in the coach then the time to load the coach takes time since the coach has same contrl id for different control elements. Please make sure you do not have same control id's for different controls.
            • SystemAdmin
              SystemAdmin
              7615 Posts
              ACCEPTED ANSWER

              Re: Coach Performance optimization

              ‏2012-05-23T08:51:18Z  in response to SystemAdmin
              Hi All,

              I have the required database integration services which is 12 database integration and 5 web service integration.All is required and we can't get rid of this.Again the tab table takes time to load. Keeping all this aside I have a question.It works perfectly fine in my UAT environment where 4/5 testers work on it.

              When we talk about production where around 300 usres are there now....it's very slow...takes 15 to 20 secs to load. I have also noticed that when mt TW_PERF and TW_PROC health status is in alert stage it occurs.

              Any thoughts on this ?

              Thanks !
              Manas
              • SystemAdmin
                SystemAdmin
                7615 Posts
                ACCEPTED ANSWER

                Re: Coach Performance optimization

                ‏2012-05-23T13:39:24Z  in response to SystemAdmin
                To state the obvious here:

                • If you are going to have 12 database integrations and 5 web service integrations in order to show a screen then it is inevitably going to be slow. As others have pointed out it has nothing to do with the coach, but instead that the 12 database integrations and 5 web service integrations are slow.

                • That's a bad design. If you have 17 integrations just to show a single screen, you most likely are trying to do too much in one screen. You say that all the integrations are required and you can't get rid of this. Without knowing more about your application I can't tell you how to fix it, but it sounds like you need to sit down with your users and redesign your screens. And/or reset their expectations about performance. The whole point of BPM is to have a better collaboration with the business so take advantage of that collaboration. I'd even argue that the whole point of BPM is that there are no more "its all required and we can't change it" from either business or IT.

                • If the system is fine with 5 users but slow with 300 users it would seem that you saturating either the backend systems or the BPM system itself. You don't mention the size of your BPM install, but if you have 300 users and you are doing 17 integrations per screen then you are putting a lot of load on the system. For a normal application you are going to be able to run 300 users on a pretty small infrastructure of only a few cores. But if you are doing 17 integrations per screen, that's putting a lot of load on the system and will need a beefier IBM BPM tier.

                You could try some of these incremental improvements as well, but it won't fix the overall problem that you have 17 integrations.

                • Use the Process Monitor to find out where the slow down is. No sense in improving things that are already fast. You should be able to find out exactly what is slow and why with only a few clicks. You could also do some thread dumps to help you understand the why.

                • I'm guessing that some of the integrations might be pulling down data that changes infrequently, like drop down lists. So you could build a caching layer. Either something simple and hand built like used to exist in the PS toolkit, or something out of the box like Websphere eXtreme Scale.

                • I'm guessing that even some of the data that might change with every instance might still not be that time sensitive. Like account data or product data. You could move these integrations into a system swim line that executes the integrations ahead of time.

                • I'm also guessing that some of the time doing "integrations" is actually parsing the data. You might want to consider building some Advanced Integration Services to orchestrate some of these integrations. If you could consolidate some of the integrations into one or two AIS's, I bet you'd get improved performance just by improving the generation and parsing of requests and responses.

                • I've also seen some cases where web services are just slow, for various reasons, like poorly designed WSDLs that force a lot of round trips between client and server. So you might just to try improve the design of your backend services where possible. I've seen this provide dramatic benefits.

                David
                • SystemAdmin
                  SystemAdmin
                  7615 Posts
                  ACCEPTED ANSWER

                  Re: Coach Performance optimization

                  ‏2012-05-24T08:09:47Z  in response to SystemAdmin
                  Hi All,

                  Thank you so very much for your suggestion.Let me work on these and get back to you.

                  Regards,
                  Manas
                • SystemAdmin
                  SystemAdmin
                  7615 Posts
                  ACCEPTED ANSWER

                  Re: Coach Performance optimization

                  ‏2012-05-24T09:18:04Z  in response to SystemAdmin
                  Hi David,

                  Thanks a lot for your suggestion.We are using REST web services and all of our database integrations are just to populate values in drop down fields.We use AJAX to call web service too.As I said when there is a performance issue TW_PERF and TW_PROC database will be in alert stage.

                  Other-than the application enhancement I think there is some DB tuning needed.Let me work on your inputs .

                  Thanks !
                  Regards,
                  Manas
                  • SystemAdmin
                    SystemAdmin
                    7615 Posts
                    ACCEPTED ANSWER

                    Re: Coach Performance optimization

                    ‏2012-05-24T12:56:52Z  in response to SystemAdmin
                    I'm not sure what you mean by database "alert stage". Probably because I don't know that much about DB2. But that does make it sound like the database is a partial bottleneck. (I should have listed the DB as another possible saturation point.) There's no doubt that getting an efficient, well tuned DB is critical for a non-trivial deployment.

                    David
                    • SystemAdmin
                      SystemAdmin
                      7615 Posts
                      ACCEPTED ANSWER

                      Re: Coach Performance optimization

                      ‏2012-07-13T13:19:00Z  in response to SystemAdmin
                      Hi David,

                      What I mean here is when TW_PERF and TW_PROC databases are running with out any risk.Health status "alert says " we need to check few things are bring this to normal.

                      Most of the time application performance reason is these 2 data bases.Do we need to separately do something on this ?

                      Thanks !
                      Manas
              • SystemAdmin
                SystemAdmin
                7615 Posts
                ACCEPTED ANSWER

                Re: Coach Performance optimization

                ‏2012-05-23T15:39:07Z  in response to SystemAdmin
                What also is not clear is the nature of the integrations. For example, a bunch of them run before the coach renders and are never called again in the service, you can move those items off into their own service and call them in the system lane prior to going to a user service. You'd have to map and carry the value in the process.

                This won't change the actual throughput, but would change the user's perception of the performance as the delay caused by these inital calls will happen between tasks rather than after the user runs the service.

                Now if the coach loops back and calls all of these services again, this won't help.

                You might want to look at the DB calls. I have seen customers make 3-5 DB calls, where all they care about is the output from call 5, the rest is getting data to get from inital value to desired value. It turns out the multiple calls could be issued in a single more complex query, eliminating the marshalling of the data from BPM to the DB.

                Finally, remember the first rule of optmization is to measure. As David points out, if your integrations are slow there is nothing you can do in BPM to fix this. You need to figure out where the bottlenecks are (the integraions? Rendering all the data? App server capacity? Bandwidth?) before you can go about fixing them.

                Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
                • AnthonyBpm
                  AnthonyBpm
                  390 Posts
                  ACCEPTED ANSWER

                  Re: Coach Performance optimization

                  ‏2012-05-23T19:39:00Z  in response to SystemAdmin
                  Use Ajax for most / all of your external calls.. or at least where it makes sense to. The page will load and the data will load in the background.

                  If you get the initial page up and loaded the background ajax loads won't seem as terrible to the end-user.

                  +1 for David's post
                  +1 for Andrew's post
                • SystemAdmin
                  SystemAdmin
                  7615 Posts
                  ACCEPTED ANSWER

                  Re: Coach Performance optimization

                  ‏2012-05-24T06:31:45Z  in response to SystemAdmin
                  {quote:title=AndrewPaier wrote:}
                  > You might want to look at the DB calls. I have seen customers make 3-5 DB calls, where all they care about is the output from call 5, the rest is getting data to get from inital value to desired value. It turns out the multiple calls could be issued in a single more complex query, eliminating the marshalling of the data from BPM to the DB.
                  {quote}

                  I agree with Andrew on this point, we sped up a lot of our coaches that needed data loading at the time the coach was run by optimising our database calls. Consider using views and stored procedures that amalgamate the data that you need for the coach into one call.
                • SystemAdmin
                  SystemAdmin
                  7615 Posts
                  ACCEPTED ANSWER

                  Re: Coach Performance optimization

                  ‏2012-05-24T09:53:52Z  in response to SystemAdmin
                  Thanks Andrew.There is more to do at database end.....I have also seen when mt tw_proc health status is in alert state.Application performance is down.We are planning to put the tw_proc and te_perf database on a separate server.

                  I will focus on inputs I got here.

                  Thanks again.
                  Manas
              • SystemAdmin
                SystemAdmin
                7615 Posts
                ACCEPTED ANSWER

                Re: Coach Performance optimization

                ‏2012-05-24T05:41:56Z  in response to SystemAdmin
                Also notice how many rows are returned by your 18 services. Perhaps, you can limit them to 10 or 20 per table, and provide a "pagination" feature. Are you loading everything at one shot? How many tables you have in the coach? and what is the number of records displayed?

                Also, You can reduce the no. of DB integrations by using a Batch SQL Execute so that the no. of DB hits get reduced.

                Thanks,
                Vignesh
                • SystemAdmin
                  SystemAdmin
                  7615 Posts
                  ACCEPTED ANSWER

                  Re: Coach Performance optimization

                  ‏2012-05-24T08:58:37Z  in response to SystemAdmin
                  Vignesh,

                  The database integration services I have is to populate data in few dropdown fileds.There is no table where I load more data.

                  Thanks !
                  Manas
      • SystemAdmin
        SystemAdmin
        7615 Posts
        ACCEPTED ANSWER

        Re: Coach Performance optimization

        ‏2012-05-23T20:36:32Z  in response to SystemAdmin
        You can also implement the tab tables into seperate coaches and distribute the 18 service call along with the respective tab coaches. In this way when every tab is clicked the minimum required services will only be called and it will be much faster to display the respective coach.

        Hope this helps
        Manish