I've adapted cbench.py to handle OF1.4, can you take a look? Not sure about
the match, I guess default values are ok?
Then I ran both cbench versions, this time in *throughput* mode, with the
respective cbench app running and the results are a lot closer now (full
output attached).
Original cbench with cbench.py running:
RESULT: 16 switches 15 tests min/max/avg/stdev = 11959.97/12808.28/
*12390.28*/233.99 responses/s
Modified cbench with cbench_14.py running:
RESULT: 16 switches 15 tests min/max/avg/stdev =
8763.60/9798.35/*9278.47*/291.91
responses/s
André Mantas <andremant...@gmail.com> escreveu no dia segunda, 23/05/2016
às 11:24:
> Thanks for your help and sorry for the delay.
>
> The -m cProfile worked. I've attached the results of the profile and the
> output from both cbench versions. This time I tested with less switches and
> less loops but the results are almost the same (simple_switch.py sends ~2x
> more replies).
>
> Is it possible that simple_switch_14.py thinks that the switch has the
> flow rules in its table? Because looking at the flows/sec for each switch
> in cbench output, only the first loop has high values.
> It might have to do with the features reply I send though.
>
> Victor Orlikowski <v...@duke.edu> escreveu no dia domingo, 22/05/2016 às
> 00:49:
>
>> On May 19, 2016, at 6:08 PM, Victor J. Orlikowski <v...@duke.edu> wrote:
>> >
>> > A quick mailing list search suggests that there was a patch submitted,
>> back in 2013, to have all of Ryu be able to be run under cProfile; it
>> doesn't appear to have been committed.
>> > It might make sense, though, to wrapper the appropriate portions of
>> simple_switch.py and simple_switch_14.py in cProfile or hotshot, to see if
>> there are significant differences in performance between the two (and - if
>> so - where the time is being spent).
>>
>> A quick followup...
>>
>> If you can, it may make sense to run ryu-manager using an invocation
>> similar to the following:
>> python -m cProfile -s tottime ryu-manager ...
>>
>> It *should* be possible to profile your apps that way - but I have not
>> actually *tried* it. ;)
>>
>> Best,
>> Victor
>> --
>> Victor J. Orlikowski <> vjo@[cs.]duke.edu
>>
>>
cbench: controller benchmarking tool
running in mode 'throughput'
connecting to controller at localhost:6653
faking 16 switches offset 1 :: 16 tests each; 1000 ms per test
with 100000 unique source MACs per switch
learning destination mac addresses before the test
starting test with 1000 ms delay after features_reply
ignoring first 1 "warmup" and last 0 "cooldown" loops
connection delay of 0ms per 1 switch(es)
debugging info is off
12:07:41.038 16 switches: flows/sec: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 total = 0.000000 per ms
12:07:42.139 16 switches: flows/sec: 865 744 736 736 744 736 744 744
736 744 744 736 744 736 736 736 total = 11.959971 per ms
12:07:43.242 16 switches: flows/sec: 752 752 752 752 752 752 752 752
752 752 760 752 760 752 752 752 total = 12.022500 per ms
12:07:44.343 16 switches: flows/sec: 798 773 765 771 773 765 773 773
765 773 773 765 773 765 765 773 total = 12.341581 per ms
12:07:45.448 16 switches: flows/sec: 768 768 768 768 768 768 768 768
768 768 776 768 768 768 768 768 total = 12.239576 per ms
12:07:46.577 16 switches: flows/sec: 882 786 786 786 786 786 786 786
786 786 786 786 786 786 793 786 total = 12.331342 per ms
12:07:47.685 16 switches: flows/sec: 760 760 768 760 760 760 760 760
768 760 760 760 760 760 768 760 total = 12.104317 per ms
12:07:48.793 16 switches: flows/sec: 784 784 784 784 784 784 784 784
784 784 784 784 784 784 790 784 total = 12.470042 per ms
12:07:49.900 16 switches: flows/sec: 892 777 777 777 777 777 777 777
777 777 777 777 777 777 777 777 total = 12.467705 per ms
12:07:51.001 16 switches: flows/sec: 800 800 792 792 800 792 800 800
792 800 800 792 800 792 792 792 total = 12.735962 per ms
12:07:52.103 16 switches: flows/sec: 906 793 793 793 793 793 793 793
793 793 793 793 801 793 793 793 total = 12.808283 per ms
12:07:53.210 16 switches: flows/sec: 792 784 784 784 784 784 784 784
784 784 784 784 784 784 784 784 total = 12.470369 per ms
12:07:54.313 16 switches: flows/sec: 883 785 785 785 785 785 785 785
785 785 785 785 785 785 785 785 total = 12.645670 per ms
12:07:55.416 16 switches: flows/sec: 784 776 776 776 776 776 776 776
776 776 776 776 776 776 776 776 total = 12.402940 per ms
12:07:56.525 16 switches: flows/sec: 776 776 784 776 776 776 776 776
784 776 784 776 776 776 784 776 total = 12.358254 per ms
12:07:57.631 16 switches: flows/sec: 903 777 777 777 777 777 777 777
777 777 777 777 777 777 784 777 total = 12.495624 per ms
RESULT: 16 switches 15 tests min/max/avg/stdev =
11959.97/12808.28/12390.28/233.99 responses/s
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2012 Isaku Yamahata <yamahata at valinux co jp>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
A dumb OpenFlow 1.0 responder for benchmarking the controller framework.
Intended to be used with oflops cbench.
"""
from ryu.base import app_manager
from ryu.controller import ofp_event
from ryu.controller.handler import MAIN_DISPATCHER
from ryu.controller.handler import set_ev_cls
from ryu.ofproto import ofproto_v1_4
class Cbench14(app_manager.RyuApp):
OFP_VERSIONS = [ofproto_v1_4.OFP_VERSION]
def __init__(self, *args, **kwargs):
super(Cbench14, self).__init__(*args, **kwargs)
@set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
def packet_in_handler(self, ev):
msg = ev.msg
datapath = msg.datapath
ofproto = datapath.ofproto
match = datapath.ofproto_parser.OFPMatch()
mod = datapath.ofproto_parser.OFPFlowMod(
datapath, match=match, cookie=0, command=ofproto.OFPFC_ADD,
idle_timeout=0, hard_timeout=0,
priority=ofproto.OFP_DEFAULT_PRIORITY,
flags=0, instructions=None)
datapath.send_msg(mod)
cbench 1.4: controller benchmarking tool
running in mode 'throughput'
connecting to controller at localhost:6653
faking 16 switches offset 1 :: 16 tests each; 1000 ms per test
with 100000 unique source MACs per switch
learning destination mac addresses before the test
starting test with 1000 ms delay after features_reply
ignoring first 1 "warmup" and last 0 "cooldown" loops
connection delay of 0ms per 1 switch(es)
debugging info is off
12:07:04.460 16 switches: flows/sec: 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 total = 0.000000 per ms
12:07:05.568 16 switches: flows/sec: 673 544 544 544 544 544 544 544
545 544 544 544 544 544 544 544 total = 8.763602 per ms
12:07:06.669 16 switches: flows/sec: 568 576 576 576 576 570 576 576
576 576 576 576 568 576 576 576 total = 9.193623 per ms
12:07:07.779 16 switches: flows/sec: 576 576 576 576 576 576 576 576
582 576 576 576 576 576 576 576 total = 9.142107 per ms
12:07:08.880 16 switches: flows/sec: 613 564 572 572 572 564 572 564
572 564 564 572 564 564 569 564 total = 9.125087 per ms
12:07:09.985 16 switches: flows/sec: 584 584 584 584 584 584 584 584
589 584 584 584 584 584 584 584 total = 9.307322 per ms
12:07:11.092 16 switches: flows/sec: 560 560 560 560 560 560 560 560
561 560 560 560 560 560 560 560 total = 8.908821 per ms
12:07:12.197 16 switches: flows/sec: 666 570 570 570 570 570 570 570
562 570 570 570 577 570 570 570 total = 9.169346 per ms
12:07:13.300 16 switches: flows/sec: 560 560 560 560 560 560 560 560
560 560 560 560 561 560 560 560 total = 8.940339 per ms
12:07:14.408 16 switches: flows/sec: 600 600 600 600 600 600 600 600
600 600 600 600 608 600 600 600 total = 9.539639 per ms
12:07:15.513 16 switches: flows/sec: 720 601 601 601 601 601 601 601
601 601 601 601 602 601 601 601 total = 9.690281 per ms
12:07:16.614 16 switches: flows/sec: 608 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 total = 9.598507 per ms
12:07:17.717 16 switches: flows/sec: 592 584 584 584 584 584 584 584
584 584 584 584 584 584 584 584 total = 9.331694 per ms
12:07:18.828 16 switches: flows/sec: 688 569 569 569 569 569 569 569
569 569 569 569 569 569 569 569 total = 9.133456 per ms
12:07:19.936 16 switches: flows/sec: 600 600 600 600 600 600 600 600
600 600 600 600 600 600 600 600 total = 9.534829 per ms
12:07:21.036 16 switches: flows/sec: 616 616 616 616 616 608 616 608
616 608 608 616 608 608 616 608 total = 9.798354 per ms
RESULT: 16 switches 15 tests min/max/avg/stdev = 8763.60/9798.35/9278.47/291.91
responses/s
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel