I want to shorten the response time of KeyCloak API

The response time of these two APIs of KeyCloak is about 20 [sec], which requires a long time for processing.

POST / {realm} / users / {id} / logout
GET / {realm} / users / {id} / sessions

During the API processing, KeyCloak’s CPU usage is about 30%, so I don’t think there are any problems with the CPU.
There are more than 10000000 Sessions in this Realm, so I suspect that’s the cause.

Please let me know if there is a good way to solve this problem.

Reference: Keycloak Admin REST API