MASQ-Project / MASQ-Node-issues

This repo contains the issues that are used for planning MASQ Node product work. It has no code in it, only GitHub issue tickets
https://masq.ai/
31 stars 12 forks source link

Spike: Why is Actix bursty? #610

Open dnwiebe opened 2 years ago

dnwiebe commented 2 years ago

Inspection of at least one logfile showed long periods of time (multiple minutes) where the Node did nothing but run the Accountant on thousands of accrual messages like this one:

2022-06-27T14:25:28.964 Thd14: DEBUG: Accountant: Accruing debt to wallet 0x081679b671f1d1590b2d30af3ac848b3b7560456 for consuming routing service 31458 bytes

Examine the Actix documentation and code (look mostly at the documentation for the Actix version we're using, which is 0.7.9, but also at documentation for versions 0.13.0 and later, in case upgrading would help us) and see if you can find a way to encourage Actix actors to process messages as they appear, rather than storing them up for minutes at a time and then monopolizing the ActorSystem while they're processed.

dnwiebe commented 2 years ago

Especially in the more recent versions of Actix, look for a feature that provides backpressure when sending messages to Actors. It may not be called backpressure; they may call it something different. But if you can find it, it might help.