apollo icon indicating copy to clipboard operation
apollo copied to clipboard

Potential side effect of running cyber_recorder

Open YuqiHuai opened this issue 1 year ago • 6 comments

General Question

Hi! I have a general question regarding cyber_recorder (link).

From my understanding cyber_recorder would be equivalent to adding a number of subscribers to CyberRT. Would these added subscribers affect Apollo's real-time performance? In other words, it is possible that cyber_recorder can cause Apollo to behave differently while recording?

YuqiHuai avatar Mar 22 '24 01:03 YuqiHuai

Hello! I didn't test your case but measured time spent in writer->Write(msg) function for pointcloud messages (5-6 MB). And the time depends on fact if there are subscribers to this topic. Difference in function execution time was about x5-10 for inter process subscribing.

From this small and not very real benchmark we can assume that yes, performance will drop, but how much it's worth to discover.

IvDmNe avatar Mar 22 '24 07:03 IvDmNe

@IvDmNe Thank you so much for your help! When you mentioned writer->Write(msg), did you create a new publisher and measured how long it takes to publish a message?

YuqiHuai avatar Mar 22 '24 07:03 YuqiHuai

Yes, exactly.

IvDmNe avatar Mar 22 '24 08:03 IvDmNe

@IvDmNe thank you for your quick response! This information is very helpful and consistent with what I learned from some other ADS. Since point cloud messages are quiet large, do you think smaller messages, like ones that are just 120 bytes, will also affect system performance?

YuqiHuai avatar Mar 22 '24 08:03 YuqiHuai

I suppose, dropout will be in microseconds. For most modules it's not significant.

IvDmNe avatar Mar 22 '24 15:03 IvDmNe

@IvDmNe Thank you for the inputs!

YuqiHuai avatar Mar 22 '24 16:03 YuqiHuai