Thank you for the answer! I haven't tried to run it with PyPy. The main reason is that performance of more than an order of magnitude below what I need, which lead me to investigating the bottlenecks first.
My guess is that the profiler only looks at the main thread (since I'm seeing almost only init and sleep). Can you give some more information about the different threads? I'm seeings 5 thread (poxdesk is running): - Main thread (boot / init) - Webserver? - Two threads running recoco (What is the difference?) - Socket thread? Maybe I should explain more clearly what is happening: When the controller becomes under more stress, the link discovery modules throws a timeout. Immediately afterwards it fires a link discovered event. I thought this was caused by the fact that the LLDP packets are delayed to much in the scheduler. Can this be the case? However the time needed to install new flows (based on packet_in events) does not seem to change, which makes me think it is a discovery specific issue. Changing the delay times in discovery module only has a minor impact. Any ideas? 2013/3/19 Murphy McCauley <[email protected]> > I don't have any experience profiling POX, but here are some thoughts. > > 1. Have you tried running your application using PyPy instead of CPython? > > 2. It could be that the problem is related to the cost of switching > between the recoco thread and the select IO thread. > This may also be why you're not seeing useful info in the profiler. The > debugger branch has a tweak where recoco tasks and IO are done on the same > thread. This is less conceptually clean and interferes with some things > (e.g. tkinter), but can reduce IO latency considerably which can make a > notable improvement in performance for some things. A planned feature for > carp is to be able to enable this mode from the commandline, but you might > see if you can get your app running on the debugger branch now to try it > out. > > -- Murphy > > On Mar 19, 2013, at 5:36 AM, Tmusic wrote: > > > Hi, > > > > My pox application is slower than expected, so I'm trying to profile it. > > Unfortunately the information from cProfile is not very useful. It only > shows >97% sleep, a bit of initialization, but the calls made by the > scheduler (recoco) seem to be missing from the output. > > > > Has any tried to profile a POX application or does anyone know how to > get better profiling info? > > > > Thanks in advance! > > > > Tim > > > >
