Вопрос

I'm in the process of building a discrete-event simulator, and need to be able to calculate the theoretical bandwidth available between two systems in a given network topology, so that I can "time" how long a transfer will take to occur and create an event at its expected completion time.

At the moment, for simplicity, I do not consider the switch's backplanes or likelyhood for collisions / congestion to occur within the network. I am simply interested in the maximum transfer rate between all systems communicating.

For instance, consider the following sample network topology: sample topology

We assume the following connections:

Source 1, Source 2 -> (sending to) Dest 1
Source 3, Source 4 -> (sending to) Dest 2

Given these connections, what is the maximum effective transfer rate of all sources?

If we visualize this as a graph, I can calculate this manually by starting from the sources and evaluating at each switch level the maximum amount of incoming network traffic vs the switch's uplink.

For instance, Source #1 in this scenario has 50 Mbps of effective bandwidth to Dest 1

1 Gbps * S1(1/2) * S2(1) * S3(1/10) = 50 Mbps

However, I'm curious as to what other methods can be utilized to calculate this, or if there is a more effective approach which I can utilize to "predict" network traffic.

Any feedback is appreciated -- thanks.

Это было полезно?

Решение

This is essentially a max-min fairness problem.

https://en.wikipedia.org/wiki/Max-min_fairness

The progressive filling algorithm (described in the Wiki article) is a simple solution to this problem:

If resources are allocated in advance in the network nodes, max-min fairness can be obtained by using an algorithm of progressive filling. You start with all rates equal to 0 and grow all rates together at the same pace, until one or several link capacity limits are hit. The rates for the sources that use these links are not increased any more, and you continue increasing the rates for other sources. All the sources that are stopped have a bottleneck link. This is because they use a saturated link, and all other sources using the saturated link are stopped at the same time, or were stopped before, thus have a smaller or equal rate. The algorithm continues until it is not possible to increase. Lastly, when the algorithm terminates, all sources have been stopped at some time and thus have a bottleneck link. This allocation is max-min fair.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top