Ask a question about the mechanism for canister cycle consumption, thanks!

Hello, everyone! We have a question for the developer community. We’ve noticed an unusually high consumption of cycles in a token’ swap pool canister (kf35v-pyaaa-aaaag-qcuxa-cai). We inquired about transaction records, transaction volume, etc ., But no abnormality was found, this pool canister only had 10 transactions in a few months, but this canister is consuming an average of 2T cycles per day.

For comparison, the CHAT token’ pool canister (ne2vj-6yaaa-aaaag-qb3ia-cai), which experiences much higher transaction volumes, but consumes 1T cycle every 2-3 days.

Could you please provide some insight into the cycle consumption mechanism? What reasons might be causing this canister (kf35v-pyaaa-aaaag-qcuxa-cai) to consume such a significant amount of cycles? Or how can we query? Your help would be greatly appreciated. Thank you so much!

Do you use timers or a heartbeat in your canister? They can get pretty expensive. I can see that the two canisters don’t have the same module hash, so I’d first take a look at the code diff and search for any timer usage difference between the two

1 Like

Hello Severin, Thanks a lot!

We have utilized a timer, not just for these two pools’ canisters, but for all of our other canister pools as well. However, the canister “kf35v-pyaaa-aaaag-qcuxa-cai” is consuming significantly more cycles. This is what we are trying to understand.

Thank you for your assistance.

Since you seem to be consuming double the cycles, is there a chance you’re setting the timer twice? Or on half the interval?

1 Like

Thank you for your answer, Severin. It’s not clear if this is the reason, but the developers have already made updates. we’ll check the recharge records for the automatic cycle recharge the following day to see if the issue is resolved.

Any updates on what was the cause ? Thanks

1 Like

Hey Zack,

Just a quick update: the devs have updated the canister, but it seems like the cycles consumption is still too high. So, they’ve decided to turn off the timer for this canister and reassess the situation. I’ll let you know if there are any updates. Be back soon. Thanks!

1 Like

Hey Zack, Just wanted to update you. Even after removing the timer, the cycle consumption is still abnormal. At the moment, we haven’t found the reason for it.

1 Like

Thanks for the update. Will put this on the “issues with cycles” to do list, looking into it.

1 Like