DropWizard performance and logging

I’ve been examining the performance of my project’s DropWizard microservices. If you set the default loglevel to debug, DropWizard is very chatty – which is not good for performance. Using Gatling to locally stress-test the service (eg both Gatling and the service were running on the same machine), I was getting 21k requests fulfilled over 10 minutes. A minor change to the log levels increased this from 21k to 113k requests fulfilled.

So before

================================================================================
2014-02-10 15:04:02                                                 619s elapsed
---- Load parallel -------------------------------------------------------------
Users  : [#################################################################]100%
          waiting:0     / running:0     / done:100  
---- Requests ------------------------------------------------------------------
> Global                                                     OK=25873  KO=4210  
> Realtime interface                                         OK=25873  KO=4210  
================================================================================

Changing the log levels in your config.yaml file

http:
 requestLog:
  console:
   # On a server, nobody is attached to STDOUT anyway
   enabled: false
 
logging:
  loggers:
    # Stop the DropWizard chatty bits
    org.eclipse.jetty: WARN
    org.apache.http: WARN
    com.yammer.metrics: WARN
 
  console:
    # Again, nobody can hear STDOUT on a server
    enabled: false

logging:
loggers:
# Stop the DropWizard chatty bits
org.eclipse.jetty: WARN
org.apache.http: WARN
com.yammer.metrics: WARN

console:
# Again, nobody can hear STDOUT on a server
enabled: false

resulted in the following improvement

================================================================================
2014-02-10 15:19:04                                                 610s elapsed
---- Load parallel -------------------------------------------------------------
Users  : [#################################################################]100%
          waiting:0     / running:0     / done:100  
---- Requests ------------------------------------------------------------------
> Global                                                     OK=113011 KO=264   
> Realtime interface                                         OK=113011 KO=264   
================================================================================

This is my personal blog - all views are my own.

Tagged with: , , ,