krkr
6/21/2013 - 11:53 AM

New Relic Agent overhead

New Relic Agent overhead

#
# This file configures the New Relic Agent.  New Relic monitors
# Java applications with deep visibility and low overhead.  For more
# information, visit www.newrelic.com.
#
# This configuration file is custom generated for ProtoUuu
#
# This section is for settings common to all environments.
# Do not add anything above this next line.
common: &default_settings
  #
  # ============================== LICENSE KEY ===============================

  # You must specify the license key associated with your New Relic
  # account.  This key binds your Agent's data to your account in the
  # New Relic service.
  license_key: '123xyz'

  # Agent Enabled
  # Use this setting to force the agent to run or not run.
  # Default is true.
  # agent_enabled: true

  # Set to true to enable support for auto app naming.
  # The name of each web app is detected automatically
  # and the agent reports data separately for each one.
  # This provides a finer-grained performance breakdown for
  # web apps in New Relic.
  # Default is false.
  enable_auto_app_naming: false

  # Set to true to enable component-based transaction naming.
  # Set to false to use the URI of a web request as the name of the transaction.
  # Default is true.
  enable_auto_transaction_naming: true

  # Set the name of your application as you'd like it show up in New Relic.
  # if enable_auto_app_naming is false, the agent reports all data to this application.
  # Otherwise, the agent reports only background tasks (transactions for non-web applications) to this application.
  # To report data to more than one application, separate the application names with ";".
  # For example, to report data to"My Application" and "My Application 2" use this:
  # app_name: My Application;My Application 2
  # This setting is required.
  app_name: ProtoUuu

  # The agent uses its own log file to keep its logging
  # separate from that of your application.  Specify the log level here.
  # This setting is dynamic, so changes do not require restarting your application.
  # The levels in increasing order of verboseness are: off, severe, warning, info, fine, finer, finest
  # Default is info.
  log_level: info

  # Log all data to and from New Relic in plain text.
  # This setting is dynamic, so changes do not require restarting your application.
  # Default is false.
  #audit_mode: true

  # The number of log files to use.
  # Default is 1.
  #log_file_count: 1

  # The maximum number of bytes to write to any one log file.
  # Default is 0 (no limit).
  #log_limit_in_kbytes: 0

  # The name of the log file.
  # Default is newrelic_agent.log.
  #log_file_name: newrelic_agent.log

  # The log file directory.
  # Default is the logs directory in the newrelic.jar parent directory.
  #log_file_path:

  # The agent communicates with New Relic via https by
  # default.  If you want to communicate with newrelic via http,
  # then turn off SSL by setting this value to false.
  # This work is done asynchronously to the threads that process your
  # application code, so response times will not be directly affected
  # by this change.
  # Default is true.
  ssl: true

  # Proxy settings for connecting to the New Relic server.
  #
  # If a proxy is used, the host setting is required.  Other settings
  # are optional.  Default port is 8080.  The username and password
  # settings will be used to authenticate to Basic Auth challenges
  # from a proxy server.
  #
  # proxy_host: hostname
  # proxy_port: 8080
  # proxy_user: username
  # proxy_password: password

  # Tells transaction tracer and error collector (when enabled)
  # whether or not to capture HTTP params.  When true, frameworks can
  # exclude HTTP parameters from being captured.
  # Default is false.
  capture_params: false

  # Tells transaction tracer and error collector to not to collect
  # specific http request parameters.
  # ignored_params: credit_card, ssn, password

  # Transaction tracer captures deep information about slow
  # transactions and sends this to the New Relic service once a
  # minute. Included in the transaction is the exact call sequence of
  # the transactions including any SQL statements issued.
  transaction_tracer:

    # Transaction tracer is enabled by default. Set this to false to
    # turn it off. This feature is only available at the higher product levels.
    # Default is true.
    enabled: true

    # Threshold in seconds for when to collect a transaction
    # trace. When the response time of a controller action exceeds
    # this threshold, a transaction trace will be recorded and sent to
    # New Relic. Valid values are any float value, or (default) "apdex_f",
    # which will use the threshold for the "Frustrated" Apdex level
    # (greater than four times the apdex_t value).
    # Default is apdex_f.
    transaction_threshold: apdex_f

    # When transaction tracer is on, SQL statements can optionally be
    # recorded. The recorder has three modes, "off" which sends no
    # SQL, "raw" which sends the SQL statement in its original form,
    # and "obfuscated", which strips out numeric and string literals.
    # Default is obfuscated.
    record_sql: obfuscated

    # Obfuscate only occurrences of specific SQL fields names.
    # This setting only applies if "record_sql" is set to "raw".
    #obfuscated_sql_fields: credit_card, ssn, password

    # Set this to true to log SQL statements instead of recording them.
    # SQL is logged using the record_sql mode.
    # Default is false.
    log_sql: false

    # Threshold in seconds for when to collect stack trace for a SQL
    # call. In other words, when SQL statements exceed this threshold,
    # then capture and send to New Relic the current stack trace. This is
    # helpful for pinpointing where long SQL calls originate from.
    # Default is 0.5 seconds.
    stack_trace_threshold: 0.5

    # Determines whether the agent will capture query plans for slow
    # SQL queries. Only supported for MySQL and PostgreSQL.
    # Default is true.
    explain_enabled: true

    # Threshold for query execution time below which query plans will not
    # not be captured.  Relevant only when `explain_enabled` is true.
    # Default is 0.5 seconds.
    explain_threshold: 0.5

    # Use this setting to control the variety of transaction traces.
    # The higher the setting, the greater the variety.
    # Set this to 0 to always report the slowest transaction trace.
    # Default is 20.
    top_n: 20


  # Error collector captures information about uncaught exceptions and
  # sends them to New Relic for viewing
  error_collector:

    # Error collector is enabled by default. Set this to false to turn
    # it off. This feature is only available at the higher product levels.
    # Default is true.
    enabled: true

    # To stop specific exceptions from reporting to New Relic, set this property
    # to a comma separated list of full class names.
    #
    # ignore_errors:

    # To stop specific http status codes from being reporting to New Relic as errors,
    # set this property to a comma separated list of status codes to ignore.
    # When this property is commented out it defaults to ignoring 404s.
    #
    # ignore_status_codes: 404

  # Cross Application Tracing adds request and response headers to
  # external calls using the Apache HttpClient libraries to provided better
  # performance data when calling applications monitored by other New Relic Agents.
  #
  cross_application_tracer:
    # Set to true to enable cross application tracing.
    # Default is true.
    enabled: true

  # Thread profiler measures wall clock time, CPU time, and method call counts
  # in your application's threads as they run.
  thread_profiler:

    # Set to false to disable the thread profiler.
    # Default is true.
    enabled: true

  #============================== Browser Monitoring ===============================
  # New Relic Real User Monitoring gives you insight into the performance real users are
  # experiencing with your website. This is accomplished by measuring the time it takes for
  # your users' browsers to download and render your web pages by injecting a small amount
  # of JavaScript code into the header and footer of each page.
  browser_monitoring:
    # By default the agent automatically inserts API calls in compiled JSPs to
    # inject the monitoring JavaScript into web pages.
    # Set this attribute to false to turn off this behavior.
    auto_instrument: true
    # Set this attribute to false to prevent injection of the monitoring JavaScript.
    # Default is true.
    enabled: true

# Application Environments
# ------------------------------------------
# Environment specific settings are in this section.
# You can use the environment to override the default settings.
# For example, to change the app_name setting.
# Use -Dnewrelic.environment=<environment> on the Java command line
# to set the environment.
# The default environment is production.

# NOTE if your application has other named environments, you should
# provide configuration settings for these environments here.

development:
  <<: *default_settings
  app_name: ProtoUuu (Development)

test:
  <<: *default_settings
  app_name: ProtoUuu (Test)

production:
  <<: *default_settings

staging:
  <<: *default_settings
  app_name: ProtoUuu (Staging)
Deployed on Heroku with 1 dyno.

Without New Relic Agent : memory_total val=233.94
With New Relic Agent : memory_total val=519.44


---
With New Relic Agent :

2013-06-08T22:40:06.873212+00:00 heroku[web.1]: State changed from crashed to starting
2013-06-08T22:40:13.470468+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=27820 -javaagent:lib/newrelic/newrelic.jar`
2013-06-08T22:40:14.202406+00:00 app[web.1]: Picked up JAVA_TOOL_OPTIONS: -Djava.rmi.server.useCodebaseOnly=true
2013-06-08T22:40:15.022580+00:00 app[web.1]: Jun 8, 2013 22:40:15 +0000 NewRelic 1 INFO: Agent is using Logback
2013-06-08T22:40:15.068403+00:00 app[web.1]: Jun 8, 2013 22:40:15 +0000 NewRelic 1 INFO: Loading configuration file "/app/lib/newrelic/./newrelic.yml"
2013-06-08T22:40:15.421761+00:00 app[web.1]: Jun 8, 2013 22:40:15 +0000 NewRelic 1 INFO: Agent Host: ac1c3e14-7f24-4468-8d64-55cfe767d2d9 IP: 172.19.64.174
2013-06-08T22:40:17.036551+00:00 heroku[router]: at=error code=H20 desc="App boot timeout" method=GET path=/ host=test.protouuu.co fwd="50.18.57.7" dyno= connect= service= status=503 bytes=
2013-06-08T22:40:20.970156+00:00 app[web.1]: Jun 8, 2013 22:40:20 +0000 NewRelic 1 INFO: Configured to connect to New Relic at collector.newrelic.com.:443
2013-06-08T22:40:20.994929+00:00 app[web.1]: Jun 8, 2013 22:40:20 +0000 NewRelic 1 INFO: Setting audit_mode to false
2013-06-08T22:40:20.994929+00:00 app[web.1]: Jun 8, 2013 22:40:20 +0000 NewRelic 1 INFO: Setting protocol to "https"
2013-06-08T22:40:21.256936+00:00 app[web.1]: Jun 8, 2013 22:40:21 +0000 NewRelic 1 INFO: Configuration file is /app/lib/newrelic/./newrelic.yml
2013-06-08T22:40:21.263785+00:00 app[web.1]: Jun 8, 2013 22:40:21 +0000 NewRelic 1 INFO: New Relic Agent v2.19.0 has started
2013-06-08T22:40:21.264032+00:00 app[web.1]: Jun 8, 2013 22:40:21 +0000 NewRelic 1 INFO: Agent class loader: sun.misc.Launcher$AppClassLoader@57f530d8
2013-06-08T22:40:21.263904+00:00 app[web.1]: Jun 8, 2013 22:40:21 +0000 NewRelic 1 INFO: Java version: 1.7.0_21
2013-06-08T22:40:35.597259+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_swap val=7.44 units=MB
2013-06-08T22:40:35.596987+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_cache val=0.04 units=MB
2013-06-08T22:40:35.596744+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_rss val=511.96 units=MB
2013-06-08T22:40:35.596491+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_total val=519.44 units=MB
2013-06-08T22:40:35.597500+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_pgpgin val=144673 units=pages
2013-06-08T22:40:35.598707+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2013-06-08T22:40:35.597742+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_pgpgout val=13601 units=pages
2013-06-08T22:40:35.598473+00:00 heroku[web.1]: Process running mem=519M(101.5%)
2013-06-08T22:40:57.660237+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_cache val=0.04 units=MB
2013-06-08T22:40:57.661253+00:00 heroku[web.1]: Process running mem=537M(104.9%)
2013-06-08T22:40:57.660613+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_pgpgin val=166714 units=pages
2013-06-08T22:40:57.660435+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_swap val=25.36 units=MB
2013-06-08T22:40:57.659875+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_total val=537.27 units=MB
2013-06-08T22:40:57.660787+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_pgpgout val=35665 units=pages
2013-06-08T22:40:57.660056+00:00 heroku[web.1]: source=heroku.13785274.web.1.ac1c3e14-7f24-4468-8d64-55cfe767d2d9 measure=memory_rss val=511.88 units=MB
2013-06-08T22:40:57.661415+00:00 heroku[web.1]: Error R14 (Memory quota exceeded)
2013-06-08T22:41:14.801062+00:00 heroku[web.1]: Stopping process with SIGKILL
2013-06-08T22:41:16.359030+00:00 heroku[web.1]: Process exited with status 137
2013-06-08T22:41:16.369298+00:00 heroku[web.1]: State changed from starting to crashed

---
Without New Relic Agent :

2013-06-09T00:00:12.409063+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=load_avg_1m val=0.00
2013-06-09T00:00:12.409296+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=load_avg_5m val=0.01
2013-06-09T00:00:12.409819+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=memory_total val=233.94 units=MB
2013-06-09T00:00:12.410071+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=memory_rss val=233.87 units=MB
2013-06-09T00:00:12.409537+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=load_avg_15m val=0.01
2013-06-09T00:00:12.410824+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=memory_cache val=0.07 units=MB
2013-06-09T00:00:12.411223+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=memory_swap val=0.00 units=MB
2013-06-09T00:00:12.411459+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=memory_pgpgin val=65546 units=pages
2013-06-09T00:00:12.411697+00:00 heroku[web.1]: source=heroku.13785274.web.1.b33762f0-2a33-4068-99b1-ac31228e9673 measure=memory_pgpgout val=5657 units=pages