Skip to content

Conversation

@rPraml
Copy link
Collaborator

@rPraml rPraml commented Mar 20, 2025

This is a draft of the DB2 TrustedContext implementation and to compare with the "Connection stealing" approach in #119

Performance throughputs:

Threads MaxConn=200 MaxConn=20
1 6500 6500
10 33800 33800
100 33000 11000
200 29000 10000
500 7600 10000

The numbers are the amount of queries, that are executed in the 5s test run.

Note: We test here with 2 tenants for now
If we do a user switch every time in the "Threads=1" case, we drop down to 1300, so user switch is very expensive. (it would be good, if the pool can return a connection, that is already for the correct tenant, which is here ~ 50%. In our real workload, this number would be lower)

@rPraml rPraml marked this pull request as draft March 20, 2025 09:48
}

boolean switchUser(String user, String password) throws SQLException {
if (!Objects.equals(user, this.user) || !Objects.equals(password, this.password)) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gives a massive performance boost. Switching users take a long time.

@rPraml
Copy link
Collaborator Author

rPraml commented Mar 26, 2025

the stealing approach dead locks... closing this PR

@rPraml rPraml closed this Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants