Tip from IBM Connect 2014: Masterclass: XPages Scalability
-
Upload
socialbiz-usergroup -
Category
Technology
-
view
262 -
download
0
description
Transcript of Tip from IBM Connect 2014: Masterclass: XPages Scalability
![Page 1: Tip from IBM Connect 2014: Masterclass: XPages Scalability](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/1.jpg)
© 2014 IBM Corporation
JMP401: Masterclass: XPages Scalability Tony McGuckin, IBM Martin Donnelly, IBM
![Page 2: Tip from IBM Connect 2014: Masterclass: XPages Scalability](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/2.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/3.jpg)
Developing for Performance
![Page 4: Tip from IBM Connect 2014: Masterclass: XPages Scalability](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/4.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/5.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/6.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/7.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/8.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/9.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/10.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/11.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/12.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/13.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/14.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/15.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/16.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/17.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/18.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/19.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/20.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/21.jpg)
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](https://reader034.fdocuments.us/reader034/viewer/2022051514/548344e6b07959330c8b4a00/html5/thumbnails/22.jpg)
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.