Skip to content

O2sim: Add rate limiting to mctracks proxy#11578

Merged
sawenzel merged 5 commits into
AliceO2Group:devfrom
aalkin:add-rate-limiting-to-mctracks-proxy
Jun 29, 2023
Merged

O2sim: Add rate limiting to mctracks proxy#11578
sawenzel merged 5 commits into
AliceO2Group:devfrom
aalkin:add-rate-limiting-to-mctracks-proxy

Conversation

@aalkin

@aalkin aalkin commented Jun 28, 2023

Copy link
Copy Markdown
Member

Adds rate limiting to mctracks-proxy. Adds sending EoS to forwarding channel if o2sim quits earlier. Kine forward channel configuration is changed to pair to avoid dropping events. Note that proxy sends a single event per "timeframe". Rate limiting needs to be set in terms of number of events that are to be kept in memory by the proxy.

@aalkin aalkin requested a review from a team as a code owner June 28, 2023 11:59
Comment thread run/o2sim_parallel.cxx
parts.AddPart(std::move(payload));
forwardchannel.Send(parts);
LOGP(info, "SENDING END-OF-STREAM TO PROXY AT {}", address.c_str());
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couldn't we have this in the HitMerger (which also knows when all
events are done)? Or do you target EOS even in case of failures here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, this way it will be sent even in case of failures so the proxy will not be stuck if o2sim was killed. We can also potentially avoid event counting in the proxy, but I did not touch that for now.

@sawenzel sawenzel merged commit 4f0db8d into AliceO2Group:dev Jun 29, 2023
mwinn2 pushed a commit to mwinn2/AliceO2 that referenced this pull request Aug 24, 2023
* O2sim: rate-limited proxy

* change channel to pair from pub/sub to prevent dropping events

* add rate limit to example script

* send EoS to proxy if we finish early
@aalkin aalkin deleted the add-rate-limiting-to-mctracks-proxy branch January 16, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants