kytos-ng / of_core

Kytos Main OpenFlow Network Application (NApp)
MIT License
0 stars 5 forks source link

Analyze `kytos/core.openflow.raw.in` slowness and/or inconsistent link rediscoveries with an EPL #129

Closed viniarck closed 7 months ago

viniarck commented 7 months ago

Aldo has encountered a generalized slowness on kytos/core.openflow.raw.in, which was snowballing on other problems. It might be topology related since links with unexpected endpoints also showed up, he was using this topology:

problematic topo

from mininet.topo import Topo

class RingTopo(Topo):
    """Ring topology with three switches
    and one host connected to each switch"""

    def build(self):
        # Create two hosts
        h1 = self.addHost('h1', ip='0.0.0.0')
        h2 = self.addHost('h2', ip='0.0.0.0')
        h3 = self.addHost('h3', ip='0.0.0.0')
        h4 = self.addHost('h4', ip='0.0.0.0')
        h5 = self.addHost('h5', ip='0.0.0.0')
        h6 = self.addHost('h6', ip='0.0.0.0')
        h7 = self.addHost('h7', ip='0.0.0.0')

        # Create the switches
        s1 = self.addSwitch('s1')
        s2 = self.addSwitch('s2')
        s3 = self.addSwitch('s3')
        s4 = self.addSwitch('s4')
        s5 = self.addSwitch('s5')
        s6 = self.addSwitch('s6')
        s7 = self.addSwitch('s7')

        # Add links between the switch and each host
        self.addLink(s1, h1)
        self.addLink(s2, h2)
        self.addLink(s3, h3)
        self.addLink(s4, h4)
        self.addLink(s5, h5)
        self.addLink(s6, h6)
        self.addLink(s7, h7)

        # Add links between the switchesz
        #self.addLink(s2, s3)
        #self.addLink(s3, s1)
        #self.addLink(s1, s2)
        ##self.addLink(s1, s2)

        self.addLink(s1, s2)
        self.addLink(s1, s4)
        self.addLink(s2, s3)
        self.addLink(s3, s4)
        self.addLink(s3, s5)
        self.addLink(s3, s7)
        self.addLink(s5, s6)
        self.addLink(s5, s7)
        self.addLink(s6, s7)

topos = {"mytopo": (lambda: RingTopo())}

I paired with him, we'll continue to investigate to narrow this down. I'll assign it to myself to continue analyzing this.

viniarck commented 7 months ago

@Alopalao,

1 - Indeed there was a bug (unsupported case) on mef_eline https://github.com/kytos-ng/mef_eline/issues/425, 2 - Creating an EPL wouldn't be supported betwen 00:00:00:00:00:00:00:01:2 to "00:00:00:00:00:00:00:07:2" because it would result in a new link discovery over this EPL, which in turn would cause rediscoveries. However, an EVPL should work, but there's another issue mentioned in the prior point (network engineers will define the priority later, let's see)

Now, regarding the slowness that you've seen on kytos/core.openflow.raw.in, that still strang and I haven't reproduced on my environment. So, let's keep this issue open, and keep an eye on it to see if it manifests, if it does, let's keep the discussion going. Good catch.

Alopalao commented 7 months ago

So about the slowness, I found the problem and it was not with kytos. Any program that I run in my virtual environment would not make use of more than 2 cores in my cpu. Solved the problem with some firmware updates.

P.D. It probably reduced the number of threads being created.

viniarck commented 7 months ago

So about the slowness, I found the problem and it was not with kytos. Any program that I run in my virtual environment would not make use of more than 2 cores in my cpu. Solved the problem with some firmware updates.

P.D. It probably reduced the number of threads being created.

Good to know, Aldo. Right, I'll go ahead and close this issue here then.

mef_eline's issue/discussion will be continued in the linked issue.