-
Notifications
You must be signed in to change notification settings - Fork 53
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
Increased CPU consumption #183
Labels
Comments
GRISHNOV
added a commit
that referenced
this issue
Sep 27, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. Thus, CPU consumption is reduced to about ~1%. Below is a performance comparison using a script `t/benchmark/multi_consumer_work.lua` whith params consumers-count = 650 and batch-size = 5000 on CPU AMD Ryzen 5 5600U. For comparison, consider three commits. The first column is commit (9ff105b) before implementing queue_state_fiber. The second column is commit (159a43d) before implementation of the described proposal. That is, queue_state_fiber calls box.ctrl.wait_r* every millisecond. The third column (offered) is the current offer, the box.ctrl.wait_r* blocking call. The data is given as an arithmetic mean of 25 measurement points: +───────────────+────────────+────────────+────────────+ | [time\commit] | 9ff105b | 159a43d | offered | +───────────────+────────────+────────────+────────────+ | fill queue | 8 197 452 | 8 567 415 | 8 751 545 | +───────────────+────────────+────────────+────────────+ | task confirm | 49 817 371 | 52 203 080 | 53 020 243 | +───────────────+────────────+────────────+────────────+ Final performance comparison as a percentage: +─────────────+──────────────────+──────────────────+─────────────────+ | % down | 9ff105b->159a43d | 159a43d->offered | 9ff105b->offered| +─────────────+──────────────────+──────────────────+─────────────────+ | fill queue | 4.513% down | 2.149% down | 6.759% down | +─────────────+──────────────────+──────────────────+─────────────────+ | task confirm| 4.788% down | 1.565% down | 6.429% down | +─────────────+──────────────────+──────────────────+─────────────────+ As a result, the proposed solution causes a decrease in performance for fill queue 2.149% and task confirm 1.565%. Closes #183
GRISHNOV
added a commit
that referenced
this issue
Sep 27, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. Thus, CPU consumption is reduced to about ~1%. Below is a performance comparison using a script `t/benchmark/multi_consumer_work.lua` whith params consumers-count = 650 and batch-size = 5000 on CPU AMD Ryzen 5 5600U. For comparison, consider three commits. The first column is commit (9ff105b) before implementing queue_state_fiber. The second column is commit (159a43d) before implementation of the described proposal. That is, queue_state_fiber calls box.ctrl.wait_r* every millisecond. The third column (offered) is the current offer, the box.ctrl.wait_r* blocking call. The data is given as an arithmetic mean of 25 measurement points: +───────────────+────────────+────────────+────────────+ | [time\commit] | 9ff105b | 159a43d | offered | +───────────────+────────────+────────────+────────────+ | fill queue | 8 197 452 | 8 567 415 | 8 751 545 | +───────────────+────────────+────────────+────────────+ | task confirm | 49 817 371 | 52 203 080 | 53 020 243 | +───────────────+────────────+────────────+────────────+ Final performance comparison as a percentage: +─────────────+──────────────────+──────────────────+─────────────────+ | % down | 9ff105b->159a43d | 159a43d->offered | 9ff105b->offered| +─────────────+──────────────────+──────────────────+─────────────────+ | fill queue | 4.513% down | 2.149% down | 6.759% down | +─────────────+──────────────────+──────────────────+─────────────────+ | task confirm| 4.788% down | 1.565% down | 6.429% down | +─────────────+──────────────────+──────────────────+─────────────────+ As a result, the proposed solution causes a decrease in performance for fill queue 2.149% and task confirm 1.565%. Closes #183
GRISHNOV
added a commit
that referenced
this issue
Sep 27, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. Thus, CPU consumption is reduced to about ~1%. Below is a performance comparison using a script `t/benchmark/multi_consumer_work.lua` whith params consumers-count = 650 and batch-size = 5000 on CPU AMD Ryzen 5 5600U. For comparison, consider three commits. The first column is commit (9ff105b) before implementing queue_state_fiber. The second column is commit (159a43d) before implementation of the described proposal. That is, queue_state_fiber calls box.ctrl.wait_r* every millisecond. The third column (offered) is the current offer, the box.ctrl.wait_r* blocking call. The data is given as an arithmetic mean of 25 measurement points: +───────────────+────────────+────────────+────────────+ | [time\commit] | 9ff105b | 159a43d | offered | +───────────────+────────────+────────────+────────────+ | fill queue | 8 197 452 | 8 567 415 | 8 751 545 | +───────────────+────────────+────────────+────────────+ | task confirm | 49 817 371 | 52 203 080 | 53 020 243 | +───────────────+────────────+────────────+────────────+ Final performance comparison as a percentage: +─────────────+──────────────────+──────────────────+─────────────────+ | % down | 9ff105b->159a43d | 159a43d->offered | 9ff105b->offered| +─────────────+──────────────────+──────────────────+─────────────────+ | fill queue | 4.513% down | 2.149% down | 6.759% down | +─────────────+──────────────────+──────────────────+─────────────────+ | task confirm| 4.788% down | 1.565% down | 6.429% down | +─────────────+──────────────────+──────────────────+─────────────────+ As a result, the proposed solution causes a decrease in performance for fill queue 2.149% and task confirm 1.565%. Closes #183
GRISHNOV
added a commit
that referenced
this issue
Sep 28, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. Thus, CPU consumption is reduced to about ~1%. Below is a performance comparison using a script `t/benchmark/multi_consumer_work.lua` whith params consumers-count = 650 and batch-size = 5000 on CPU AMD Ryzen 5 5600U. For comparison, consider three commits. The first column is commit (9ff105b) before implementing queue_state_fiber. The second column is commit (159a43d) before implementation of the described proposal. That is, queue_state_fiber calls box.ctrl.wait_r* every millisecond. The third column (offered) is the current offer, the box.ctrl.wait_r* blocking call. The data is given as an arithmetic mean of 25 measurement points: +───────────────+────────────+────────────+────────────+ | [time\commit] | 9ff105b | 159a43d | offered | +───────────────+────────────+────────────+────────────+ | fill queue | 8 197 452 | 8 567 415 | 8 751 545 | +───────────────+────────────+────────────+────────────+ | task confirm | 49 817 371 | 52 203 080 | 53 020 243 | +───────────────+────────────+────────────+────────────+ Final performance comparison as a percentage: +─────────────+──────────────────+──────────────────+─────────────────+ | % down | 9ff105b->159a43d | 159a43d->offered | 9ff105b->offered| +─────────────+──────────────────+──────────────────+─────────────────+ | fill queue | 4.513% down | 2.149% down | 6.759% down | +─────────────+──────────────────+──────────────────+─────────────────+ | task confirm| 4.788% down | 1.565% down | 6.429% down | +─────────────+──────────────────+──────────────────+─────────────────+ As a result, the proposed solution causes a decrease in performance for fill queue 2.149% and task confirm 1.565%. Closes #183
GRISHNOV
added a commit
that referenced
this issue
Sep 28, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. Thus, CPU consumption is reduced to about ~1%. Below is a performance comparison using a script `t/benchmark/multi_consumer_work.lua` whith params consumers-count = 650 and batch-size = 5000 on CPU AMD Ryzen 5 5600U. For comparison, consider three commits. The first column is commit (9ff105b) before implementing queue_state_fiber. The second column is commit (159a43d) before implementation of the described proposal. That is, queue_state_fiber calls box.ctrl.wait_r* every millisecond. The third column (offered) is the current offer, the box.ctrl.wait_r* blocking call. The data is given as an arithmetic mean of 25 measurement points: +───────────────+────────────+────────────+────────────+ | [time\commit] | 9ff105b | 159a43d | offered | +───────────────+────────────+────────────+────────────+ | fill queue | 8 197 452 | 8 567 415 | 8 751 545 | +───────────────+────────────+────────────+────────────+ | task confirm | 49 817 371 | 52 203 080 | 53 020 243 | +───────────────+────────────+────────────+────────────+ Final performance comparison as a percentage: +─────────────+──────────────────+──────────────────+─────────────────+ | % down | 9ff105b->159a43d | 159a43d->offered | 9ff105b->offered| +─────────────+──────────────────+──────────────────+─────────────────+ | fill queue | 4.513% down | 2.149% down | 6.759% down | +─────────────+──────────────────+──────────────────+─────────────────+ | task confirm| 4.788% down | 1.565% down | 6.429% down | +─────────────+──────────────────+──────────────────+─────────────────+ As a result, the proposed solution causes a decrease in performance for fill queue 2.149% and task confirm 1.565%. Closes #183
GRISHNOV
added a commit
that referenced
this issue
Sep 28, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. Thus, CPU consumption is reduced to about ~1%. Below is a performance comparison using a script `t/benchmark/multi_consumer_work.lua` whith params consumers-count = 650 and batch-size = 5000 on CPU AMD Ryzen 5 5600U. For comparison, consider three commits. The first column is commit (9ff105b) before implementing queue_state_fiber. The second column is commit (159a43d) before implementation of the described proposal. That is, queue_state_fiber calls box.ctrl.wait_r* every millisecond. The third column (offered) is the current offer, the box.ctrl.wait_r* blocking call. The data is given as an arithmetic mean of 25 measurement points: +───────────────+────────────+────────────+────────────+ | [time\commit] | 9ff105b | 159a43d | offered | +───────────────+────────────+────────────+────────────+ | fill queue | 8 197 452 | 8 567 415 | 8 751 545 | +───────────────+────────────+────────────+────────────+ | task confirm | 49 817 371 | 52 203 080 | 53 020 243 | +───────────────+────────────+────────────+────────────+ Final performance comparison as a percentage: +─────────────+──────────────────+──────────────────+─────────────────+ | % down | 9ff105b->159a43d | 159a43d->offered | 9ff105b->offered| +─────────────+──────────────────+──────────────────+─────────────────+ | fill queue | 4.513% down | 2.149% down | 6.759% down | +─────────────+──────────────────+──────────────────+─────────────────+ | task confirm| 4.788% down | 1.565% down | 6.429% down | +─────────────+──────────────────+──────────────────+─────────────────+ As a result, the proposed solution causes a decrease in performance for fill queue 2.149% and task confirm 1.565%. Closes #183
GRISHNOV
added a commit
that referenced
this issue
Oct 25, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. Thus, CPU consumption is reduced to about ~1%. More detailed measurements are described in [1]. 1. #192 Closes #183
GRISHNOV
added a commit
that referenced
this issue
Oct 26, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. As a result, in idle mode, the queue_state_faber is in the suspended state, while the main fiber (for example, interactive in interactive-mode) is in the running state. Thus, CPU consumption is reduced to about ~1%. More detailed measurements are described in [1]. 1. #192 Closes #183
LeonidVas
pushed a commit
that referenced
this issue
Oct 26, 2022
Due to the fact that queue_state_fiber called box.ctrl.wait_r* every millisecond, the idle queue consumed more than 10% of CPU. The proposed solution makes calls to box.ctrl.wait_r* blocking until the read/write mode is changed. As a result, in idle mode, the queue_state_faber is in the suspended state, while the main fiber (for example, interactive in interactive-mode) is in the running state. Thus, CPU consumption is reduced to about ~1%. More detailed measurements are described in [1]. 1. #192 Closes #183
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As a result of constant requests from fiber
queue_state_fiber
CPU consumption of tarantool at idle time increased from 12% to 33%. Increasing timeout to0.1
(queue/queue/abstract/queue_state.lua
Line 79 in 2e01cb5
The text was updated successfully, but these errors were encountered: