Performance of JwtConsumer's processToClaims on Linux

Issue #141 closed
Elliot Widdowson created an issue

We are seeing performance issues when invoking the JwtConsumer class's processToClaims method on RedHat 7.6; when the Redhat server is under very light load it's taking >150ms to execute this line of code compared to 1-2ms when run in our local dev environment which is Windows 7. When under load in Redhat this line takes >800ms, but under load in Windows performance doesn't degrade. The Redhat server's CPU is only running at 20% usage during our load tests and there is available memory.

We are using ES256 as our algorithm.

Are you aware of any reasons why we might be experiencing these performance differences between Windows and Linux?

Comments (6)

  1. Elliot Widdowson reporter

    We've found the cause: the wrong security provider was being used to parse tokens in our Redhat environment.

  2. Brian Campbell repo owner

    Happy to hear you figured it out. I didn't have much advice to offer other than look at the providers (that might be using native code for EC).

    For the benefit of others that may come later, can you share any details of what provider or provider configuration was problematic vs. what worked better?

  3. Elliot Widdowson reporter

    The SafeNet Luna Client is on the classpath in Redhat and the Luna security provider was being selected as the provider to use for token parsing; we aren't sure why it has such a performance impact, but it's not the provider we intended to use for this task anyway so we just need to find a way to specify which provider to use.

  4. Log in to comment