Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use mget instead of single get on getStates for alias ids #2077

Merged
merged 1 commit into from Dec 30, 2022

Conversation

foxriver76
Copy link
Collaborator

@foxriver76 foxriver76 commented Dec 30, 2022

this could improve the performance lack reported in #1512. If it still persists we need to dig deeper than the low hanging fruits.

Performing getStates 100 times over 10,000 alias states, leads to the following changes:

Results previous to this change:
JSONL:

{"getStatesMultiAlias":{"timeMean":1713.29,"timeStd":0,"cpuMean":50.85,"cpuStd":17.85,"memMean":127.34,"memStd":7.05,"controllerCpuMean":51.68,"controllerCpuStd":14.52,"controllerMemMean":199.58,"controllerMemStd":5.78,"eventLoopLagMean":1.31,"eventLoopLagStd":8.13,"actionsPerSecondMean":0.06,"actionsPerSecondStd":0,"epochs":1,"iterations":100,"statesDbType":"jsonl","objectsDbType":"jsonl"}}

REDIS:

{"getStatesMultiAlias":{"timeMean":889.78,"timeStd":0,"cpuMean":75.18,"cpuStd":16.16,"memMean":138.9,"memStd":15.99,"controllerCpuMean":1.01,"controllerCpuStd":5.63,"controllerMemMean":92.38,"controllerMemStd":0.96,"eventLoopLagMean":1.85,"eventLoopLagStd":11.68,"actionsPerSecondMean":0.11,"actionsPerSecondStd":0,"epochs":1,"iterations":100,"statesDbType":"redis","objectsDbType":"redis"}}

after change:
JSONL:

{"getStatesMultiAlias":{"timeMean":97.45,"timeStd":0,"cpuMean":40.87,"cpuStd":44.53,"memMean":181.1,"memStd":18.94,"controllerCpuMean":83.54,"controllerCpuStd":41.67,"controllerMemMean":307.36,"controllerMemStd":44.34,"eventLoopLagMean":15.62,"eventLoopLagStd":32.48,"actionsPerSecondMean":1.03,"actionsPerSecondStd":0,"epochs":1,"iterations":100,"statesDbType":"jsonl","objectsDbType":"jsonl"}}

REDIS:

{"getStatesMultiAlias":{"timeMean":39.63,"timeStd":0,"cpuMean":117.97,"cpuStd":37.06,"memMean":187.17,"memStd":21.89,"controllerCpuMean":1.05,"controllerCpuStd":4.07,"controllerMemMean":70.86,"controllerMemStd":0.35,"eventLoopLagMean":52.49,"eventLoopLagStd":42.38,"actionsPerSecondMean":2.52,"actionsPerSecondStd":0,"epochs":1,"iterations":100,"statesDbType":"redis","objectsDbType":"redis"}}

@foxriver76 foxriver76 marked this pull request as ready for review December 30, 2022 17:17
@Apollon77
Copy link
Collaborator

wow ...JSONL 17times as fast, Redis 23times

@Apollon77 Apollon77 merged commit 04a5bc8 into master Dec 30, 2022
@Apollon77 Apollon77 deleted the mget-get-states-alias branch December 30, 2022 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants