You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Introduction

Almost 2 years ago, I built a performance test framework that drives the Knox Gateway configured by different use cases. At that time, I implemented one use case that acquires/renews/uses Knox tokens. You can read this article for further details.

In this post, I'll explain how that performance test tool was used to measure some of the key metrics of Knox's token management feature such as response times, memory consumption, etc...

Configuration

The performance test framework's properties were modified as follows:

perf.test.usecase.knoxtoken.numOfThreads=10
perf.test.usecase.knoxtoken.testDurationInSecs=3600
perf.test.usecase.knoxtoken.requestDelayLowerBoundInSecs=3
perf.test.usecase.knoxtoken.requestDelayUpperBoundInSecs=6

Additionally, I wanted to measure the newest token management backend that persists token information in a relational database (PostgreSQL 10, in this test) instead of Zookeeper or local keystores. To be able to do that I'd to add the following configuration in gateway-site.xml:

    <property>
        <name>gateway.service.tokenstate.impl</name>
        <value>org.apache.knox.gateway.services.token.impl.JDBCTokenStateService</value>
    </property>
     <property>
        <name>gateway.database.type</name>
        <value>postgresql</value>
    </property>
    <property>
        <name>gateway.database.connection.url</name>
        <value>jdbc:postgresql://smolnar.local:5432/postgres?user=postgres</value>
    </property>

Test results

1.) 1-hour test execution with a medium-size load (tokens were generated between 3-6 seconds):

Number of tokens createdNumber of tokens renewedAverage response time (token creation)*Average response time (token renewal)
730634664.77 ms15.53 ms

Memory graph (using JConsole)











JSON/YAML result files: testResults.zip

2.) 2-hour test execution with a medium-size load (tokens were generated between 3-6 seconds):

Number of tokens createdNumber of tokens renewedAverage response time (token creation)*Average response time (token renewal)
1774084552.47 ms12.19 ms

Memory graph (using JConsole)

JSON/YAML result files: testResult.zip

*:  There is a short warmup period at the beginning of each test round (see test results where token creation time takes ~2 seconds a couple of times). We could even see better results if those values were not recorded at the end (the longer the test period the better the average result is).

  • No labels