IBM i

 View Only
  • 1.  IWS Performance

    Posted Wed May 18, 2022 01:01 PM
    What steps can we do to improve performance of IWS?  Can you point me to specific configuration or documentation for that?  We are finding in testing that running a deployed service via IWS is slower than utilizing ODBC for the same service, and we're hoping to close that gap or at least reduce it.  For example, one setting in deploying the service allows for a Trim mode for output fields, and the help documentation specifically states that using None there gives better performance.  What other settings in the service deployment or server configuration might help with performance?   What other steps can we do to performance tune IWS?

    ------------------------------
    Amy Vozza
    ------------------------------


  • 2.  RE: IWS Performance

    Posted Thu May 19, 2022 02:05 AM
    Edited by 英幸 矢作 Thu May 19, 2022 02:05 AM
    Amy,

    I think if you provide more specific information, someone may respond with useful settings.
    e.g. OS version, Web service configuration, response time, request/second, etc.

    IMHO, IWS is fast enough comparing with other Web service server configurations.
    Ref : https://youtu.be/RUOfH6U5tRk?t=1077
    * Display caption (Japanese) and let YouTube translate to your language.

    ------------------------------
    Hideyuki Yahagi @ Japan
    ------------------------------



  • 3.  RE: IWS Performance

    Posted Thu May 19, 2022 09:09 AM
    Dear Amy

    Did you use REST?  If so, there are articles you can digest here :  https://www.ibm.com/support/pages/node/1142632

    ------------------------------
    Satid Singkorapoom
    ------------------------------



  • 4.  RE: IWS Performance

    IBM Champion
    Posted Thu May 19, 2022 09:43 AM
    Hi Amy,

    If you can provide specific performance requirements versus the performance you are seeing now, that would be helpful. The most useful metrics are the timing for an individual API call (current vs desired) and the maximum requests per second of the API (current vs desired). Based on your specific requirements, I'd be happy to make recommendations where possible.

    That being said, I do think it's important to note that performance wasn't the key goal of IWS. IWS was designed primarily to provide an easy-to-use wizard for creating simple APIs very quickly (and it does that very well). If your APIs are getting to a level of maturity that requires higher performance, stronger security, or greater functionality, it may be time to look at more industry-standard API systems such as Node.js. I do not know many companies that run heavy production workloads on IWS, but I'm happy to provide comparisons of different options based on my experience with various companies.

    Full disclosure: I design production API architectures professionally. I'm happy to answer questions if you have any though. If you want to talk with me directly, I'm at aaron@eradani.com.

    Good luck with your APIs!

    ------------------------------
    Aaron Magid
    VP, Open Source Technologies
    Eradani
    510-295-9297
    aaron@eradani.com
    ------------------------------



  • 5.  RE: IWS Performance

    Posted Thu May 19, 2022 02:29 PM
    IWS is based on the strategic Liberty server and performance is one of the key goals. 

    In the programming guide on IWS web site, you will find a chapter on performance.  Please read that and if you have specific questions, then ask.  However, beyond what is in the chapter that I can think of:

    • Use VARCHAR instead of CHAR.  
    • Always stay on latest HTTP group and periodically redeploy your web services in order to pickup latest enhancements.  The redeployment can easily done using IWS QShell commands and properties files.


    ------------------------------
    Nadir K Amra
    ------------------------------



  • 6.  RE: IWS Performance

    Posted Thu May 19, 2022 02:30 PM
    Amy,

    Re-reading your original post, are use basing your web services on SQL or ILE programs/service programs?  If ILE programs/service programs, are you keeping your connections to DB open so next time a request comes in everything is ready to process the request?

    I guess we would need to understand the what your API is doing.

    ------------------------------
    Nadir K Amra
    ------------------------------



  • 7.  RE: IWS Performance

    Posted Thu May 19, 2022 02:52 PM
    We are using REST and deploying a SQL call to a SQL stored procedure.   Please provide a link to the programming guide on the IWS website that is referenced above.

    ------------------------------
    Amy Vozza
    ------------------------------



  • 8.  RE: IWS Performance

    Posted Thu May 19, 2022 08:52 PM
    Edited by Satid Singkorapoom Thu May 19, 2022 09:01 PM
    Dear Amy

    If you do a Google search with "ibm i integrated web service guide", you will find a download link for IWS programming guide in the bottom part of this web page :  https://www.ibm.com/support/pages/integrated-web-services-ibm-i-web-services-made-easy


    One simple thing to check is the MAX ACT parameter of *BASE memory pool (in which IWS jobs run by default).  Since IWS runs as multi-thread jobs, you need to ensure MAX ACT parameter of the memory pool in which IWS runs is high enough to accommodate all active threads of IWS and also all other active jobs that share the same memory pool and there are many system jobs running in *BASE pool (each ODBC connection runs in a single-thread (if DB2 SMP is not in use) job named QZDASOINIT which also runs in *BASE pool).   Use WRKSYSSTS command and change MAX ACT parameter of pool 2 (*BASE) to at least 1,000 to see if this helps or not.

    If the above does not help, then consider how many data rows are returned by your stored procedure being tested?   If more than a few rows returned, the performance difference can be due to different SW path length between IWS and ODBC method that you tested.  The longer SW path length can be in IWS part or in the client part that receives the result set of the procedure.  What GUIs did you use for IWS and ODBC tests?

    A customer used to asked for my analysis when he compared the performance between calling an SQL stored procedure in IBM i from his in-house Java applet application in a browser and Run SQL Script tool from IBM i Access for Windows (many rows were returned from the call).  Both methods used JDBC connection. The latter was faster but, after I asked some questions about the customer's applet, additional processing of the result set was done by the applet before the result was displayed.  The customer forgot about this additional SW path length and unrealistically expected his applet performance result to be similar to that of Run SQL Script tool.

    ------------------------------
    Satid Singkorapoom
    ------------------------------