[undertow-dev] Does record-request-start-time really impact performance?

Stuart Douglas sdouglas at redhat.com
Thu Mar 9 15:30:24 EST 2017


Last time I checked it did have a performance impact, especially for
things like the tech empower benchmark where you are dealing with
hundreds of thousands of requests per second (when you are doing
enough requests a second everything has a cost, no matter how fast it
supposedly is). In general most apps won't notice any difference, but
we still turn it off by default as there is not really any need to use
it unless you want to measure request time.

Stuart

On Fri, Mar 10, 2017 at 3:43 AM, Matt Solnit <msolnit at soasta.com> wrote:
> Hi everyone.  I'd like to add request duration to our HTTP access log, and
> found the "record-request-start-time" setting in the documentation.
>
> The documentation says "This has a small but measurable performance impact."
> But is that really true?  From what I can see in the code, all it's doing is
> calling System.nanoTime().
>
> Chasing this led me to a lot of Google searching on nanoTime() itself, and
> its performance.  There's a lot of out-dated information out there,
> especially with regard to Linux.  From what I can see in the Java source,
> it's using clock_gettime(CLOCK_MONOTONIC), and various sources say this is
> plenty fast:
>
> https://upvoid.com/devblog/2014/05/linux-timers/ (note: this site has an
> expired certificate as of 2/20, so you'll get a browser complaint)
> http://stackoverflow.com/questions/38779763/linux-times-or-clock-gettimeclock-monotonic-which-one-is-faster#comment64948211_38779763
>
> Has anyone measured this at the Undertow level, to see whether
> "record-request-start-time" really affects performance?
>
> -- Matt
>
> _______________________________________________
> undertow-dev mailing list
> undertow-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/undertow-dev


More information about the undertow-dev mailing list