Hi:

I have been using the "ofctl_rest" RYU application and adding and modifying 
flows via REST interface (I'm using pycurl)

Here's my python script, basically, it just updates the PYCURL string with new 
IP's and continuously PUSH it to the RYU's REST interface.

c = pycurl.Curl()
   c.setopt(c.URL, 'http://%s:8080/stats/flowentry/%s' % (controller,command))
   c.setopt(c.TIMEOUT, 5)
   c.setopt(c.POSTFIELDS, data)

    for x in range(0, (no_of_ips)):
        ip_str = '%d.%d.%d.%d' % ((ip+x) >> 24,
                                  (ip+x) >> 16 & 0x00FF,
                                  (ip+x) >> 8 & 0x0000FF,
                                  (ip+x) & 0x000000FF)
        table1['match']['nw_dst'] = '%s/32' % ip_str
        table1['cookie'] = str(cookie + x)
        table1['match']['metadata'] = str(meta)
        table1['metadata'] = str(metadata)
        data = json.dumps(table1)
        c.perform()


However, I'm noticing a peak performance of 800 flow add/mods per second, vs 
the 2500 flow add/mods per second I get by just using the OpenFlow interface 
alone.

Looking at the consumption, it seems RYU controller is very busy copying 
messages from the REST interface to the Openflow interface (I understand 
there's more than just copy)

Tasks: 213 total,   2 running, 207 sleeping,   0 stopped,   4 zombie
Cpu0  : 94.0%us,  4.3%sy,  0.0%ni,  0.3%id,  0.0%wa,  0.0%hi,  1.3%si,  0.0%st
Cpu1  :  4.9%us,  1.3%sy,  0.0%ni, 92.5%id,  0.0%wa,  0.0%hi,  1.3%si,  0.0%st
Cpu2  :  4.7%us,  3.4%sy,  0.0%ni, 91.2%id,  0.0%wa,  0.0%hi,  0.7%si,  0.0%st
Cpu3  :  0.0%us,  0.0%sy,  0.0%ni,100.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  12242968k total,  7894340k used,  4348628k free,   416328k buffers
Swap: 12517372k total,        0k used, 12517372k free,  6147564k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
26957 tester    20   0  106m  22m 3708 R   99  0.2  15:37.12 ryu-manager


My current device does not support wildcard, so I must add/mod large amount of 
flows one flow entry at a time. Is it possible to:


1)      Improve the RYU REST API performance in the future, for example, 
instead of invoking an event for every message, a method to add a group of 
flows and generate 1 event for N flows.

2)      Make RYU multi-threaded to improve performance for high flow operations

Much Thanks
Morgan Yang
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to