kriti1991 / cloudsim

Automatically exported from code.google.com/p/cloudsim
0 stars 0 forks source link

Network Topology #46

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.build different network topology like VL2, BCube, DCell and portland.
2.try to show the deference between VL2 and BCube using change function in 
org.cloudbus.cloudsim.examples.network.datacenter.TestExample class as follow:
static void CreateNetworkVL2(int numhost, NetworkDatacenter dc) {

        // Edge Switch
        EdgeSwitch edgeswitch[] = new EdgeSwitch[1];
                AggregateSwitch aggSwitchL1[] = new AggregateSwitch[1];
                AggregateSwitch aggSwitchL2[] = new AggregateSwitch[1];
                RootSwitch rootSwitch[] = new RootSwitch[1];

        for (int i = 0; i < 1; i++) {
            edgeswitch[i] = new EdgeSwitch("Edge" + i, NetworkConstants.EDGE_LEVEL, dc);
                        aggSwitchL1[i] = new AggregateSwitch("AggregateL1" + i, NetworkConstants.Agg_LEVEL, dc);
                        aggSwitchL2[i] = new AggregateSwitch("AggregateL2" + i, NetworkConstants.Agg_LEVEL, dc);
                        rootSwitch[i] = new RootSwitch("Root" + i, NetworkConstants.ROOT_LEVEL, dc);

                        rootSwitch[i].uplinkbandwidth = 1000;
                        aggSwitchL2[i].uplinkbandwidth = 500;
                        aggSwitchL1[i].uplinkbandwidth = 500;
                        edgeswitch[i].uplinkbandwidth = 100;

                        rootSwitch[i].downlinkbandwidth = 1000;
                        aggSwitchL2[i].downlinkbandwidth = 500;
                        aggSwitchL1[i].downlinkbandwidth = 500;
                        edgeswitch[i].downlinkbandwidth = 100;

                        //not active
                        rootSwitch[i].latency = 2;
                        aggSwitchL2[i].latency = 5;
                        aggSwitchL1[i].latency = 5;
                        edgeswitch[i].latency = 10;

                        rootSwitch[i].switching_delay = 2;
                        aggSwitchL2[i].switching_delay = 5;
                        aggSwitchL1[i].switching_delay = 5;
                        edgeswitch[i].switching_delay = 10;

                        edgeswitch[i].uplinkswitches.add(aggSwitchL1[i]);
                        aggSwitchL1[i].uplinkswitches.add(aggSwitchL2[i]);
                        aggSwitchL2[i].uplinkswitches.add(rootSwitch[i]);

                        rootSwitch[i].downlinkswitches.add(aggSwitchL2[i]);
                        aggSwitchL2[i].downlinkswitches.add(aggSwitchL1[i]);
                        aggSwitchL1[i].downlinkswitches.add(edgeswitch[i]);

            // edgeswitch[i].uplinkswitches.add(null);
            dc.Switchlist.put(edgeswitch[i].getId(), edgeswitch[i]);
                        dc.Switchlist.put(aggSwitchL2[i].getId(), aggSwitchL2[i]);
                        dc.Switchlist.put(aggSwitchL1[i].getId(), aggSwitchL1[i]);
                        dc.Switchlist.put(rootSwitch[i].getId(), rootSwitch[i]);
            // aggswitch[(int)
            // (i/Constants.AggSwitchPort)].downlinkswitches.add(edgeswitch[i]);
        }

        for (Host hs : dc.getHostList()) {
            NetworkHost hs1 = (NetworkHost) hs;
            hs1.bandwidth = NetworkConstants.BandWidthEdgeHost;
            int switchnum = (int) (hs.getId() / NetworkConstants.EdgeSwitchPort);
            edgeswitch[switchnum].hostlist.put(hs.getId(), hs1);
            dc.HostToSwitchid.put(hs.getId(), edgeswitch[switchnum].getId());
            hs1.sw = edgeswitch[switchnum];
            List<NetworkHost> hslist = hs1.sw.fintimelistHost.get(0D);
            if (hslist == null) {
                hslist = new ArrayList<NetworkHost>();
                hs1.sw.fintimelistHost.put(0D, hslist);
            }
            hslist.add(hs1);

        }

    }

        static void CreateNetworkBCube(int numhost, NetworkDatacenter dc) {

        // Edge Switch
        EdgeSwitch edgeswitch[] = new EdgeSwitch[1];
                AggregateSwitch aggSwitchL1[] = new AggregateSwitch[1];
                RootSwitch rootSwitch[] = new RootSwitch[1];

        for (int i = 0; i < 1; i++) {
            edgeswitch[i] = new EdgeSwitch("Edge" + i, NetworkConstants.EDGE_LEVEL, dc);
                        aggSwitchL1[i] = new AggregateSwitch("AggregateL1" + i, NetworkConstants.Agg_LEVEL, dc);
                        rootSwitch[i] = new RootSwitch("Root" + i, NetworkConstants.ROOT_LEVEL, dc);

                        rootSwitch[i].uplinkbandwidth = 1000;
                        aggSwitchL1[i].uplinkbandwidth = 500;
                        edgeswitch[i].uplinkbandwidth = 100;

                        rootSwitch[i].downlinkbandwidth = 1000;
                        aggSwitchL1[i].downlinkbandwidth = 500;
                        edgeswitch[i].downlinkbandwidth = 100;

                        //not active
                        rootSwitch[i].latency = 2;
                        aggSwitchL1[i].latency = 5;
                        edgeswitch[i].latency = 10;

                        rootSwitch[i].switching_delay = 2;
                        aggSwitchL1[i].switching_delay = 5;
                        edgeswitch[i].switching_delay = 10;

                        edgeswitch[i].uplinkswitches.add(aggSwitchL1[i]);
                        aggSwitchL1[i].uplinkswitches.add(rootSwitch[i]);

                        rootSwitch[i].downlinkswitches.add(aggSwitchL1[i]);
                        aggSwitchL1[i].downlinkswitches.add(edgeswitch[i]);

            // edgeswitch[i].uplinkswitches.add(null);
            dc.Switchlist.put(edgeswitch[i].getId(), edgeswitch[i]);
                        dc.Switchlist.put(aggSwitchL1[i].getId(), aggSwitchL1[i]);
                        dc.Switchlist.put(rootSwitch[i].getId(), rootSwitch[i]);
            // aggswitch[(int)
            // (i/Constants.AggSwitchPort)].downlinkswitches.add(edgeswitch[i]);
        }

        for (Host hs : dc.getHostList()) {
            NetworkHost hs1 = (NetworkHost) hs;
            hs1.bandwidth = NetworkConstants.BandWidthEdgeHost;
            int switchnum = (int) (hs.getId() / NetworkConstants.EdgeSwitchPort);
            edgeswitch[switchnum].hostlist.put(hs.getId(), hs1);
            dc.HostToSwitchid.put(hs.getId(), edgeswitch[switchnum].getId());
            hs1.sw = edgeswitch[switchnum];
            List<NetworkHost> hslist = hs1.sw.fintimelistHost.get(0D);
            if (hslist == null) {
                hslist = new ArrayList<NetworkHost>();
                hs1.sw.fintimelistHost.put(0D, hslist);
            }
            hslist.add(hs1);

        }

    }
3.the output result is same for boot topology?! However, the functionality of 
the AggregateSwitch and RootSwitch is not achived by simulator. 

What is the expected output? What do you see instead?
The result must be different between network topologies.

What version of the product are you using? On what operating system?
CloudSim 3.0.2, MacOSx, Java JDK 1.6, ant 1.8.

Please provide any additional information below.

Original issue reported on code.google.com by zakarea....@gmail.com on 16 Dec 2012 at 3:11

GoogleCodeExporter commented 9 years ago
As this issue relates to a non-core package, we will postpone the solution 
until we have a team member to take over its maintenance.

Original comment by rodrigo.calheiros on 29 Apr 2013 at 4:11

GoogleCodeExporter commented 9 years ago
please answer this question as soon as possible. Thank you!

Original comment by knb...@gmail.com on 26 Aug 2013 at 2:29

GoogleCodeExporter commented 9 years ago
Hi!
I need to simulate VL2, portland and a new proposed architecture in order to 
compare their performance on various parameters. When would this defect be 
fixed? I am a beginner. Any alternative ways to compare them? Any help would be 
highly useful. Thanks

Original comment by ankita1...@gmail.com on 27 Feb 2014 at 10:43