Thank you all for your replies...
Yes, It seems the multiprocess module doesn't work properly in ryu...
I did some experiment with multiprocess and Thread modules also without any
threading.
when I used multiprocess module none of the rules got installed on the
switches, and with threads it did work and the rules were installed
successful; however the best result -- fastest result -- was installing
the rules without any threading ( can any one tell me why?? )
I am not good in programming but I am curious to know what should I change
in Ryu core to allow multiprocess to work?
Yi Tseng using multiple instance of Ryu works but if I want to install
large number of flows in parallel it would be infeasible ( it will have
high overhead )
If anyone has any suggestion and solution I would appreciate it.
On Thu, Jun 22, 2017 at 7:47 AM, Iwase Yusuke <iwase.yusu...@gmail.com>
wrote:
> Hi Yi,
>
>
> On 2017年06月22日 05:18, Yi Tseng wrote:
> > Hi Iwase,
> >
> > I am not sure we can do that with multiprocessing module.
> >
> > Might need to change Ryu event mechanism to do that (e.g. need to send
> events to different process...)
>
> Yes you are right.
> I tried to use multiprocessing module a little, I found we need to some
> modification on Ryu core.
> So this is just an idea.
>
> Thanks,
> Iwase
>
> >
> > Yi
> >
> > 2017-06-20 18:48 GMT-07:00 Iwase Yusuke <iwase.yusu...@gmail.com
> <mailto:iwase.yusu...@gmail.com>>:
> >
> > Hi Corry and Yi,
> >
> >
> > On 2017年06月21日 03:14, Yi Tseng wrote:
> > > Hi,
> > >
> > > I think we have some similar thread before:
> > > https://sourceforge.net/p/ryu/mailman/ryu-devel/thread/
> CAM5MNiVPXW3xWeoHPMriXvSKkUnAHbgv6LqRZ%2BrE5rOZqDKaLQ%
> 40mail.gmail.com/#msg35801377 <https://sourceforge.net/p/
> ryu/mailman/ryu-devel/thread/CAM5MNiVPXW3xWeoHPMriXvSKkUnAH
> bgv6LqRZ%2BrE5rOZqDKaLQ%40mail.gmail.com/#msg35801377>
> > >
> > > Basically, I would suggest using multiple Ryu instance(process) to
> install flows to switch.
> >
> > Thanks Yi!
> > Yes, I guess it is the best way to use multiple instances.
> > The architecture might become complex though.
> >
> > Just an idea, I am wondering if we could use "multiprocessing"
> module...
> >
> > Thanks,
> > Iwase
> >
> > >
> > > 2017-06-19 3:44 GMT-07:00 corey ross <coreyvr...@gmail.com
> <mailto:coreyvr...@gmail.com> <mailto:coreyvr...@gmail.com <mailto:
> coreyvr...@gmail.com>>>:
> > >
> > > Yes I am referring to the first statement "multi-thread on
> Python is not effective enough"...
> > >
> > > Please let me give another example to make my question more
> clear
> > > Lets say the routing algorithm wants to update the paths on
> switch S1, S2, S3. One way is to update all the switches at time 0 (in
> parallel), and the other way is to update s1 at time 0, s2 at time 1, and
> s3 at time 3 (serial).
> > >
> > > Because of GIL in python a thread has to finish its task
> before moving to another thread; with this in mind I believe using threads
> will update the switches in serial; because the first thread has to finish
> installing the rules on s1, then it moves to the next thread to install the
> rules on s2 and so on....
> > >
> > > So my question is in Ryu what mechanism I can use to update
> s1, s2, s3 at time 0 (in one go)?
> > > I hope my question is more clear now.
> > >
> > >
> > > Thank you all for your time,
> > > Corry
> > >
> > >
> > >
> > >
> > >
> > > On Mon, Jun 19, 2017 at 5:26 AM, Iwase Yusuke <
> iwase.yusu...@gmail.com <mailto:iwase.yusu...@gmail.com> <mailto:
> iwase.yusu...@gmail.com <mailto:iwase.yusu...@gmail.com>>> wrote:
> > >
> > > Hi,
> > >
> > >
> > > On 2017年06月17日 20:47, corey ross wrote:
> > > > Hey there,
> > > > I was wondering if it is possible to install multiple
> flows in parallel, if yes how?
> > > >
> > > > for e.g if I have a topology of three switches (s1, s2,
> s3), I want to install flow-rules f1 on s1, f2 on s2 and f3 on s3. How can
> I install this three flow rules in parallel instead of doing so in serial
> fashion?
> > > >
> > > > I have searched around and It seems that using threads
> is not an effective way.
> > >
> > > Please let me make your question more clear.
> > > What does "in parallel" and "in serial" exactly mean?
> > >
> > > You mean; you currently uses multi-thread (using
> "ryu.lib.hub" or "eventlet"),
> > > but some post you read says "multi-thread on Python is not
> effective enough",
> > > right?
> > > If so, are you facing the performance limit, for example?
> > >
> > > Or, you want to get "Datapath" instance for s2 and s3,
> when you get event from
> > > s1?
> > >
> > > Thanks,
> > > Iwase
> > >
> > > >
> > > >
> > > >
> > > > ------------------------------
> ------------------------------------------------
> > > > Check out the vibrant tech community on one of the
> world's most
> > > > engaging tech sites, Slashdot.org!
> http://sdm.link/slashdot
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Ryu-devel mailing list
> > > > Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.
> sourceforge.net> <mailto:Ryu-devel@lists.sourceforge.net <mailto:
> Ryu-devel@lists.sourceforge.net>>
> > > > https://lists.sourceforge.net/lists/listinfo/ryu-devel <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel> <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel>>
> > > >
> > >
> > >
> > >
> > > ------------------------------------------------------------
> ------------------
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > _______________________________________________
> > > Ryu-devel mailing list
> > > Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.
> sourceforge.net> <mailto:Ryu-devel@lists.sourceforge.net <mailto:
> Ryu-devel@lists.sourceforge.net>>
> > > https://lists.sourceforge.net/lists/listinfo/ryu-devel <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel> <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel>>
> > >
> > >
> > >
> > >
> > > --
> > > Yi Tseng (a.k.a Takeshi)
> > > Taiwan National Chiao Tung University
> > > Department of Computer Science
> > > W2CNLab
> > >
> > > https://takeshi.tw
> > >
> > >
> > > ------------------------------------------------------------
> ------------------
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > >
> > >
> > >
> > > _______________________________________________
> > > Ryu-devel mailing list
> > > Ryu-devel@lists.sourceforge.net <mailto:Ryu-devel@lists.
> sourceforge.net>
> > > https://lists.sourceforge.net/lists/listinfo/ryu-devel <
> https://lists.sourceforge.net/lists/listinfo/ryu-devel>
> > >
> >
> >
> >
> >
> > --
> > Yi Tseng (a.k.a Takeshi)
> > Taiwan National Chiao Tung University
> > Department of Computer Science
> > W2CNLab
> >
> > https://takeshi.tw
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel