22
© 2014 IBM Corporation JMP401: Masterclass: XPages Scalability Tony McGuckin, IBM Martin Donnelly, IBM

Tip from IBM Connect 2014: Masterclass: XPages Scalability

Embed Size (px)

DESCRIPTION

This tip is from the IBM Connect 2014 session "JMP401: Masterclass: XPages Scalability". This tip specifically deals with developing XPages performance using the XPages Toolbox (available free on OpenNTF). Get advice on using the XPages Toolbox during development and testing cycles to control logging of XPages Runtime loggers, create Java heap dumps, and more. The XPages Toolbox can also provide insight into custom Server-Side JavaScript and Java code. Speakers Tony McGuckin and Martin Donnelly from IBM also cover understanding the “XPages Machine”, developing for performance, and architecting for scalability. The full slide deck is available free in the IBM Connect 2014 community at SocialBizUG.org.

Citation preview

Page 1: Tip from IBM Connect 2014: Masterclass: XPages Scalability

© 2014 IBM Corporation

JMP401: Masterclass: XPages Scalability Tony McGuckin, IBM Martin Donnelly, IBM

Page 2: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Please Note

IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion.

Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision.

The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract. The development, release, and timing of any future features or functionality described for our products remains at our sole discretion

Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming in the user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.

Page 3: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Developing for Performance

Page 4: Tip from IBM Connect 2014: Masterclass: XPages Scalability

XPages based Application (The “XPages Swiss Army Knife”) – Runs on the Domino server or the Notes client – XPagesToolbox.nsf needs to be installed on the Domino server or XPiNC client – A profiler .jar file needs to be added to the JVM launch options & JVM java.policy updated

Should be used regularly during development / testing cycles to: – Profile CPU performance & Memory usage (per request or periodically) / Backend usage – Control logging of XPages Runtime loggers – View current Threads in the nhttp process – Create Java Heap Dumps / XML Memory Dumps – Production use only for problem resolution - sensitive data collection capabilities

Available from OpenNTF.org – Free open source project / Search for “XPages Toolbox” / Authored by Philippe Riand, IBM – Full readme.pdf instructions within the project download files

Developing for Performance The XPages Toolbox

Page 5: Tip from IBM Connect 2014: Masterclass: XPages Scalability

XPages based Application (The “XPages Swiss Army Knife”) – Runs on the Domino server or the Notes client – XPagesToolbox.nsf needs to be installed on the Domino server or XPiNC client – A profiler .jar file needs to be added to the JVM launch options & JVM java.policy updated

Should be used regularly during development / testing cycles to: – Profile CPU performance & Memory usage (per request or periodically) / Backend usage – Control logging of XPages Runtime loggers – View current Threads in the nhttp process – Create Java Heap Dumps / XML Memory Dumps – Production use only for problem resolution - sensitive data collection capabilities

Available from OpenNTF.org – Free open source project / Search for “XPages Toolbox” / Authored by Philippe Riand, IBM – Full readme.pdf instructions within the project download files

Developing for Performance The XPages Toolbox

Page 6: Tip from IBM Connect 2014: Masterclass: XPages Scalability

XPages based Application (The “XPages Swiss Army Knife”) – Runs on the Domino server or the Notes client – XPagesToolbox.nsf needs to be installed on the Domino server or XPiNC client – A profiler .jar file needs to be added to the JVM launch options & JVM java.policy updated

Should be used regularly during development / testing cycles to: – Profile CPU performance & Memory usage (per request or periodically) / Backend usage – Control logging of XPages Runtime loggers – View current Threads in the nhttp process – Create Java Heap Dumps / XML Memory Dumps – Production use only for problem resolution - sensitive data collection capabilities

Available from OpenNTF.org – Free open source project / Search for “XPages Toolbox” / Authored by Philippe Riand, IBM – Full readme.pdf instructions within the project download files

Developing for Performance The XPages Toolbox

Page 7: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into CPU Time and Wall Time cost of a request

– CPU Time is the amount of time spent by the CPU actually

processing XPages code (ie: burning real CPU cycles)

• No idle time is included such as waiting on non-CPU intensive code

–Wall Time is the amount of time spent actually processing XPages

code and any idle time

• Like watching the time going by on the “clock on the wall”

Developing for Performance Using the XPages Toolbox

Page 8: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into CPU Time and Wall Time cost of a request

– CPU Time is the amount of time spent by the CPU actually processing XPages code (ie: burning real CPU cycles)

• No idle time is included such as waiting on non-CPU intensive

code

–Wall Time is the amount of time spent actually processing XPages code and any idle time

• Like watching the time going by on the “clock on the wall”

Developing for Performance Using the XPages Toolbox

Page 9: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into CPU Time and Wall Time cost of a request

– CPU Time is the amount of time spent by the CPU actually processing XPages code (ie: burning real CPU cycles)

• No idle time is included such as waiting on non-CPU intensive

code

–Wall Time is the amount of time spent actually processing XPages code and any idle time

• Like watching the time going by on the “clock on the wall”

Developing for Performance Using the XPages Toolbox

