More Related Content Similar to A301 ctu madrid2016-monitoring (20) More from Michael Dawson (15) A301 ctu madrid2016-monitoring1. A301
From Startup to Enterprise, learn how
performance monitoring can help you
scale your application
Michael Dawson, IBM Runtime Technologies
2. © 2016 IBM Corporation 2
About Michael Dawson
Senior Software Developer @ IBM
IBM Runtime Technologies Node.js Technical Lead
Node.js collaborator and CTC member
Active in LTS, build, benchmarking , api
and post-mortem working groups
Contact me:
michael_dawson@ca.ibm.com
Twitter: @mhdawson1
https://www.linkedin.com/in/michael-dawson-6051282
3. © 2016 IBM Corporation 3
About Toby Corbin
Software Developer @ IBM
IBM Runtime Technologies monitoring lead
15 years at IBM
Last 8 working on monitoring solutions for Java and more
recently Node.js
Contact me:
corbint@uk.ibm.com
Twitter: @TobesCorbin
4. Agenda
• Common scaling problems
• Common problems – what can I do ?
• Applying performance monitoring
• “Classic” deployment environment
• Demo
• ”Cloud” deployment environment
• Collecting data in the cloud
• Demo
• Summary
© 2016 IBM Corporation 4
5. • Lower than expected throughput in the application
© 2016 IBM Corporation 5
Common Scaling Problems
6. • Lower than expected throughput in the application
• Poor response time
© 2016 IBM Corporation 6
Common Scaling Problems
7. • Lower than expected throughput in the application
• Poor response time
• Higher than expected CPU usage for the level of
throughput/load
© 2016 IBM Corporation 7
Common Scaling Problems
8. • Lower than expected throughput in the application
• Poor response time
• Higher than expected CPU usage for the level of
throughput/load
• Extremely slow progression looking similar to a
hang or becoming unresponsive
© 2016 IBM Corporation 8
Common Scaling Problems
10. © 2016 IBM Corporation 10
Common Scaling Problems – Node.js Context
11. • Identify limiting factor
• CPU
• I/O
• Memory
• Synchronization
• Performance monitoring is the tool for the job
© 2016 IBM Corporation
Common Scaling Problems – What can I do ?
11
12. • CPU
• Faster CPU
• More CPUs (+ more Node.js instances)
• Reduce CPU Usage
• Extract CPU Intensive work
© 2016 IBM Corporation
Common Scaling Problems – What can I do ?
12
13. • I/O
• Identify which I/O is bottleneck
• Optimize I/O provider (database, file system etc.)
• Optimize requests profile
© 2016 IBM Corporation
Common Scaling Problems – What can I do ?
13
14. • Memory
• Heap - garbage collector
• Tune heap size
• Optimize allocation profile
• Native memory
• Increase system memory
• Optimize allocation profile
• Node.js
• Default heap ~ 1.5 G
• --max-old-space-size=XXX
© 2016 IBM Corporation
Common Scaling Problems – What can I do ?
14
16. • “Classic” : desktop development, on premise
deployment
© 2016 IBM Corporation
Investigating - “Classic” Deployments
Capture and evaluate
post-mortem
16
17. • Capture and evaluate post-mortem
• Turn on application logging and send to a file
• Capture verbosegc output
• Generate a heap dump to see where memory is being
used – https://github.com/bnoordhuis/node-heapdump
• nodereport - https://github.com/nodejs/nodereport
© 2016 IBM Corporation
--trace_gc
--trace_gc_nvp
--trace_gc_verbose
Investigating - “Classic” Deployments
17
18. • “Classic” : desktop development, on premise
deployment
© 2016 IBM Corporation
Investigating - “Classic” Deployments
Live
Monitoring
18
19. • Understand your applications behavior as it
occurs
• Connect a remote debugger
• Use live performance monitoring tools
© 2016 IBM Corporation
Investigating - “Classic” Deployments
© 2016 IBM Corporation
20. © 2016 IBM Corporation
Investigating - “Classic” Deployments
• “Classic” : desktop development, on premise
deployment
• Use the same tools for both
20
21. • “Classic” : desktop development, on premise
deployment
• Use the same tools for both
© 2016 IBM Corporation
Investigating - “Classic” Deployments
21
22. © 2016 IBM Corporation
Investigating - “Classic” Deployments
• “Classic” : desktop development, on premise
deployment
• Use the same tools for both
22
24. Live monitoring demo
• Demo of Health Center, development monitoring solution
• Free from Eclipse marketplace
• http://marketplace.eclipse.org/content/ibm-monitoring-and-diagnostic-tools-health-center
• http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/
© 2016 IBM Corporation 24
25. • “Cloud” : desktop development, on cloud
deployment
• Can we use the same tools for both ?
© 2016 IBM Corporation
Investigating - “Cloud” Deployments
25
26. © 2016 IBM Corporation
Investigating - “Cloud” Deployments
• “Cloud” : desktop development, on cloud
deployment
• Can we use the same tools for both ?
26
27. • No persistent local file system
• What happens if the container drops and
restarts ?
• Where do you now send your log data ?
© 2016 IBM Corporation
Investigating - “Cloud” Deployments
27
28. © 2016 IBM Corporation
Investigating - “Cloud” Deployments
• “Cloud” : desktop development, on cloud
deployment
• Can we use the same tools for both ?
28
29. • Application could be anywhere in the cloud
• Can’t just attach a remote debugger anymore
• Blocked ports
• Multiple instances
• Proxies
• We need a new approach for collecting data in the
© 2016 IBM Corporation
Investigating - “Cloud” Deployments
29
30. • Elastic Search - https://www.elastic.co/products/elasticsearch
• Logstash - https://www.elastic.co/products/logstash
• Kibana - https://www.elastic.co/products/kibana
© 2016 IBM Corporation
Collecting data in the cloud – ELK (open source)
30
31. Collecting data in the cloud
• Data now has to be sent somewhere and stored
app
server
app
server
Log data
Log data
© 2016 IBM Corporation 31
32. • Send data to logstash
app
server
app
server
logstash
Log data
Log data
© 2016 IBM Corporation 32
Collecting data in the cloud
33. • Elasticsearch can aggregate over this data
app
server
app
server
logstash Elasticsearch
Log data
Log data
© 2016 IBM Corporation 33
Collecting data in the cloud
34. • Kibana can be used to visualize
app
server
app
server
logstash Elasticsearch
Log data
Log data
© 2016 IBM Corporation 34
Collecting data in the cloud
35. What about performance monitoring data ?
• ELK + appmetrics
• Build your own
• appmetrics API – capture
• push to elastic search
• appmetrics-elk
• – prebuilt integration
© 2016 IBM Corporation
3
5
36. Collecting data in the cloud
• Elasticsearch can correlate log and metrics data
app
server
app
server
logstash Elasticsearch
Log data
Log data
Monitored data
Monitored data
© 2016 IBM Corporation 36
37. Appmetrics-elk demo
• Code walkthrough and demo
• https://github.com/RuntimeTools/appmetrics
• https://github.com/RuntimeTools/appmetrics-elk
37© 2016 IBM Corporation
39. Managed monitoring solutions
• Transactions and utilizations vs code
• Products like IBM Application Performance
Management (APM) provide contextual monitoring
software.
• E.g. your transactions are going slow
• Generally focus on high level dash boarding, not
low level detail of the VM
© 2016 IBM Corporation 39
40. Summary
• Common scaling problems
• Common problems – what can I do ?
• Applying performance monitoring
• “Classic” deployment environment
• Demo
• ”Cloud” deployment environment
• Collecting data in the cloud
• Demo
© 2016 IBM Corporation 40
41. Summary
• Performance monitoring is key tool for scaling
your applications
• “Classic” and “Cloud” environment may require
different approaches
• The same data can be used in both cases
© 2016 IBM Corporation 41
42. Michael Dawson
Thank you very much.
IBM
Runtime Technologies
michael_dawson@ca.ibm.com
© 2016 IBM Corporation 42
Toby Corbin
IBM
Runtime Technologies
corbint@uk.ibm.com
43. Your feedback is valuable
Please complete your session or lab evaluation!
Session number [A301]
Provide your evaluations by:
Evaluation forms:
Fill out a form at the end of each
session
Paper forms are located in each of the
session or lab rooms
Complete the session survey on
Event Connect Portal:
https://portal.ibmeventconnect.com/m
adrid2016
Select Sessions, then Session
Finder, and complete the survey
- Or
-
© 2016 IBM Corporation 43
45. Copyright © 2016 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission
from IBM.
U.S. Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.
Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of
initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS
DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE
USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM
products and services are warranted according to the terms and conditions of the agreements under which they are provided.
Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.
Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers
have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.
References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in
which IBM operates or does business.
Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials
and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant
or their specific situation.
It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and
interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such
laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law.
46. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has
not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products.
Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the
ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other
intellectual property right.
• IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™,
FASP®, FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on
Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®,
PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling
Commerce®, StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of
International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other
companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.
• Node.js is an official trademark of Joyent. IBM SDK for Node.js is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
• Java, JavaScript and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates.
• npm is a trademark of npm, Inc.