<div dir="ltr"><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify" id="docs-internal-guid-3bc1bf97-eed2-3239-5ff9-80784e74a50d"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Good day to All,</span></p><br><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">The question that i’d like to raise here is not simple one, so i’d like to involve as much readers as i can. I’d like to speak about </span><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">oslo.messaging</span> </span><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span>performance </span><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">testing</span>. As community we’ve put lots of efforts in making oslo.messaging widely used drivers stable as much as possible. Stability is a good thing, but is it enough for saying “works well”? I’d say that it’s not. </span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Since oslo.messaging uses driver-based messaging workflow, it makes sense to dig into each driver and collect all required/possible performance metrics.</span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">First of all, it does make sense to figure out how to perform performance testing, first that came into my mind is to simulate high load on one of corresponding drivers. Here comes the question of how it can be accomplished withing available oslo.messaging tools - high load on any driver can perform an application that:</span></p><ul style="margin-left:80px"><li><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">can populate multiple emitters(rpc clients) and consumers (rpc servers).</span></li><li><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">can force clients to send messages of pre-defined number of messages of any length.</span></li></ul><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Another thing is why do we need such thing. Profiling, performance testing can improve the way in which our drivers were implemented. It can show us actual “bottlenecks” in messaging process, in general. In some cases it does make sense to figure out where problem takes its place - whether AMQP causes messaging problems or certain driver that speaks to AMQP fails.</span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Next thing that i want to discuss the architecture of profiling/performance testing. As i can see it seemed to be a “good” way to add profiling code to each driver. If there’s any objection or better solution, please bring them to the light.<br></span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Once we’d have final design for profiling we would need to figure out tools for profiling. After searching over the web, i found pretty interesting topic related to python profiling [1]. After certain investigations it does makes sense discuss next profiling options(apply one or both):</span></p><ul style="margin-left:80px"><li><span style="font-size:15px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Line-by-line timing and execution frequency with a profiler (there are possible Pros and Cons, but i would say the per-line statistics is more than appreciable at initial performance testing steps)</span></li><li><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Memory/CPU consumption</span></li></ul><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Metrics. The most useful metric for us is time, any time-based metric, since it is very useful to know at which step or/and by whom delay/timeout caused, for example, so as it said, we would be able to figure out whether AMQP or driver fails to do what it was designed for.</span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 48.75pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Before proposing spec i’d like to figure out any other requirements, use cases and restrictions for messaging performance testing. Also, if there any stories of success in boosting python performance - feel free to share it.</span></p><br><br><br><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 18.99pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">[1] </span><a href="http://www.huyng.com/posts/python-performance-analysis/" style="text-decoration:none"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">http://www.huyng.com/posts/python-performance-analysis/</span></a></p><br><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 18.99pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Kind regards,</span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 18.99pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Denis Makogon</span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 18.99pt;text-indent:36pt;text-align:justify"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">IRC: denis_makogon</span></p><p dir="ltr" style="line-height:1.15;margin:0pt 72pt 0pt 18.99pt;text-indent:36pt;text-align:justify"><a href="mailto:dmakogon@mirantis.com" style="text-decoration:none"><span style="font-size:16px;font-family:"Times New Roman";color:rgb(17,85,204);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline">dmakogon@mirantis.com</span></a></p><br></div>