Page 10: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom SSJS code using Profile Blocks __profile(“blockIdentifier”, “optionalInformation”){ // profile my custom code... var nd:NotesDocument = document1.getDocument(); .... }

Developing for Performance Using the XPages Toolbox

Page 11: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom SSJS code using Profile Blocks __profile(“blockIdentifier”, “optionalInformation”){ // profile my custom code... var nd:NotesDocument = document1.getDocument(); .... __profile(“blockIdentifier”, “optionalInformation”){ // profile my nested profile block... var x = nd.getItemValueString(“x”); .... } }

Developing for Performance Using the XPages Toolbox

Page 12: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom Java code using Profile Block Decorator private static final ProfilerType pt = new ProfilerType("MyBlock"); public void myMethod() { if(Profiler.isEnabled()) { ProfilerAggregator pa = Profiler.startProfileBlock(pt, null); long startTime = Profiler.getCurrentTime(); try { _myMethod(); } finally { Profiler.endProfileBlock(pa, startTime); } } else { _myMethod(); } } private void _myMethod() { // real implementation of myMethod … }

Developing for Performance Using the XPages Toolbox

Page 13: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom Java code using Profile Block Decorator private static final ProfilerType pt = new ProfilerType("MyBlock"); public void myMethod() { if(Profiler.isEnabled()) { ProfilerAggregator pa = Profiler.startProfileBlock(pt, null); long startTime = Profiler.getCurrentTime(); try { _myMethod(); } finally { Profiler.endProfileBlock(pa, startTime); } } else { _myMethod(); } } private void _myMethod() { // real implementation of myMethod … }

Developing for Performance Using the XPages Toolbox

Page 14: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom Java code using Profile Block Decorator private static final ProfilerType pt = new ProfilerType("MyBlock"); public void myMethod() { if(Profiler.isEnabled()) { ProfilerAggregator pa = Profiler.startProfileBlock(pt, null); long startTime = Profiler.getCurrentTime(); try { _myMethod(); } finally { Profiler.endProfileBlock(pa, startTime); } } else { _myMethod(); } } private void _myMethod() { // real implementation of myMethod … }

Developing for Performance Using the XPages Toolbox

Page 15: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom Java code using Profile Block Decorator private static final ProfilerType pt = new ProfilerType("MyBlock"); public void myMethod() { if(Profiler.isEnabled()) { ProfilerAggregator pa = Profiler.startProfileBlock(pt, null); long startTime = Profiler.getCurrentTime(); try { _myMethod(); } finally { Profiler.endProfileBlock(pa, startTime); } } else { _myMethod(); } } private void _myMethod() { // real implementation of myMethod … }

Developing for Performance Using the XPages Toolbox

Page 16: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom Java code using Profile Block Decorator private static final ProfilerType pt = new ProfilerType("MyBlock"); public void myMethod() { if(Profiler.isEnabled()) { ProfilerAggregator pa = Profiler.startProfileBlock(pt, null); long startTime = Profiler.getCurrentTime(); try { _myMethod(); } finally { Profiler.endProfileBlock(pa, startTime); } } else { _myMethod(); } } private void _myMethod() { // real implementation of myMethod … }

Developing for Performance Using the XPages Toolbox

Page 17: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Provides insight into custom Java code using Profile Block Decorator private static final ProfilerType pt = new ProfilerType("MyBlock"); public void myMethod() { if(Profiler.isEnabled()) { ProfilerAggregator pa = Profiler.startProfileBlock(pt, null); long startTime = Profiler.getCurrentTime(); try { _myMethod(); } finally { Profiler.endProfileBlock(pa, startTime); } } else { _myMethod(); } } private void _myMethod() { // real implementation of myMethod … }

Developing for Performance Using the XPages Toolbox

Page 18: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Non-Invasive and Supportive

– Leave the custom Profile Blocks in your SSJS / Java Code

• No negative performance impact on any application even if the XPages

Toolbox is not installed on a server or XPiNC client

• Therefore supporting you for future profiling & maintenance tasks

Developing for Performance Using the XPages Toolbox

Page 19: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Non-Invasive and Supportive

– Leave the custom Profile Blocks in your SSJS / Java Code

• No negative performance impact on any application even if the XPages

Toolbox is not installed on a server or XPiNC client

• Therefore supporting you for future profiling & maintenance tasks

Developing for Performance Using the XPages Toolbox

Page 20: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Non-Invasive and Supportive

– Leave the custom Profile Blocks in your SSJS / Java Code

• No negative performance impact on any application even if the XPages

Toolbox is not installed on a server or XPiNC client

• Therefore supporting you for future profiling & maintenance tasks

Developing for Performance Using the XPages Toolbox

Page 21: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Key elements: Profile XPages Request using Wall and CPU Profilers... Perform CPU and Wall time intensive tasks... Analyze profiling results and identify issues in the XPages Toolbox!

Developing for Performance The XPages Toolbox

Page 22: Tip from IBM Connect 2014: Masterclass: XPages Scalability

Acknowledgements and Disclaimers

© Copyright IBM Corporation 2014. All rights reserved.

U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

IBM, the IBM logo, ibm.com, Notes, Domino, Worklight, and XPages are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol (® or ™), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at “Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml

Other company, product, or service names may be trademarks or service marks of others.

Availability. References in this presentation to IBM products, programs, or services do not imply that they will be available in all countries in which IBM operates.

The workshops, sessions and materials have been prepared by IBM or the session speakers and reflect their own views. They are provided for informational purposes only, and are neither intended to, nor shall have the effect of being, legal or other guidance or advice to any participant. While efforts were made to verify the completeness and accuracy of the information contained in this presentation, it is provided AS-IS without warranty of any kind, express or implied. IBM shall not be responsible for any damages arising out of the use of, or otherwise related to, this presentation or any other materials. Nothing contained in this presentation is intended to, nor shall have the effect of, creating any warranties or representations from IBM or its suppliers or licensors, or altering the terms and conditions of the applicable license agreement governing the use of IBM software.

All customer examples described are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual environmental costs and performance characteristics may vary by customer. Nothing contained in these materials is intended to, nor shall have the effect of, stating or implying that any activities undertaken by you will result in any specific sales, revenue growth or other results.